Wednesday, December 04, 2013

2D + 3D = ^_^

After some clean-up and tweaks, I got the 2D+3D setup properly initialised in my test level. Nothing useful rendered so far: just a NeHe tutorial triangle that rotates as you press the DPAD in various direction without interfering with the 2D game. I still have to re-arrange memory banks before I can get textures, though. And I'll have to move around the owl-school background which was currently mapped on the "BG0" layer, the only one capable of 3D.

Quelques règlages ici et là, et j'y suis: un premier polygone (non-texturé) affiché en symbiose avec le moteur de jeu 2D. Tout ça fonctionne évidemment mieux quand on essaie pas d'activer la 3D à 3 emplacements différents dans le code. Je vais devoir à nouveau ré-organiser quel-layer-est-utilisé-pour-quelle-fonction ... ça devient un brin lassant, je vais faire une couche d'abstraction, ce coup-ci.

That starts sounding like I should introduce an abstraction layer so that the following things manipulate a "logical background" rather than physical registers directly:

  • setting up map/tile VRAM addresses in GameScript
  • scrolling registres in InfiniMap
  • setting priority in runme
There was activity about the controling log display this summer ... It should allow me to flip between BG and log quite transparently.

edit: huzzah! it works!

edit: game engine fix is done. Runme adaptation will have to follow (and will likely be a bit more tricky). Real bugger will be the "fade sequence" which used BG1 (now used as "farground") to hide the screen content while re-loading the level ... I'll have to use another technique like window registers.

3 comments:

cyborgjeff said...

et tu penses faire quoi par exemple... des effets d'éclairage ?

PypeBros said...

Still have to make it work on TheRealThing (tm), apparently ToT

PypeBros said...

http://sourceforge.net/p/dsgametools/code/1351/tree//trunk/SchoolTest/source/game.cxx?diff=51af3f955fcbc94513d6ec1b:1350 makes it work.