Exodus, they are just the most basic of windows API calls to draw to the screen. The reason they're so terribly slow is the sheer number of error checks that are done. Things like always checking to make sure a pixel at the coordinates exists within bounds before drawing to it, and so forth. When tossing graphics together quickly, as crazy as it sounds it makes more sense to go slap happy with such checks. Getting something wrong could/would easily crash the whole computer, and unless you're taking the time to do the graphics right, you don't want to sit back and hope it'll all work perfect. As I start taking out checks, performance goes higher and higher. Not the best description of how it works, but it might answer your question.
I'd be tempted to give the graphics a bit more effort. I recently changed around a few things to improve their speed, and there is a lot more that could be done.
BlindJedi, I might need a more specific set of questions. The zombies contain while loops and also many If Statements. When you add up everything from finding a target to chase, movement, attacking, and producing sounds, the zombies are probably hundreds of IF statements.
Nikos, it won't surprise me if the fast character switching is a little clunky. It's sort of a hack on top of another hack, just to make it work. I think I may have explained it already (not sure), but back when Swamp was free the game already had an account system. The account system was a single character tied to a password, which is how many online games handle things. When I switched over to the paid system, rather than redesign a lot of code, I just tweaked things to tie 5 old accounts together with a bit of additional info. Those bundles of old accounts became what the new accounts are in the system. Well to the system it is actually dealing with 5 completely separate accounts when people refer to their 5 characters, which is a reason why you had to actually log out and back in to switch characters. To the server, it was never truly 5 characters all under the same account. The latest quick character feature triggers the server to log you out, then use the login details you used to first sign in to log you in a second time, then it overwrites some data to make it look like your machine did it all instead of the server itself. A bit messy, but the end result is much more convenient for players than needing to log out and back in.
Glad to hear SLJ had a solution to that problem.
- Aprone
Please try out my games and programs:
Aprone's software