GP2X What Language Do You Think I Should Learn?

Which language should I learn?

  • ASM

    Votes: 0 0.0%
  • C(of some kind)

    Votes: 0 0.0%
  • Python

    Votes: 0 0.0%
  • other

    Votes: 0 0.0%

  • Total voters
    0

If you want to port ANYTHING, make sure it uses SDL, so you don't have to rewrite the graphics routines and stuff. Some SDL code you can simply alter the makefile of and run it on the GP2X (provided you're using Linux), most of it you'll have to change the SDL_SetVideoMode to something the GP2X supports, and all programs you'll have to change inputs (for the buttons and the joystick). It mostly comes down to choosing the right project.

If you're one of those people who likes to work by example, try looking at the Pong source (in the file archive, it comes with the binary), as it's a good place to start when you begin coding for the GP2X, and where I started.

Happy coding, and I hope to see some games from you in the future! ^_^
 
If you want to port ANYTHING, make sure it uses SDL, so you don't have to rewrite the graphics routines and stuff. Some SDL code you can simply alter the makefile of and run it on the GP2X (provided you're using Linux), most of it you'll have to change the SDL_SetVideoMode to something the GP2X supports, and all programs you'll have to change inputs (for the buttons and the joystick). It mostly comes down to choosing the right project.

If you're one of those people who likes to work by example, try looking at the Pong source (in the file archive, it comes with the binary), as it's a good place to start when you begin coding for the GP2X, and where I started.

Happy coding, and I hope to see some games from you in the future! ^_^
Is it really that simple? Could anyone recommend me a simple project for when I get my GP2X, and I mean simple. ha!
 
Last edited by a moderator:
I can't really tell you what language would be BEST for you specifically, but I can tell you some things about how I got started. NOTE: I am still very much learning how to program and could hardly be seen as a good coder.

In high school I learnt PASCAL and then Delphi (Obj. Pascal)
I then did some flash script (for multimedia) it helped me understand syntax (though not much of it is usefull for game programming it helped alot with event-driven design)
I then proceeded to learn C# when I started my IT Traineeship with the local government. It was great... was much less confusing than C/C++ and allowed me to learn alot of lower level stuff (well sort of... M$ will only let you go so low)
Then I started modding for Doom3, the scripting language in the doom3 engine is loosly based on C/C++ so that helped me even further with C/C++ syntax. It also taught me alot about polymorphism and code structure.
Then when I heard about the GP2X I vowed I would learn C++ and SDL completely so I could help create something for the community (this is where I am now)
After reading C++ in 24 days and Thinking in C++ Vol2 to get the hang of the syntax and overall structure of c/c++ I moved onto SDL programming. This is where I learnt most of the usefull stuff I am putting to use now. I read SOL's SDL programming tutorial series and a few other SDL tut's I now consider myself on my way to making my first game for the GP2X.

I have just recently taken note that my Maths abilities are severely lacking so I have decided to backtrack and read alot of math theory before I go any further.

Basically what I wanted to say is that if you know little about program structure and organisation, then a simpler, higher level language would be the best place to start. If you think you have a basic grasp on programming there really is nothing stopping you from going straight into C/C++ and then applying it to Games through SDL (and then dropping SDL and writting your own libraries etc.)

If you do want to start C/C++ read Bruce Eckels "Thinking in C++ Vol 2" its a free download from his website: http://www.odioworks.com/download/TICPP-2nd-ed-Vol-two.zip
for SDL read Sol's tutorials it teaches alot about game structure and using SDL for hardware access: http://iki.fi/sol/gp/

Hope that helps. Good luck and I hope to see the fruits of your labour in the future ;)
 
I would highly recommend not going near the GP2X until you have some experience under your belt. Developing for the GP2X is a lot slower since you don't have a debugger, and can't quickly hit a key to test the program (ie. you have to put the executable on an SD card, put the SD card in the GP2X, run the app, test, repeat).

Start slow, take it steady, and expect to be frustrated ;)

Making an emulator is a significant undertaking and requires intimate knowledge of the hardware on both platforms. Making a simple game of pong on the other hand is fairly simple and entirely possible after only a short period of learning a programming language :)
 
If you do want to dev for GP2x you can use the dual makefile from the wiki, it allows you to compile an x86 version and a gp2x version of your program as long as you have all the libs etc setup correctly. This is usually a good way to tacke cross platform dev.
 
After reading through this thread I think it has even left me a bit confused so Im just going to add what I think here.

If you are looking to develop games quickly so that you could have learnt how to develop you're first proper game within a few weeks you should try either python with pygame or fenix.
Pygame is better documented and there are lots of resources on the internet for beginners to learn.
Fenix is mainly a spanish project so it isnt as well documented as pygame and at the moment the gp2x version runs a bit slow

If you're looking further into the future and are dedicated to putting a good few months worth of learning before you get a playable game out you should learn C and SDL.
C is pretty much the basis for all programming done nowadays and it's a lot more powerful than fenix or pygame but unless you need that extra power then I reccomend you stick with pygame or fenix.

ASM is pretty much pointless to learn as your first language as it is extremely complicated and extremely tedious and will take a very very long time to get the results you want. It is now very unlikely to find a dev who will code completely in asm and most will stick with C for the most part of their app but implement some asm code for the most processor intensive parts(like a cpu emulator inside a console emulator)

But if you are looking into developing emulators then dont expect to see much in the near or even moderately distant future unless you have a very good knowledge of computer hardware already(and that does not mean what graphics card is better than the others)

I personally went with C and sdl but had to stop because I had too much college work as well. I used www.wikibooks.org to learn C and "programming linux games" to learn sdl and i think someone has uploaded it and put a link in their sig if you want to read it.
 
ASM is pretty much pointless to learn as your first language as it is extremely complicated and extremely tedious and will take a very very long time to get the

I just started learning the ARM assembler and it's... so beautiful!
I'd not call it complicated thought assembler programing isn't the best way for everything. But the ARM's advantages are too great to not use them directly. The condition codes, shifted operands, pre/post-indexed addressing (with automatical increment of pointer!) and more what I don't know yet.
 
Last edited by a moderator:
ASM is pretty much pointless to learn as your first language as it is extremely complicated and extremely tedious and will take a very very long time to get the

I just started learning the ARM assembler and it's... so beautiful!
I'd not call it complicated thought assembler programing isn't the best way for everything. But the ARM's advantages are too great to not use them directly. The condition codes, shifted operands, pre/post-indexed addressing (with automatical increment of pointer!) and more what I don't know yet.

Assembler isn't complicated in itself but when you start writing larger programs it does get complex, it's why C was invented!
ARM assembler isn't the best to start learning assembler as it was designed for compilers not assembler programming. 6502,Z80 or even x86 is better to start off. A lot of the features mentioned above (barrel shifting, conditional execution, etc.) will be exploited by any good compiler.

Assembler is like the 'Latin' of programming languages, it isn't used much these days but learning it is advantagious if you're serious about programming or machine architecture. But don't make it the first language you learn though.
 
Last edited by a moderator:
Thought this link! might help u out a little.
They do say that one of the best ways to learn anything is to look at examples.

Choose the language(s) that u want to find code for & choose the type of license(s) to search for examples (or code to use directly in your projects if the codes GPL etc.).
As a bonus there are search plugins for the firefox web browser too, just to make it even easier :D
Covers about 30 of the most popular languages & about 20 different types of licenses.
Good luck!
 
Skimmed through the thread,

Learn C first, it will take about a month to learn the language, after that it is down to experience. It's a high enough language so that it isn't daunting machine like code but can also be used at low level (or combined with inline ASM) .

After that C++ or ASM. I don't know ASM myself, but it's on my to do list.
 
ASM is pretty much pointless to learn as your first language as it is extremely complicated and extremely tedious and will take a very very long time to get the

I just started learning the ARM assembler and it's... so beautiful!
I'd not call it complicated thought assembler programing isn't the best way for everything. But the ARM's advantages are too great to not use them directly. The condition codes, shifted operands, pre/post-indexed addressing (with automatical increment of pointer!) and more what I don't know yet.

Assembler isn't complicated in itself but when you start writing larger programs it does get complex, it's why C was invented!

Imho it's a more design things than just a language. I wrote once program in the Python so badly I had to rewrite it from start.

With proper macroassembler things don't have to be so bad. Yet I agree to use higher level languages when possible - it's just faster and time isn't free.

ARM assembler isn't the best to start learning assembler as it was designed for compilers not assembler programming. 6502,Z80 or even x86 is better to start off. A lot of the features mentioned above (barrel shifting, conditional execution, etc.) will be exploited by any good compiler.

If start with assembler programing then 6502 is the best choice imho. For a x86 it's a mixed bag - I remember very well how great it was in the "real mode". Z80 isn't that unsimilar to x86 (or perhaps I shoud say 8080 - the same person was involved in both). I tried once to program the 68000 but I didn't get too far... After all GFA Basic was good enough for my little programs. :)

I once wanted to program the 386 in its "protected mode" with 32 bits and all. But unfortunately could not get good docs on it (where I had to live it's wasn't that easy) and all this extenders' menace made me finally to resign.

It was so many years ago... meanwhile my interest in programing disappeared.

Assembler is like the 'Latin' of programming languages, it isn't used much these days but learning it is advantagious if you're serious about programming or machine architecture. But don't make it the first language you learn though.

The ARM made me again interested in assembler level coding. It's clean with some neat tricks (conditionals and argument's shifting) and when comparing asm to C... The biggest advantage of C is its ability to use directly pointers and declaring machine like data types. There is even the "register" prefix and inline definitions for functions. So C isn't really that different from assembler imo. I'd say it's most advanced macroassembler we have... :ph34r:
 
Last edited by a moderator:
You know I am free for the whooooooooooooooooooole summer, so I might work on an emu then.........I wonder what console I should emulate? :unsure:

P.S. How many hours per day would I have to work to produce an emu from scratch for about ~2 months? :huh:
 
Also is there anything wrong with this program?(hello world)

Code:
#include <stdio.h>

int main(void)
{
   printf("Hello, world!\n");
   return 0;
}

Or is it the IDE I am using?(Pelles) :huh:
 
you just need to run the gcc executable to compile it and it will automatically compile and link it all for you. You dont need to run ln or anything seperately.

And if you're testing that on the gp2x it won't work because there would be no console output and you wouldnt get any text output on the screen. You should be able to test it correctly though if you run it through sterm but im not sure.
 
I am not familiar with that IDE. Did you create a project and save the source file (Hello World) to it and then select Project>Rebuild All files ?
 
You know I am free for the whooooooooooooooooooole summer, so I might work on an emu then.........I wonder what console I should emulate? :unsure:

P.S. How many hours per day would I have to work to produce an emu from scratch for about ~2 months? :huh:
Not knowing any programming languages at all? See you in two years. (pending on the machine being emulated)

As for the obj problem, it looks like it isn't performing the last stage of building the program. Try using Codeblocks, DevCpp or Visual Studio Express.
 
Last edited by a moderator:
You know I am free for the whooooooooooooooooooole summer, so I might work on an emu then.........I wonder what console I should emulate? :unsure:

P.S. How many hours per day would I have to work to produce an emu from scratch for about ~2 months? :huh:
Not knowing any programming languages at all? See you in two years. (pending on the machine being emulated)

As for the obj problem, it looks like it isn't performing the last stage of building the program. Try using Codeblocks, DevCpp or Visual Studio Express.
Let's say nes, how long will it take if I ported it and changed it a little? :huh:
 
Last edited by a moderator:
Back
Top