GROG - Tech Demo

1.1

Par Alban, il y a 4 mois

Contrôles: Direction: [Flêches / ZQSD] - A: [J] - B: [K] - Menu: [U] - Home: [I]
Profitez des jeux à pleine vitesse avec son et lumières sur la Gamebuino META !
Emulateur par aoneill

G.R.O.G.: Graphics Renderer Optimized for Gamebuino

I've had this project going on since the release of my previous game, Project88. This is a proof of concept for a Virtua Racing-like engine. 

Although I am very proud of the performance level I have reached, I don't feel like I will build a game on this. What eats up CPU cycles is mostly the rasterization part, which I've tried to optimize to the bone, but not leaving many cycles left. On the memory side, my implementation is fairly light. I believe one could do a game like a space shooter, where triangles don't cover the screen, but this feels limited.

I've documented as much as I estimated relevant: specifics to the implementation, API usage, tricks etc. For 3D rendering 101, which is a huge domain, I suggest you have a look on the web at how transformation and projection matrices work, and how vertex buffers are usually used. You'll find all these notions put to good use in my code.

The link to the documentation is here: http://htmlpreview.github.io/?https://github.com/alban-rochel/grog/blob/master/grog/doc/html/index.html


Derniers commentaires

avatar
Alban
il y a 1 mois

I’m not sure this can be generalized (and I suppose it cannot), but I noticed this when working on the triangle rasterization loop, which is the most CPU-heavy part.

avatar
drummyfish
il y a 1 mois

Thank you for the answers! :slight_smile:

Wow, I didn’t know about this, gotta try it myself.

avatar
Alban
il y a 1 mois
  1. I forgot to add a license indeed. It should have been MIT
  2. Yes I have! And I also compiled with gcc 8.2.1, which provided a huge performance improvement compared to the gcc version attached to the Arduino IDE.
  3. No, I didn’t. I believe I could add this quite cheaply. I’ve relied on this algorithm: https://fgiesen.wordpress.com/2013/02/10/optimizing-the-basic-rasterizer/, which actually deals with the “top-left” part, but I overlooked it.
  4. I had in mind to be able to render full scenes, not just a rotating object, so having depth quantized only on 4 or 8 bits seemed a little risky quality-wise, and heavy memory-wise. I haven’t tried, so it may be a wrong preconceived idea. Sorting triangles is cheap, and, for the sake of the anecdote, I’ve had a look at games like Virtua Fighter 32X, which were very limited memory-wise, and I am pretty sure they work similarly.