Programming On The Pandora For Mortals


may88

Well-Known Member
Joined
Dec 17, 2007
Messages
1,178
Location
Bury St. Edmunds, UK
I was thinking about programming for the Pandora.
I have ok scripting skills and have learnt and mostly forgot Perl,Javascript,Fenix(a little - liked the program flow) and lately I've started to look at Python/PyGame (gp2x version seemed very old - never got anything to run on it - gave up a bit easy though).
Not sure if I'm kidding myself and I never have much time to learn so if the learning curve is too steep I'll never get anywhere.
This has kept me away from coding in C.

What is likely to be out there for the Pandora to enable the almost semi-skilled to code?

Should I bit the bullet and code in C? Are there any simple guides for cross compiling? (not sure what to ask even!)
 
Anything that has an open-source interpreter should be ported pretty quickly.

There is already cross-compiling for C and possibly C++, but the Pandora will also have on-board compilers for portable programming.
Perl, Python, Javascript all have open-source implementations that are probably already running on the BeagleBoard, which means they'll be on the Pandora nearly immediately.

I've preferred C++, but a lot of people seem to like Python, you might look into it. I'm sure Javascript will be supported soon as well, even if only in Firefox.

edit: There are supposed to be guides for C cross-compiling, but I've ignored them since I don't have a Pandora yet, and my programs will be small enough to compile on the Pandora itself.
 
Bennu will most certainly be ported after the Pandora is released I would think.
Bennu is a fork of Fenix, and should be 100 % backwards compatible. You only need to import some modules in your prg.
If you liked Fenix then Bennu should be the same. :)

The official website is at http://bennugd.org/
But I would recommend sticking to the new english community at http://www.bennugd.co.uk/ if you want to discuss Bennu instead of the official forums.
Reason: It's more active than the official english forums. On the official forums it's almost only activity in the spanish section.
 
Hopefully there will be a good community of hackers and information being stored in coherent places (wiki) and such, which should ease the pain (or at least spread it out to make it thinner for anyone :)

For instance, I am hoping people will adopt libpnd to some small extent, and extend it; while it has only so much functionality to start with, I hope it will grow into a good common repository of handy hacks. Got a good blitting functin tos it in. Got a lib of your own, post it up separately and help a brother out.

But yeah, if C/C++ is not your cup, there will be others; Python, Fenix/Bennu, Perl, whatever, you'll have it.

One of these days we need to start on a programming guide :p

jeff
 
You have heavy scripting experience. Go with where your strengths lie.

Bennu, possibly PyGame.

As someone that came from Javascript as well, I can tell you that Java is an easier jump than C. It's still relatively low level and fast(on Windows), but I'm not holding my breath for how well it runs on the Pandora. The only JVM in the Pandora repositories is JamVM - a fast interpreter - so don't expect anything close to C in performance.

I think I'd only recommend Java if you really want to get into 3D/OGL stuff, since it seems likely it'll be the easiest relatively fast language on the Pandora with OGL ES bindings.
 
You have heavy scripting experience. Go with where your strengths lie.
For simple games, I second python + pygame: it's probably as simple as it can get; for "desktop" games (e.g. minesweeper-like) an alternative may be using pygtk or pyqt.

If you are serious about writing games, however, you will have to learn C/C++ sooner or later; python has good C integrability and is great for prototyping, so you could

learn some C and C++ basics
write a simple game in python + pygame
rewrite it in C or C++ + SDL, learning as you go

The only JVM in the Pandora repositories is JamVM - a fast interpreter - so don't expect anything close to C in performance.
JamVM is a bytecodeinterpreter, just like any other JVM, and speed is no longer a big issue with jave these days. RAM may be an issue for bigger games, however, since that's the biggest java disadvantage.
 
Last edited by a moderator:
Gernot has stated that he will be supporting the Pandora with GLBasic - which already works well on GP2X and Wiz, so that's quite promising. :)
 
I'm a big fan of splitting things in half -- 'business logic' in script (game logic, AI, etc), a la python; the 'heavy lifting' being in 'closer to the metal', be it C or an GL layer, etc. Once you've built up a sufficiently big library of C code, you're really pretty efficienbt in C-business-logic since your'e using all abstradcted high level custom made APIs by then (ie: "paint whole screen now"), but I like to put the logic in script when I can .. makes it a lot easier for others to get into and hack, without messing with the lower level stuff; also makes things moddable to the end user.. edit the scripts. (Woot for Civ IV being like this.)

Anyway :)

jeff
 
Hey Jeff!

Not sure you remember me, but I was one of your testers for Zot!

http://www.codejedi.com/zot/

I have not posted anything since the fall of the Zodiac (and Zodiacgamer). The reason I'm posting (btw, this is my first post here) is Zot! You were so close on making something really big, and it would be great addtion to the pandora device.

Anyway, I'm looking forward to my Pandora device....I just wish the analog nubs were like the Zodiac one :p


Jason
 
Haha, isn't that the truth :) I can't imagine working in anything else but C now, even for very small and simple things - the amount of code wouldn't be any larger or less readable than in 'quick' languages either, with the useful bonus of having total control over everything that moves.

I'm more and more interested in scripting as a means of content creation though, everything has its place that's for sure.
 
Last edited by a moderator:
http://www.codejedi.com/zot/[/URL]

I have not posted anything since the fall of the Zodiac (and Zodiacgamer). The reason I'm posting (btw, this is my first post here"] is Zot! You were so close on making something really big, and it would be great addtion to the pandora device.

Anyway, I'm looking forward to my Pandora device....I just wish the analog nubs were like the Zodiac one :p
Jason



Zot was almost there, but it also had a really scattered design as I kept shifting gears (fiddling with new ideas) .. in the end, since no one was using it, it was a waste of my time so I abandoned it. (ie: I can write stuff a heck of a lot faster for myself, than trying to make it generic and so on.) Nowadays it'd be wiser to use PyGame or Fenix -- established script kits for this purpose, than my trying to come up with another one. A lot of the good stuff from within Zot lives on however ... I used that project as an excuse to pull together a lot of my disparate code from a dozen other projects and still use a lot of it today.

BombZ and such were cool though.. I will be picking some of that stuff off and dsusting it off again in the next year or two I imagine, as I work on a retro remake I've been wanting to do since .. well Zot :)

jeff
 
Last edited by a moderator:
we need support for GML, and that aint gonna happen :p
Heh, not that bad of a programming language, actually. Gamemaker for Pandora would be nice, as the system seems to be the best game system for coders, and some people don't know how to program, so it would be a nice addition. (It actually has a slim chance of being possible, through expansions...)
 
Last edited by a moderator:
JamVM is a bytecodeinterpreter, just like any other JVM, and speed is no longer a big issue with jave these days. RAM may be an issue for bigger games, however, since that's the biggest java disadvantage.
Hotspot (Windows JVM) is not just an interpreter. It's a highly efficient JIT compiler. With -server enabled, it's quite smart, filtering out useless code that even gcc would miss. (the usefulness of this is arguable; you're not supposed to write useless code :p )

You can't expect the same level of performance out of an interpreter like JamVM, which doesn't compile anything. Mind you, with the drop in performance there's also a drop in memory usage.

I doubt RAM will be an issue. JamVM has a miniscule amount of overhead. (500KB?) Most C/C++ homebrew games are probably going to use anywhere from 5MB to 40MB of RAM; even Java can't bloat that beyond the Pandora's 256MB.

Raw game assets like sprite sheets, level layouts, sound/music, etc. shouldn't be any larger than in a language like C.
 
Last edited by a moderator:
"Most C/C++ homebrew games are probably going to use anywhere from 5MB to 40MB of RAM" <- that is a very strange statement. It is better stated:

"Most homebrew games are probably going to use anywhere from 5MB to 40MB of RAM"

ie: With C/C++ the compiled code overhead is generally very small; the real stuff is in the assets (audio, art, etc).

With java there is of course the overhead of the interp and the whole java library that comes with it (ie: One of the big advantages of java is that it comes with a giant always present API. That is of course, also one of the negatives.. advantage to devvingt, disadvantage to deploying.)

But cutting to the chase, the overheads in size are basicly irrelevent nowadays to the overall assets and to the storage size available.

The real overhewads are to 1) installation ("hey, you need this java interp too", though I'd suggest bundling it with the game to make it easier), and 2) performance overhead .. remains to be seen, as it varies _wildly_ by VM and platform for java. Really, the question is.. which VMs will be available at all, and are they turned for ARM?

So anyway, the 'language overhead' is mostly moot, but triply so for C/C++.

jeff
 
The official website is at http://bennugd.org/
But I would recommend sticking to the new english community at http://www.bennugd.co.uk/ if you want to discuss Bennu instead of the official forums.
Reason: It's more active than the official english forums. On the official forums it's almost only activity in the spanish section.
I was aware that Bennu had risen from Fenix's ashes. The whole break up and lack of English documents rather put me off. As my spare-time coding comes in little periods of enthusiasum so fenix was lost to me. Others however have done great things with it :)

I'm not going to bother cross-compiling on my computer because the Pandora is probably more powerful than my computer anyways. :rolleyes:

Anyways, I would recommend learning C++ with the tutorial at http://www.cplusplus.com/doc/tutorial/

Had a quick scan of the syntax. Nothing particually unusual until I hit Polymorphism. Then the next thing I remember was picking myself up off the floor with blood flowing from my eyeballs. In not more than 10 words WTF is Polymorphism?
I can't wait... well actually I can! I'm getting rather good at waiting for things. Tell him not to rush any time in the next 2 months will be fine. :D
Haha, isn't that the truth :"] I can't imagine working in anything else but C now, even for very small and simple things - the amount of code wouldn't be any larger or less readable than in 'quick' languages either, with the useful bonus of having total control over everything that moves.

I'm more and more interested in scripting as a means of content creation though, everything has its place that's for sure.[/quote]SQDEF man...<star struck>Lovin' your work man</star> :wub:
 
Last edited by a moderator:
I'd like to see a good game-scripting language that works with the Pandora. I'm good with 2D art and 3D modeling, game logic, stat balance, object placement, level design, etc. My programming is good enough to get the job done, but I'm shaky on a lot of the lower-level calls.

Check that, a good scripting language and a really good set of tutorials. If the education is good, and sufficiently 'hands on' I can get my head wrapped around it. If it's "Here's your WYSIWYG scripting editor" and then nothing else it might as well be in Navajo.

One of the Game Maker clone projects would be interesting, but they all seem to have fallen flat.
 
Back
Top