Programming On Pandora


WizardStan: thats all good if all you want to do is use SDL. Please make it work for OpenGL ES and OpenAL .. on Windows, Mac and Linux.

Okay, now you've realized how much work you have to do, maybe you'll see why compiler-on-board is the best 'quick solution' to the development tools issue .. for now .. when someone has done all the work of getting a full-blown SDK working on Win/Linux/OSX that includes all the PandoraOS libs, it'll be a different - hopefuly single-click-to-install .. situation. But for now, the easiest, quickest way to get things happening for Pandora is use the onboard compiler.
 
Timstertoo said:
This I didn't know. I thought the next version would simply be Py3. I did notice that Pygame would be a nono for a bit with Py3 but I didn't realise the incentive for them to step it up would be quite that far away.
Nope, Py3 actually came out with Python 2.5, so it's been around for quite a while. Someone on the pygame list has ported it to py3 I believe, but it's not official yet.
 
Last edited by a moderator:
torpor said:
WizardStan: thats all good if all you want to do is use SDL. Please make it work for OpenGL ES and OpenAL .. on Windows, Mac and Linux.
I haven't got the 3D drivers working on my BeagleBoard yet, so I haven't bothered to build the OpenGL ES tools, and I have no idea whether OpenAL can even be compiled for ARM as I've never looked at it.
To compile on Mac, just download GCC cross compiler (for Mac), decompress the library I already posted, and update the Makefile I posted with the proper directories.
To compile on Windows requires Cygwin (the only chink in the cross-compiling argument), but otherwise is the same; just download GCC cross compiler (for Cygwin), decompress the library I already posted, and update the Makefile I posted with the proper directories.
(note, that GCC is a few years out of date, probably won't produce the best executables, but it's easy to download and setup. Someone (probably me, eventually) will gladly build the latest GCC for you, eventually)
torpor said:
Okay, now you've realized how much work you have to do, maybe you'll see why compiler-on-board is the best 'quick solution' to the development tools issue
Did you miss the part where I said that the development libraries on the Pandora will be the exact same as the ones that you would plug into a cross compiler? Yes, it's a lot of work, but the work to make those development libraries has to be done whether it's going into a cross-compiler or onto the Pandora for on-board compiling. If you build the libraries via cross-compiler like I did, then it's actually more work copying them onto the Pandora (just a little bit, it's not hard to copy files)
I don't know why you're still arguing against this. Try it! It isn't nearly as hard as you seem to believe it is.
 
Last edited by a moderator:
In my experience, it can be fairly difficult to set up a cross-compiler with the appropriate environment, even on Linux. I wanted to compile stuff for my iBook a while ago, and after spending a good bit of time trying to get crosstool etc. running, I eventually just decided to compile stuff directly under Ubuntu there.

On the other hand, the Rockbox developers have a script that automatically downloads and builds the whole toolchain needed to compile Rockbox for any of the supported players, and that's quite easy to use. I suspect someone well-versed in such things would have no trouble writing something like that for the Pandora.

So the difficulty of cross-compiling can be pretty much eliminated. For this reason I don't think a compiler is necessary in the standard firmware image, since space is limited. Of course, an image or a package that does contain a full development environment should be provided, because in many cases it can be more convenient directly on the device.
 
Try it! It isn't nearly as hard as you seem to believe it is.

Did you miss the part where I've tried this (every year for about 25 years) and have still come to the conclusion that no matter what you think, having a fully working compiler *onboard the device* you're targetting is the best way to get stuff built for that target?

I *know* I can 'just cross-compile all the libs' and 'bring it all together to a nice fancy IDE', but the work required to do all that is exactly what I'm avoiding when I just compile-onboard. I have cross-compilation environments for Angstrom, N900, Zii Egg, iPhone, a few ARM devboards, the SmartQv7, a Touchbook, and a Freerunner: all on the machine in front of me. I do not want this administrative responsibility any more, because these machines are more than ample to support their own development ..

A 450mhz Touchbook can compile my 30,000-line app in about 45 seconds. Since I have the device working in front of me, once it builds once, the wait between new builds is insignificant .. in fact its rather slick to have all these devices build their own apps concurrently. Why support a single monster SDK-machine when the machines can build from the same sources concurrently in the first place ..
 
My ultimate dream would be something similar to Multimedia Fusion being made for the pandora. That was ultimatley favorite programming language :rolleyes: sigh...
 
torpor said:
Did you miss the part where I've tried this (every year for about 25 years) and have still come to the conclusion that no matter what you think, having a fully working compiler *onboard the device* you're targetting is the best way to get stuff built for that target?
I never said it wasn't. I'm arguing against you saying that cross compiling is not a good way of doing it, and pointing out all the flaws in your arguments. I have no idea why you haven't been able to get it working in 25 years, but it took me all of 15 minutes to get a dev environment for my Beagleboard up and running. The executables are almost always perfectly compatible with the Pandora.

torpor said:
I *know* I can 'just cross-compile all the libs' and 'bring it all together to a nice fancy IDE', but the work required to do all that is exactly what I'm avoiding when I just compile-onboard. I have cross-compilation environments for Angstrom, N900, Zii Egg, iPhone, a few ARM devboards, the SmartQv7, a Touchbook, and a Freerunner: all on the machine in front of me. I do not want this administrative responsibility any more, because these machines are more than ample to support their own development ..
I already gave you everything you need to cross compile. I don't know how much simpler it can be made. Untar gnuarm to a directory, untar the SDL library I posted earlier, and with the Makefile I posted, just write your apps exactly the same way as you do right now targeting the machine you're writing on. Adjust makefile as needed. Maybe a script which does these few steps for you?
edit: Furthermore, as I've been trying to tell you, you don't need to cross compile the libraries. If they already exist on the Pandora, just copy them off of that onto your desktop. When you create a project you need to specify which libraries are to be linked in, so how is it in any way more difficult to do so on your desktop than on the Pandora? Assuming you're using the same IDE, it's the exact same steps, just a different directory.
 
Last edited by a moderator:
torpor said:
Try it! It isn't nearly as hard as you seem to believe it is.

Did you miss the part where I've tried this (every year for about 25 years) and have still come to the conclusion that no matter what you think, having a fully working compiler *onboard the device* you're targetting is the best way to get stuff built for that target?

I *know* I can 'just cross-compile all the libs' and 'bring it all together to a nice fancy IDE', but the work required to do all that is exactly what I'm avoiding when I just compile-onboard. I have cross-compilation environments for Angstrom, N900, Zii Egg, iPhone, a few ARM devboards, the SmartQv7, a Touchbook, and a Freerunner: all on the machine in front of me. I do not want this administrative responsibility any more, because these machines are more than ample to support their own development ..

A 450mhz Touchbook can compile my 30,000-line app in about 45 seconds. Since I have the device working in front of me, once it builds once, the wait between new builds is insignificant .. in fact its rather slick to have all these devices build their own apps concurrently. Why support a single monster SDK-machine when the machines can build from the same sources concurrently in the first place ..

Nope, still not making any sense at all.
 
Last edited by a moderator:
lol, I don't understand why torpor has had to work so hard to get support for his idea. My angle on this (different to torpor's, I realise) is that we should be encouraging anything that will make the first steps into coding as painless as possible (whether it's an on board compiler, tutorial apps, SDK etc).

When I was 12, you could pretty much turn your computer on and start writing code on the command line. Then you ran it. If you'd started talking to me about toolchains and cross compiling back then, I would have said GOTO Hell and started playing Arctic Fox. I know what some people will be thinking. Kids are so lazy, if they can't ask a few questions on forums, follow some links, download and install a few things, then what hope do they have of committing to a coding project? But all these things are perceived barriers to newcomers, like it or not.

There's been a lot of talk about how Pandora is a flashback to the golden era of British computing. I wonder if the 80s would have produced what they did if every kid with a Sinclair or Commodore had to attend a meeting, read a book and send off for a bunch of disks just to write their first Hello World. Wasn't part of the magic the fact that so many people found themselves creating things, without ever having set out to become programmers? Obviously there's a sentimentality factor here, and we won't have the glorious simplicity of turning on our computer to see a PandoraBASIC cursor flashing back at us.* But wouldn't it be cool to adapt that old approach to the modern context as best we can, remove some of the hurdles and see what happens?


*Dunny may challenge this sentence.
 
My first programming experience (DON'T laugh) was HTML and Visual Basic!! VB and HTML was AWESOME back when I was 14!!
 
I've got to say, I agree with Gruso and torpor.

Though I could never really get into programming when I was younger, I remember trying out some stuff in BASIC when I was six or so, and it was certainly neat to see what had been written running shortly thereafter (for the curious, it was "REM Bouncing Ball" thing in the manual for the Commodore 64 C - I only remember the name and what it did, now, and that is the extent of my experience with any kind of programming :p).

For someone like myself, who would like to at least try to learn something new, the hassle of cross-compilers and whatnot is far too big of a barrier - and, to me, they seem odd, since the computers I grew up around could be coded on in the way Gruso describes. It would be nice to see if I could actually learn to make something without having to risk fouling up my main computer whilst setting up something I know I'm not experienced enough to deal with (the first step to learning is saying "I don't know.", and all that). I'm sure that this notion will be scoffed at by someone saying "You can't foul it up anyway", but the point is that that's the perception. :p
 
Gruso said:
lol, I don't understand why torpor has had to work so hard to get support for his idea. My angle on this (different to torpor's, I realise) is that we should be encouraging anything that will make the first steps into coding as painless as possible (whether it's an on board compiler, tutorial apps, SDK etc).
I'm on gruso/torpor's side (prometheus too it looks like.) Part of the reason I haven't developed anything for the DS / Wii is just because I don't want to go through the trouble of setting up a cross-compiler. It's different on different systems and it's confusing to set up sometimes. I'd MUCH rather just have a compiler on the Pandora, and that's likely what I'll do. I like to just set up a WinSCP session with my dev computer to the target and have it auto-update when changes are made, so I can just save my work in the text editor on PC and then pick up my Pandora and hit compile and maybe go watch TV and watch it compile or something. and if there's a slight error I can just launch vi on the Pandy and make a quick fix and recompile. Sure it'll take longer to compile than on a desktop machine, but it's not like we're making incredibly complex stuff that will take hours to compile anyway.

I'll probably set up the cross-compiler on my desktop, but if I want to just whip out my laptop and quick-edit some code I still want a way to compile it, and having the compilers and all the libs on the Pandora's the easiest way to do that.
 
Last edited by a moderator:
15 minutes to get a dev environment for my Beagleboard up and running

Ermm .. without OpenGL ES, without Sound, without libPND support, etc. Sure, you can do all that setup, but even in 15 minutes, with compiler-onboard, I'll get some code actually written, not just spending time setting up my environment. Geeze. Boring!
 
torpor said:
Ermm .. without OpenGL ES, without Sound, without libPND support, etc. Sure, you can do all that setup, but even in 15 minutes, with compiler-onboard, I'll get some code actually written, not just spending time setting up my environment. Geeze. Boring!
With sound, and I've got the OpenGL ES dev library as well, I just can't do anything with it because I still haven't gotten the 3D driver working on my BeagleBoard. Not sure what libPND has to do with it, but if it's available on the Pandora, then I'll add an extra 30 seconds to my setup time to copy it from there into a local directory if it'll make you happy. If there are any other libraries you think are missing, I'll copy them all at the same time, as part of that 30 second setup.
You're making excuses again, poor ones. You seem to be very against this for seemingly no reason. Why? Should we start into "show me on the doll where the cross compiler touched you?"
 
Last edited by a moderator:
You can do it both ways and I understand why people prefer to build directly on a target instead of using a cross-compiler beast.

While I would not waste space on the Pandora image by including dev files, I think theres nothing against gcc on the NAND and a "development SD" with a dev environment (headers, static libs, ...). If you want to develop on the Pandora, just download the precompiled@Pandora dev-tree, copy it on a SD-card, mount it and you have a working toolchain. And for wear-paranoid people (like me): extract it on your Desktop, export it via NFS, mount it on the Pandora ... done.

With such a package, you don't have to setup your cross-compiler, configure and compile all libraries and dependencies, ...- you can just start. The Pandora is open, so the community can easily create such a toolchain/SDK.
 
joce said:
i know you can program on Pandora, but what of those who don't know how? i would like know if there is any kind of program being made to teach programming on Pandora

Again, sorry to get back on topic for a while(not that cross-compiling isn't an interesZZZzzZZZzz... ting subject!): I am an amateur coder myself(self taught) and one thing that you should keep in mind is that "programming" is not equal to "game development", and not even to "software development". In fact, under certain platforms you don't need to know programming in order to make a game, though it can't hurt, and even if you know how to code, developing any app takes patience, planning, and some non-programming related skills. This is not meant to discourage you, but rather to emphasize that you don't need to be an accomplished programmer to be a homebrewer(though it does limit your options). Having said that, if you want to learn programming, your best option is to start with something relatively high level like python or javaScript, and if you're interested in graphics, to me processing is your best option. Also, processing gives you the more simple layout in terms of getting your code to run without having to deal with any bureaucracy such as compiling your code or keeping track of where your libraries are located(of course, if you want to move on to more "serious" languages(I stress the quotation marks) you'll have to deal with those things in due time. Personally, not my favorite aspect of software development). Here are some links:

http://processing.org/

that's the official processing site, you can download the IDE(integrated development environment) from there, and start toying with it right away. also on that same site there's some tutorials to get you started, but I think the most helpful material is on the books they sell.

http://python.org/

Python is a great language, and one that has been used for a very wide spectrum of things, from application scripting to server-side web development, so if you're fluent in Python you can put your skills to work in a lot of ways. Also, it is simple, and fun, to learn. Personally, I learnt python with this book:

How to Think Like a Computer Scientist

But apparently that book evolved into this one:

http://www.greenteapress.com/thinkpython/thinkpython.html

Which I haven't tested yet. Other links have been supplied for game development resources on this very same thread so I won't repeat them. Also, the official python documentation comes with a tutorial, and there are tons of free books out there. Probably the best documented of my suggestions.

Finally, javascript, believe it or not, is another great language, and one which requires absolutely no installation of software since a full fledged javascript interpreter comes bundled with whatever web browser you're using(unless you're on something really arcane). Sadly, there's a lot of poorly written js tutorials out there, but THIS one is pretty great, and assumes no previous programming experience:

http://eloquentjavascript.net/

it is beautifully done, with an interactive console so you can play with the examples right away. Once you're somewhat confident in javascript, or at least with programming, I'd recommend to look for Douglas Crockford's videos online, which are very interesting.

http://yuiblog.com/blog/2007/01/24/video-crockford-tjpl/
http://yuiblog.com/blog/2006/11/27/video-crockford-advjs/

Now, you might think javascript is only good for webpages, and you might be right, but the fact is that there's a very very cool new HTML element called <canvas> which is coming in html5, but is already implemented in Mozilla, Chrome, Safari and Opera(basically everything but Internet Explorer, though there's a plugin for that), that lets you do graphics in the browser. You can check out what people are doing with it on this site

http://www.canvasdemos.com/

In fact, if you learn processing, there's even a javascript/canvas implementation of it!

http://processingjs.org/

So that's that. I'm sorry if all these seemed to patronizing, I was assuming that A) you're really new to programming B) you want to code games.
hope it helps.
 
Last edited by a moderator:
Oh! And I forgot this: one tool that let's you develop 3D games without writing a single line of code is the multipurpose open source 3D modeling tool Blender, which you can find at

http://www.blender.org/

It features a game engine whit a system of "logic bricks" that lets you define the behavior of your 3D objects without resorting to programming(though you can extend its functionality with Python scripts). To learn blender, yes, RTFM:

http://wiki.blender.org/index.php/Main_Page
the official blender wiki

http://wiki.blender.org/index.php/Doc:Manual
the official blender manual

http://wiki.blender.org/index.php/Doc:Manual/Game_Engine
the game engine reference

http://wiki.blender.org/index.php/Doc:Tutorials/Game_Engine/BSoD
a beginners tutorial for the game engine

http://wiki.blender.org/index.php/Doc:Tutorials/Animation/BSoD/Character_Animation
a GREAT introductory tutorial to Blender. It doesn't cover the game engine at all but it is really a great way to get acquainted with Blenders basic commands and animation features, as well as its great-but-non-intuitive user interface.
 
You're making excuses again, poor ones.

Time to set up your system: some 30 minutes faffing around.
Time to use compiler on-board: 3 seconds to transfer a tarball, 30 seconds to run make and watch it build, 1 second to run it.

The excuse: there are none, I just prefer it. You are happy with your setup and maintaining all that stuff on your one PC, I'm happier having the machines themselves involved in their own porting ..
 
Just use Python. IIRC it's already on the NAND, so you just need 10 seconds to open a terminal and start the interpreter.
It's even slow like BASIC, so you can be nostalgic about it, too.
 
Back
Top