Calculator Community > Calculator C

[Ndless] Help with bottleneck on color calcs only

(1/10) > >>

Matrefeytontias:
Hi guys,

I've been working on nKaruga since quite some time now, and although it's reasonably fast on monochrome TI-Nspires, it's accurately twice as slow on color calcs, although it's the same code running and that the monochrome screen is being configured in 16-bits mode by the game.

I have no idea why it's like this, I keep trying things and nothing changes. I even removed every drawing command except the screen update and the ship, and the speed stays the same. Since I'm really, really stuck, I thought of asking you guys.

The full source is here : https://github.com/matrefeytontias/nKaruga

It's also possible that it's n2DLib's fault, since it's used to interact with the screen : https://github.com/n2DLib/n2DLib

Feel free to fork it and submit PR, I'll be very happy to see things fixed because I don't know what to do.

Also, I have no color calc to test, only monochrome. Several people made tests for me.

Vogtinator:
Does nspire_emu show the same symptoms?

Matrefeytontias:
Nope, nspire_emu tells me the game is equally fast on both screen types.

Vogtinator:

--- Quote ---I've been working on nKaruga since quite some time now, and although it's reasonably fast on monochrome TI-Nspires, it's accurately twice as slow on color calcs, although it's the same code running and that the monochrome screen is being configured in 16-bits mode by the game.
--- End quote ---
So you don't handle those different LCDs differently? Using the monochrome LCD in 16bpp mode like a color one looks awful.

aeTIos:
I've run a few tests and I'm fairly sure it's n2DLibs sprite drawing function. I already did test IkarugaX for you, and the time-to-scroll-sprite-over-screen time is almost the same, namely 06:55 seconds. When I take away the fullscreen pic on the background, it's suddenly three times as fast: 01:91 seconds. It was mentioned on IRC that the first versions of n2DLib (nFastGraphX) supposedly were faster (jetpack impossible 2). This has been proven wrong by porting the source to the newest version of n2DLib, see attached files. Hayleia told me that pictures are drawn to screen by copying them pixel-by-pixel to the screen. I don't know exactly what the nspire can do and what not, but I think you'll have to thoroughly re-think the way you are drawing sprites.
I really hope you can fix the lib though, I love how easy to use it is.


EDIT: Of course, this does not explain why it is almost twice as fast on the b/w series nspire, but because both methods for drawing (both with and without buffer) are about the same speed (should I say slow? that'd be a lame joke), maybe it's the display driver? O.O But no, that's ridiculous, gpsp can run F-Zero at much higher speeds <_<

Navigation

[0] Message Index

[#] Next page

Go to full version