Pandora LUA Game Engine


CptnRoughnight

Still Fresh
Joined
Apr 17, 2013
Messages
26
Age
37
Location
Germany
Hi,
since my last post some moons have passed. I thought today,for this beautiful sunny Sunday I fire up some C++ and SDL again .... have linked this with LUA and run on my Classic Pandora.
The goal of this endeavor will be to create a complete 2D engine
for this awesome device.

A PND to play them all.

As often as possible I will try to make updates as far as possible until I'm able open a public repo on Github.
But I want to be sure that I am not disgracing myself ;)

So far, enjoy the video. And yea... the main thing to ask is, is there interest in such a thing?

greetings


Update :

So, I've been playing around with some features. I've currently added simple but slow pixel manipulation, loading maps from csv files, generating maps via Simplex Noise. I've also played with RenderTargets and Window Modes and apparently the borderless windowed mode is the efficient one.


Here's the Simplex Noise Test... Full 800x480 windowed "fullscreen" with generated map of 2000x2000 "tiles" á 1x1pixel... at ~ 140fps... This is now a "static" map, a Texture... therefore changes could be slow... but I will try some stuff to speed up.


The second demo is again Simplex Noise generated Map, but none-static (you can freely access any tile).. with 24x24 tiles at ~98 fps. On my opinion is 24x24 by a resolution of 800x480 the best, but it's not hardcoded ;)

The next days will be refractoring, cleaning code and making a little playable example.
 
Last edited:
Ok, I tried ptitSeb CodeBlocks to use SDL2... but wow... I load a spritesheet of 64x64 (4sprites) and display all 4 of them
1000x per frame... with SDL1.2 (last video) I got roughly 35fps.... but with SDL2 i got 3-5 fps.... Is there some tweaks I'm missing?

I've tried with RenderTargets, but then I got nothing on screen and therefore a slightly higher fps. Is there a special Pixelformat i must use,
or doesn't the pandora support this?

I don't mind only supporting SDL1.2 since there are libs in the repo but there are some nice features in SDL2.

So if someone could point me in the direction to increase the performance of SDL2 a little bit, that would be great!

As of tomorrow I'm on vacation and after that moving to new home, so time is rare.

But I will regularly visit this forum, and maybe I find some spare minutes to write some code.
 
iirc the SDL 1 libraries on the Pandora were highly optimized for the hardware. This is still software rendering with SDL2, right? Basic optimization such as using the right surface format apply of course, but I wouldn't know how big the expected performance difference on a vanilla SDL2 should be. Using the newer rendering functions would be recommended, but I never used them, so not sure why they're not working for you.

I'm only using SDL2 with raw OpenGL myself, so I guess I'm not much of a help here. 4000 sprites per frame is quite a bit, though.
 
Huge Update.....
I've tackled things myself and have a success! I compiled SDL2-2.0.2 and SDL2-image from scratch. using the hack from ptitseb http://zedcode.blogspot.com/2013/06/building-and-using-sdl2-on-pandora.html
then I got some problems with the keyboard layout... and with the https://repo.openpandora.org/?page=detail&app=change-keymap-0.1-slaeshjag pnd I've changed to de and it runs...

compiled my test project and there are now ~22fps without renderTargets ~41fps with rendertarger to 240x200 all with 1000x4xImages of my spritesheet.... I call this a success.... No I have peace on my vacation :D

Will write a howto as soon as possible.

greetings!
 
Back
Top