Pyra Questions regarding optimizations for Pyra port (Slay The Dragons)


mati

Member
Joined
Mar 1, 2014
Messages
46
Location
Trier (Germany)
I wrote a simple Moorhuhnjagd clone with SDL2. Main goal was to have something that will run on the Pyra.
But it should also run on x86 Windows and Linux (with a gamepad).

Since it's a small 2d game and stuff like rotation or alpha transparency is not used, the first version I wrote didn't use hardware acceleration (only SDL_Surface and SDL_BlitSurface). Issues with that version:
  • Real fullscreen is not working on linux
  • Wasn't running smooth on linux, even though it was running with around 600FPS
  • The game was running smooth on Windows, but of course I don't really need 600FPS. I didn't know how to use VSync with this version (I guess it is only possible with hardware rendering)

Question 1: Why did that version not run smooth under Linux? My linux is still using X11, not Wayland. Would it look different with Wayland?​

I rewrote the code to use SDL_Texture and SDL_RenderCopy. My Windows netbook run into trouble with high texture dimensions. Because of that I make shure, that every texture is smaller than 2048px × 2048px. I read something about an OMAP fourthousandsomething that had exactly those limits.

Question 2: Will the Pyra be able to handle all texture dimensions up to 2048px?​

The version with hardware rendering is again running smooth under Windows, this time because of VSync with 60FPS. Under Linux real fullscreen is working now, but I had a lot of tearing.

Question 3: Is the tearing because of X11? Will the Pyra handle this problem?​

I read in the thread "2 Joypads on the Pyra. Easy?", that funkeyMonkey will somehow handle the transition from "using the analog nubs as mouse" to "using them as gamepad analog sticks".

Question 4: In my code I use SDL_GameController. Will funkeyMonkey be able to emulate such a X-Box-Gamepad-like device?​

What I pretty much want to know with all my questions is, if I still have to rewrite some C++ Code or if everything left to do is creating the DBP.

Source code and precompiled Windows executable:
Please tell me if the texts are strange or unintentionally spelled wrong. My english is not the best, especially not my pyrate english.

 

Attachments

  • screenshot-game.png
    screenshot-game.png
    70 KB · Views: 463
  • screenshot-menu.png
    screenshot-menu.png
    485.3 KB · Views: 472
Not sure on all the question, but:
Q1: Probably the lack of VSync caused the stutering.
Q2: Yes it will. The Pandora can too.
Q3: SDL2 is using OpenGL (or GLES), no mater if you use texture or not. So the good or bad vsynch is handled by your OpenGL driver mainly. Wayland is supposed to be better on that aspect.
Q4: Yes.
 
Q3: SDL2 is using OpenGL (or GLES), no mater if you use texture or not.
OK, I didn't really understand when/how exactly the graphics card is involved if you use SDL_Surface. So I guess this means, that both solutions use somehow hardware acceleration. The solution with SDL_Texture is faster (without V-sync it's running with around 1200 FPS on my PC). So I'm glad I did the new solution anyway.

Thank you for all answers. I will stick to my current code and wait for the Pyra to come out.
 
As an englisher, your texts read fine to me. The only question I have it about 'the analog sticks or nubs'; the pyra has nubs and a stylus. Are you referring to the nubs as being joysticks on other systems, or can you also use the stylus for one of the end points?
 
Thanks for the feedback.
No, you can't use the stylus in this game.

I just didn't know how to call the "analog nubs".
You can play the game with a gamepad (either connected to the Pyra or a PC). If I just call them "analog nubs", I think many people wouldn't know what I'm talking about, because everybody calls those little sticks on the gamepad "analog sticks".
If I just call them "analog sticks" it would be strange, because the Pyra is the main plattform I'm aiming for. And the Pyra doesn't have "sticks". It has "nubs".

So I ended up using both terms. Maybe I was overthinking and made it unnecessarily confusing.
 
Yeah, that's a valid argument. I do tend to think you should document things for the internal controls since we have them and let people using external gamepads to make the translation themselves though. I've never found it hard to identify the analogue sticks of a controller as the same thing as the sliding nubs on a PS-vita or Pyra type thing.
 
Back
Top