Alternative to pyGame?I learned Python in an afternoon (from years of C++ experience) and within a week I was writing more functionality faster in Pygame.

Oct11

comment

How were cartridge-based games programmed?Re: "Compress what you can," on the old hardware you typically would compress to whatever the hardware could handle. You would never compress audio to MP3, because the audio hardware didn't handle it natively and you wouldn't want to waste the time decompressing it on the CPU when you could just stream it straight off of the media into the audio hardware. MIDI was great though because everyone had (and has) a wavetable synth on board; just load up your samples and there you go.

Algo for given an amount of XP, find a character's levelAlso it's not like you need to determine the current level all of the time. Just check to see if the current XP is more than the threshold for the NEXT level, starting from the current level that you've stored somewhere. I.e. I'm level 5. If my XP is greater than or equal to xpTable[6], then I'm level 6. Keep looping until you find your new current level.

Oct7

comment

How different is Java for JRE vs Java for Android?For what it's worth, Android applications are typically written in Java. The difference between the two is that "Android" is an operating system and "Java" is a programming language. They serve different (non-overlapping) purposes.

Handling game states for AndroidI haven't done enough Android development to say for sure, but I would suggest that you do not want your Views to be doing any logic. Views are for viewing, they should only be drawing whatever the data model says that they should draw. Likely it's the Activity that should be updating all of this stuff. (Put 'View' in place of 'Renderer' in my example above.)

Oct1

comment

How do I build games with scripted actors?This is basically how it worked in the one game I worked on using Lua. Each thing that wanted Lua control had a LuaComponent, and that component had its own Lua VM which got a single 'tick' per frame. I can't say that it worked great, but it did result in a shipping game.

Oct1

comment

How do I build games with scripted actors?Without polymorphism in the entity (your "Character"), this can also be accomplished with an abstract AI base class and derivations, PlayerAi, NpcAi, LuaAi, etc. Even better perhaps would be for it all to be Lua controlled, and the Lua could do the controller "AI" processing.

How do I render a mirror or other reflective surfaces?An alternative, if you have more memory than render time, is to simply reflect your world geometry through the mirror in your 3D editor, then you can modify it to look however you want (enforce lower mip levels, etc.). We did this on the PS1, where stuff sitting on a shiny floor was duplicated/inverted underground, and the floor itself was rendered semitransparent.

Game state sharing data@Kytolan I agree with the overengineering worry; in C and C++ I implement states as enum values and switch statements; turning these into "rich objects" definitely has a negative impact on browsability, comprehensibility, and execution speed. On the other hand, in Python I implemented them as modules/objects that I threw on the stack, and it worked out well enough since enums and switches are ahem less convenient in Python. :)