GP2X Starting Development On Gp2x, Help For A Super N000000b?


quadomatic

DingooWiki Admin
Joined
Mar 26, 2007
Messages
1,233
Location
Chicago, IL - USA
Website
www.opendingoo.com
I thought it would be cool if I could develop programs for the GP2X. Right now all I know is Java (and not a whole lot), but I'd be willing to learn another programming language. I really don't understand exactly what all the stuff on development that the GP2X wiki is talking about, so I could use a lot of help on how to get started developing for the GP2X, like what programming language I should use, what software I need, and exactly how I can get started (I'm in linux btw).

Thanks a bunch
 
quadomatic said:
I thought it would be cool if I could develop programs for the GP2X. Right now all I know is Java (and not a whole lot), but I'd be willing to learn another programming language. I really don't understand exactly what all the stuff on development that the GP2X wiki is talking about, so I could use a lot of help on how to get started developing for the GP2X, like what programming language I should use, what software I need, and exactly how I can get started (I'm in linux btw).

Thanks a bunch
Well, first thing to learn is an appropriate programming language. If you want to write games, have a look at Fenix, but if you want something a little more "standard" and portable, then C.

Post back when you decided on one of them :)
 
Last edited by a moderator:
I don't know that I'd only be doing games, though I probably would be doing some. C seems like it would be pretty difficult to learn too. Would Python be a good language to use?

It seems like a powerful language. I don't really know anything about it though.

I'm in the middle of building the Open2X toolchain from SVN right now...I should probably be more concerned with learning to program in Python though...
 
You will severely limit the audience for your games if you pick a language like Python or Java, which need specific runtimes installed in the root of the SD card. Most people will not bother to install those things, it's sad but true. :(
 
Alex. said:
You will severely limit the audience for your games if you pick a language like Python or Java, which need specific runtimes installed in the root of the SD card. Most people will not bother to install those things, it's sad but true. :(
ic...is there a language other than Python that wouldn't be too difficult to learn that would be well suited to GP2X?

Couldn't the software come with the Python runtimes, and have them copied to the root of the SD card?

Fenix does look interesting, but I don't know that I would only want to do games. Does Fenix need runtimes to be installed on the root of the SD card?
 
Last edited by a moderator:
The Python and Java runtimes are large, if I remember correctly about 10MB each. The Fenix runtime on the other hand is only 0.5MB and comes with every app. Fenix is great for writing small games, I give it my thumbs up for that :) Once you get familiar with it you'll notice how similar it is to C, and you'll jump ship much easier. Good luck!
 
PokeParadox said:
If you know Java, then I agree that you should be able to adapt to C++ fairly straightforwardly...
Well, I'm just 1 semester into AP Computer Science. I don't know a whole lot yet, so the idea of learning C scares me a bit. Plus, I don't have a whole lot of time on my hands right now, since I have ACTs and SATs coming in a few months.

Fenix sounds like it might be fun to learn. I could probably play around with it during my AP Computer Science class too :lol: Besides, it's probably a good idea that I start with easier languages like Fenix than just jumping into the deep end with C++.

Could someone point me in the direction of some Fenix tutorials/hello worlds and such?

Also, I finished running the script for the Open2X applications Toolchain, but what exactly do I need to do now?

I think I'll start a blog about all the steps I'm having to take to get started. Maybe it'll help other super n0000bs who want to develop for the GP2X.

UPDATE: I can't seem to find any resources on learning how to program in Fenix. The tutorials I found on FenixOnFire are for Windows programs, but I use Linux. I also can't find anything teaching Fenix syntax. Can someone help me out?

2nd UPDATE: I got ConTEXT and the Fenix windows binaries working under WINE. I'm surprised that it works without a hitch...cept for backspace in ConTEXT not really working, but that might be what it's supposed to do. It's still all good though. The Hello World in the tutorial on FenixOnFire worked fine, so I'm pretty happy.

I'm going to read through the tutorials on FenixOnFire, and hopefully I'll learn some good stuff.

3rd UPDATE: I managed to get the Hello World running on my GP2X pretty easily. I'm pretty excited!
 
Last edited by a moderator:
Hi,

I have never used Fenix in my life, but sooner or later (if your uni teaches C/C++) you'll find that the real challenge of C/C++ is learning how to use pointers and memory (when related to games). The real horrible thing is that debugging and finding memory leaks is kinda hard. In other words, as soon as you start learning C, if you're serious about learning those languages, program as many things as your imagination can think. As for me, the garbage collector is no longer my friend ;)
 
People always seem to get this wrong. You don't learn languages, you learn how to code (the same way you don't learn how to drive a Ford or how to drive a Peugeot etc, you learn how to drive a car). The benefit of choosing one language over another is that a simple language like Fenix will help you learn the basics much better than something like C. Many of the C examples you'll find will teach you bad habits before you are capable of understanding how/why they are bad habits. Not that there's anything wrong with having bad habits, but you really should know why you shouldn't be doing something before you go off and do it :).
 
I'm doing the last tutorial on FenixOnFire, and for some reason, using the SAME code on the tutorial, the Hello World in the move_text example leaves little spaced vertical lines, about the size of an H in Hello World.

Any ideas why this is happening?
 
woogal: What you say is true, but you can't say that it's like "driving a car". It's more like "playing (insert instrument)". Many instruments have similar characteristics (such as many programming languages have variables or functions, for example). Lisp, for example, is quite different from C, and those two at the same time are quite different from Prolog. Remember that OOP and procedural programming (C#, C++, C, Java, etc.) are not the only available programming languages.

I'm sure that even if you're very familiar with C, you'll find that it's not as simple as "getting used to the differences between Prolog and C". You'll find out that it's a complete different thing, at least that's what happened to me :p and I'm pretty sure that anyone who has used prolog before will agree with me.

Also, about bad habits, that's why everyone has to study other people's code. In my personal case, I had very bad habbits when I learned Visual Basic (my first programing language), for example using variant variables (variables with no type). Simple programming languages don't mean that you won't have bad habits.

Though it's true that there is a basic building block when talking about programming. Thinking about the problem, solving it in an elegant fashion, scalability, etc. That's like reading music. The rest is learning how to play the instrument :p

*Sorry, a little off-topic*
 
A r k said:
SNIP

I'm sure that even if you're very familiar with C, you'll find that it's not as simple as "getting used to the differences between Prolog and C". You'll find out that it's a complete different thing, at least that's what happened to me :p and I'm pretty sure that anyone who has used prolog before will agree with me.

SNIP

*Sorry, a little off-topic*
Ack.... Prolog is a bastardised blemish on my arse! It should be banned! >_>
I kind of agree that you should learn a more straight-forward programming language to get used to programming. But C/C++ is a very useful language to know, so it's good to jump in as soon as you have the basics down. :)
 
Last edited by a moderator:
A r k said:
woogal: What you say is true, but you can't say that it's like "driving a car". It's more like "playing (insert instrument)". Many instruments have similar characteristics (such as many programming languages have variables or functions, for example). Lisp, for example, is quite different from C, and those two at the same time are quite different from Prolog. Remember that OOP and procedural programming (C#, C++, C, Java, etc.) are not the only available programming languages.


I was trying to not confuse people too much. I've seen the differences between functional and procedural languages destroy perfectly sane human beings before :). Never really understood why myself because when I was at uni I found hacking simple examples together with prolog and haskell to be quite easy, but a lot of people just couldn't get their heads round it at all.
 
Last edited by a moderator:
Isn't Prolog a logical language not functional? I still can't get my head round Haskell or Prolog despite managing to complete assignments in them :(.

As long as you stay within one paradigm, moving from one language is relatively easy. Moving paradigms is pain though.

I personally see programming as 'how to solve problems with code' and find the right tool/method to get it done. One of my favourite languages is Python if only because everyone has to indent the same way. Going through various different indentation/spacing issues in C or C++ code drives me insane!

QUOTE
Also, about bad habits, that's why everyone has to study other people's code.

Generally that is where habits come from, good AND bad.
 
Though I really enjoyed Prolog and Scheme, outside their paradigm scope, they were (and are) completely useless. The same can't be said about ASM, which really helped me alot (after building a compiler and nearly dying...). B2Logic was fun too :D

woogal said:
I've seen the differences between functional and procedural languages destroy perfectly sane human beings before :). Never really understood why myself because when I was at uni I found hacking simple examples together with prolog and haskell to be quite easy, but a lot of people just couldn't get their heads round it at all.
Yeah, that's true :D! I didn't really have much problem with those "weird" languages, too. After a very frustrating night trying to explain some weird Scheme examples to a friend, I concluded that either you're born with it, or you are not. Though the same can be said about all programming languages. However, making things work (or look like they work) using prodecural/OO languages is usually easier. Prolog problems are like those math/IQ problems, there aren't many solutions and if you can't get to the solution quickly, thinking about it for 200 days will show little to no improvement (especially since asking prlog "brother(Ark, ?)" and having "NO" for an answer isn't too useful).

yaustar: True, bad AND good habits... hard to tell sometimes.
 
Last edited by a moderator:
woogal said:
People always seem to get this wrong. You don't learn languages, you learn how to code (the same way you don't learn how to drive a Ford or how to drive a Peugeot etc, you learn how to drive a car). The benefit of choosing one language over another is that a simple language like Fenix will help you learn the basics much better than something like C. Many of the C examples you'll find will teach you bad habits before you are capable of understanding how/why they are bad habits. Not that there's anything wrong with having bad habits, but you really should know why you shouldn't be doing something before you go off and do it :).

Exactly... For the OP here, learn Javascript first, super easy in the scope of life and you learn how to code, and then, jump into compiled code....
 
Last edited by a moderator:
Back
Top