Also, apparently my friends and family catch enough viruses. omg how can people be so stupid? My brother finaly stopped his download->Install->Please help me my computer broke. My other brother STILL doesn't have a startup disk, though he might not actualy get a virus because he's not stupid, also he doesn't surf the web either.My sister thought her hardware was broken but I think she merely frequented one to many sites.AND WHO FIXES IT ALL?!?!?!?!?
Yeah, viruses like to **** up your computer...by friend mis-clicked a link and his whole computer got screwed over (his Windows partition couldn't do anything without get crap loads of errors/stuff) so we had to reinstall the Windows side. After that, we showed him how to get ABP and NoScript for FF.
It's god-awful. Why are you loading a 32-bit register with 8-bit values? And your Assembly are just assignments and increments. You're not getting anything you wouldn't get from just writing it in plain C (or whatever that is).
The reason I wanted to make it faster was because I'm playing around in SDL and getting <30 FPS. I would have thought a 2D game with two surfaces would run faster than that...
You're either doing it very wrong or using a ridiculously large screen. I can fully update a 640x480x32 surface at 30 Hz easily. Keep in mind, though, that SDL uses software for 2D, which is a lot slower than hardware.
I'm using a double buffered fullscreen... but it's probably a mixture of the two.
I haven't finished the tutorial yet; just playing around. I don't like that to move anything around I have to have sprites. Why can't I have a small image that I can place on the screen and move? It seems stupid.
I'm using an array of surfaces for cleaning up at the end... I hope it's working...
I've restarted in C++; and I'm going to use vectors to store the surfaces instead.
However I will take a look at that code. I've been playing around in the TTYs in Linux; using Lynx. It's really fast without having to load those stupid GIFs and flash animations people put on web pages. It loads pages like instantly... then again it's only text...
Meh. I like images; I was just playing around. There's something I don't like though -- CTRL ALT F1-6 are TTYs but CTRL ALT F7 takes you backt o the GUI. I think it should be CTRL ALT Escape to leave the TTY...
A 2D first-person-shooter.
I haven't got very far. I haven't even made a main loop.
So far I have an initialization process (initialize SDL and some extension libraries, initialize a stack of surfaces I use to keep track of allocated memory at the end, set the window title, and remove the cursor (I'll replace it with a crosshair, note that the crosshair itself won't move; because I also hate those games where you simply move the mouse to kill cardboard cutouts that pop up... usually written in flash); and do some other stuff I've forgotten.
Actually the first thing it does is read a config file... the default one that will come with the program is at the bottom of this post. Excuse the word "FPS"; I haven't got a name yet so I use that as a placeholder (eventually I'll use a find-and-replace-all to change it when I think of a name).
I also plan to make 2 versions of the game. Because I want to be able to use lots of different font files and images; I want to "ship" the game with several images and fonts. Then the user can pick the set they like best before running the game. That will be the "larger" version. Then I'll make a small version which will be made as small as possible; with one font file and one set of images; all compressed PNGs. That one will probably run slower, too, because it won't have any inline functions.
Oh and I recognise that this will almost certainly never be distributed; I just like to practice.
// This is the default config file for FPS
// Two forward slashes denote a single-line comment. Multiple-line
// comments have not been implemented yet.
// Lines can be left blank or commented and they will be ignored.
// Commands begin with a ! and variables with a #
// "Syntax errors" will result in the program printing
// "Malformed expression on line [number]" but will have no other effect.
// At some point I'll add in-file error messages (as comments)...
// Anyway; there aren't any commands yet and I've only been able to think
// of four variables:
// Fontfile -- the file (usually in the fonts folder;
// although you can choose any path) to use as a font for printing text
// to the game (terminal-emulator text will be printed in whatever the
// terminal-emulator (e.g. xterm) uses.
// Only .ttf fonts can be used as yet; as AFAIK those are the only fonts
// that SDL has an extension library (SDL_ttf) for.
#fontfile = fonts/default.ttf
// There can be any amount of space in between the = and the variable;
// spacing will be copied exactly, though; so it might break the path
// and cause problems. But any amount of spacing between #fontfile and =
// is ok.
// I've tried to make this simple and easy to understand.
// You don't need any quotes around values; in fact, that will probably
// break something. I've not tested it.
// Anyway, the next variable implemented is imagefolder;
// which is the directory that fps will search for images in
#imagefolder = images/
// The forward slash is not necessary there. Again this can be any path
// however particular image names will be looked for so you should name
// the images in the folder you choose the same as I have done.
// This one is the folder to search for sounds. Again you should
// name the audio files the same as I have, including extensions.
#soundfolder = audio/
// And lastly this one simply tells the program where to search for .avi
// videos. Again; name them the same as I have if you want them to play.
#videos = video/
// Hopefully that's fairly easy to understand; at some point I'll
// implement more options to play around with. Feel free to edit or even
// delete this file. It's not needed -- if nothing is found, hard-coded
// defaults (the same ones originally used in this file when you
// received it) are used instead, so it's alright.
// Oh and please exscuse the ridiculous amount of comments. I always do that...
lol, speaking of viruses, I love when people say they go to a website and say that caught a virus from a website and had to buy new computer. Makes me crack up to know they're so ignorant.
Viruses, although a threat, are easily avoidable with a free antivirus and cautious web browsing. I find I get more false positives than anything else. People don't want to spend the 10 minutes of time to understand how a computer works. If you have a popup that randomly says you have a virus and it costs 9.99$ to fix it, it's clearly a scam. This fooled my parents multiple times. They came up to me one day and said, "Zach, you've been messing with our computer I can tell! It's all messed up. I installed an antivirus which even cost me money and you still managed to screw it up!". Laughing, I went to go see what they had blamed me for. There computer took almost 5 hours to fix and it's still screwed up beyond my able to fix it.
NOTE: Yes it irritates me that I fix they're computer free of cost buying hardware to help them out and setting up all of it for them and them saying everything is my fault. Not to add that my cellphone number is there technical hotline.
Yes it irritates me that I fix they're computer free of cost buying hardware to help them out and setting up all of it for them and them saying everything is my fault.
I suffer the same thing. My parents assume I know how to work specific software; and when I don't, complain. "I don't know how <insert program here> works; I've never used it. Maybe try reading the manual? You know, that "readme.doc" file? Yes, that's a file you're meant to read." I had to spend like four hours after being woken involuntarily because windows screwed up it's own NTFS partition. Really, gParted had resized it and windows didn't seem to understand; but I still blame windows for being unable to read a file table format designed for it; when the ntfs-3g driver was able to... Lol.
Urgh.
lol, speaking of viruses, I love when people say they go to a website and say that caught a virus from a website and had to buy new computer. Makes me crack up to know they're so ignorant.