ForsakenX / forsaken

Forsaken game engine
https://forsakenx.github.io
Other
154 stars 30 forks source link

Port forsaken to run on ARM / Pandora open source gaming hand held. #255

Open chino opened 11 years ago

ptitSeb commented 11 years ago

I've started that. I can build now a GLES / ARM / NEON build, but it Segfault when trying to draw menu. Still something wrong, not sure if it's EGL/GLES context creation or the ARM build.

chino commented 11 years ago

Ah that's awesome!

Although I don't actually have a Pandora so I ran into a road block supporting this.. Would be interesting if it was possible to emulate the platform on my system?

Did you have to make any changes to get it to work on GLES ? The main gl renderer is still immediate mode but there is support for gl2 and some for gl3 context (that still has issues) but I imagine it was minimal changes.. Would be nice to have a render_gles.c or conditionals in render_shared.c to support a GL_ES mode ..

When you say NEON are you talking about this ? http://www.arm.com/products/processors/technologies/neon.php That's interesting but I don't think that Forsaken would automatically take advantage of any special SIMD instruction sets unless the compiler is enabling them for you?

Good stuff though...

Have you joined the chat at all? Or if you want you can email/chat with me if you want to talk about this outside the ticket..

chino commented 11 years ago

Oh also the only advice I can give here would be to run the game through gdb if possible to get a stack trace and debug what's happening ? Gdb also supports running in a server/client mode so you can actually debug the hand held from your other system..

ptitSeb commented 11 years ago

I had some issue with unaligned float access, giving me some "bus error", so I converted some code. About NEON, I haden't done any SIMD adaptation for now, just will do if it's too slow. For GLES renderer, I use some #ifdef HAVE_GLES and change immediate mode of GL1 renderer. I still have segfault on the Pandora, when it want to draw, so I started debugging on a Linux PC (it's faster), using MesaGL with GLES to emulate GLES graphic card, but there it half work (I have problem with textures, but I also have the same problem with full OpenGL renderer, so it should be something else).

I think I will fork your repo to work on the GLEs renderer, than I'll do a pull request when it's done.

Chat ok, but where?

ptitSeb commented 11 years ago

I'm making progress. I'm going in the menu now (I had a silly mistake, it's glColorPointer(4, GL_UNSIGNED_BYTE, blabla) and not glColorPointer(4, GL_BYTE, blabla)... That was segfaulting. Here is the actual menu from the Pandora:

preview2

It "Bus Error" when starting a game (and the little picture of the level is all white also). More unaligned access of float I guess. I'll do some grep of (float *) to hunt more of this and change them by some memcpy.

chino commented 11 years ago

Forking is great! If it's ok I'll probably want to clean up a few things to follow our conventions before we merge back into the mainline.

I would love if the fork could run cleanly in it's own branch and merge back into master .. I put together a walk through a while back that shows how to nicely fork and send pull requests if it's not too much of a hassle https://github.com/ForsakenX/forsaken/wiki/Contributing

If you need help I would love to setup my system to use Mesa GLES as well so I can document and add support for building in that mode.

Did you use to play Forsaken online? Have friends who want to play too? Or are you just here for the coding fun?

Thanks for helping out with this!

chino commented 11 years ago

Oh btw the wiki explains how to reach the chat https://github.com/ForsakenX/forsaken/wiki

We're over at #forsaken@irc.freenode.net

You can also reach me on google chat/hangout or email me directly if you desire.

ptitSeb commented 11 years ago

Ok, great. I'll follow the wiki and make a fork and a gles branch and so on...

I never played Forsaken online (but I remember playing the single player part). I started this for the coding fun, but if can port it to the Pandora, there surely be some more online player coming, the Pandora has a small but very active community !

ptitSeb commented 11 years ago

Making good progress. Single player is playable now. I haven't tried multiplayer yet. I'll do some public or closed beta now on the Pandora (not sure which one), because I think it may "bus error" on later level... preview1

In the mean time, I'll fork and do all the pull/push and so on here.