How To Program Games And Emulators?


You might mean programming languages, in which case you could use C/C++, or Fenix and Python for games. That's a bit too wide a question to answer properly. Look up some tutorials if you're interested in starting, read the wiki and FAQs, then ask more specific questions when you get stuck :)
 
this looks like one of those things where if you have to ask you are going to be able to do it any time soon.

programming in general is pretty tough and programming games is among the hardest things to program.

emulators are even tougher and require both extensive knowedge of programming, the system you are emulating, and the system you are programming the emulator for. basically something not to attempt until you are an expert.

best bet is to download the fenix dev kit off the archive then follow the tutuorials off the fenixonfire page then go to flamingbird.com for further reference.
 
The thing with games is: you don't need to be reinventing the wheel. Learning C/C++ can be quite difficult. You will need to learn the basics of programming first, then go on to learn how to use APIs to display graphics and handle input aswell as sound (an API like SDL for instance). Then you also need to learn a lot of the basics of game programming like tile-maps, animation, sprites, pathfinding and artificial intelligence, collision detection etc. After you have mastered these, you can start coding a game. Python might be a little more of a language to learn but still you need to learn all the basic steps you would need to master in C.
If you really want to program games fast and don't want to go through the hassle of learning all the background stuff that needs to be done to make a game-loop tick, then try fenix. It does a lot of the mechanics for you already and still offers enough flexibility to program nice games that will probably satisfy your needs. It's an easier language to learn and is more of a script language actually...

When it comes to emulators, it will get even more difficult than plain game development. To emulate a machine you will not only have to know how that machine works (and by that I mean ALL the detail inside the machine, memory mapping and allocation, system calls, processors, input and interrupts blablabla), you will also need to know how to imitate that on a totally different hardware basis. Also you will probably need to use a fairly high amount of assembler (machine code) to get it running at decent speeds. Check out fenix first, then if that seems too easy for you, go on with learning a real programming language and if you know what you are doing and start to talk in compiler output, go on and try to code an emulator...

EDIT: Oh... well yeah, somebody else was faster then me and apparently said the same shit with fewer lines ^^ *need more coffee* mhh... caffeine... :p
 
i'm not sure if coding an emulator is conceptually difficult, as others have said, it's probably more tedious than anything (assuming that the hardware you're emulating is well-documented). but it's still not something you'd wanna cut your teeth on...too much time and effort are required before you can test things out. of course, making an emulator that's stable & optimized...that has to be pretty tough.

if you plan on using c/c++ then you need to become familiar with compiling (and cross-compiling in the case of gp2x), dependencies, makefiles, blah blah blah. it's in those black muddy waters that so far i have stayed away from...but once you learn it you'll have a much better idea of how hardware and software systems work in general.

personally i've been taking small steps, learning a little python here and there. there's more than one way to approach programming but the good thing is a lot of the core ideas are applicable within various platforms/languages (i'm thinking of things like objects, scope, casting, logical flow, etc).

i can tell you from the little bit that i've coded that it's a great thrill to make something, have the compiler/interpreter choke, go back and revise, etc etc, and tweak and tweak and then finally it WORKS.
 
rokdcasbah posted on Apr 10 2006 at 06:41 PM said:
i'm not sure if coding an emulator is conceptually difficult, as others have said, it's probably more tedious than anything (assuming that the hardware you're emulating is well-documented). but it's still not something you'd wanna cut your teeth on...too much time and effort are required before you can test things out. of course, making an emulator that's stable & optimized...that has to be pretty tough.

It's extremely difficult. No offense meant to the OP but if you start your thread asking what 'programs to learn' to program games or emulators you are not anywhere near ready to write an emulator. Port an emulator perhaps, later on, but it won't run at acceptable speeds unless you go adding ASM cores, and this is awfully advanced stuff for someone who doesn't even know how programming works yet.

Pick up a book on C or C++, I recommend Ivor Horton / Wrox Press' excellent book "Beginning C".. read it cover to cover and do all the examples, learn all the fundamentals. If you're really pressed for time get basic functions, scope, variables, casting, pointers, arrays and structures under your belt. Then learn SDL and add that to your programs to learn how to do basic multimedia. Read up on SDL game tutorials to get an idea of how games actually function, slowly build up your base of knowledge until you're ready to develop a game from scratch. Good luck!
 
Last edited by a moderator:
If there are any technical colleges in your area that offer part-time courses, it might be worthwhile to sign up for an introductory course in C++, just so you have a little direction while learning the basics.
 
Personally...I think the greatest obstacle is not it's difficulty, but the amount of work, time, and determination needed to learn these languages. When your learning them in school, you got some pretty good determination there, learn the language or fail school, get killed by your parents, and lower chances of a good college app. When learning on your own, you can quit WHENEVer you want...unless you have equally good motivation. Oh yea, if your new to programming and all, start simple, and work your way up. Start on really simple stuff like HTML, go to a little more...tradional? languages such as Javascript, and then go on to C and C++, and add a little Python on the way. Note, if your going to be a game developer, find a book or something that teaches you about all the basics, from sprites, blitting, ai, logic, and all, and also learn pixel drawing. If your working on...well applications, then divide your time among, understanding (note word, UNDERSTAND) whatever your programming, how to utilize apis, dlls, and other software shit, and learning your hardware. Hardware knowhow is a must for Handhelds and optimized hardware, (for effiecent emulators and that crap).

AH!!!! Edit....somewhere up there.
 
Cheers for the advice...gonna get me some literature and see how I get on with it.
 
Coding emulators is really all not that difficult or rocket science.... assuming you know how to code. You don't start an emu as your first project, you write something tht prints "Hello World" on the screen and go from there.

Writing an emu is mostly just tedious busy work, assuming the target system is well documented; if it is undocumented, then it is both tedious and tedious-times-two, but not really 'hard' per se.. just enormous amounts of time exploring an unknown system.

I've got a few articles in my blog about writing a CPU emulator (the core of an emulator), but I doubt the OP really needs to go that far.. he needs to learn to read files first :)

(If programming was easy, they wouldn't need programmers.)

jeff
 
so, how difficult would it be to make a game like jet set willy?
 
sausage dog posted on Apr 13 2006 at 11:50 AM said:
so, how difficult would it be to make a game like jet set willy?

Learn Fenix, then try to code a clone ... then you tell us ;)
 
Last edited by a moderator:
It´s very hard and complicated if you know as much about programming as i assume you do.

It all depends on your skill. That might sound like a stupid answer, but that´s how it is.
 
Last edited by a moderator:
sausage dog posted on Apr 13 2006 at 04:50 PM said:
so, how difficult would it be to make a game like jet set willy?

In Fenix, probably not that hard for a simplified version. But you're getting ahead of yourself a bit here ;) Don't try to leap straight in to a full game project - chances are you'll get stuck, lose motivation, and give up on the whole thing. Start small and build up your knowledge/confidence, and as long as your expectations aren't too high straight away, you'll be fine :)
 
Last edited by a moderator:
Back
Top