Hey guys,
I recently decided to rewrite an old platform game of mine, made in Blitz on the Amiga, in B3D.
I had previously started writing it in C/OpenGL a while ago, but gave up because model loading in C looked like a nightmare. Anyway, that's beside the point.
The first task in both the B3D and OpenGL versions was to load a level from a map and draw it on the screen, in the same way as a 2D platformer, but to give each tile depth, as shown in this screenshot from the OpenGL version:

In OpenGL this was relatively easy - simply draw a cube for each square on the map, leaving out faces that were hidden by an adjoining block. In the OpenGL version, I drew the map with every frame, but drew only the 10x10 or so blocks around the player that were actually visible.
In B3D I tried the same method, but creating a mesh with every frame proved very slow. So I tried creating the whole map as a mesh, which I would just move as needed. The more faces I added, the more the level started to jerk when it was moved around.
So I'm now stuck wondering how best to create and display the level. My current attempt is available at http://www.fatweb.org/files/gf3d.zip (load and run gf3d.bb) if anyone would be kind enough to take a look and offer some friendly pointers?
TIA
I recently decided to rewrite an old platform game of mine, made in Blitz on the Amiga, in B3D.
I had previously started writing it in C/OpenGL a while ago, but gave up because model loading in C looked like a nightmare. Anyway, that's beside the point.
The first task in both the B3D and OpenGL versions was to load a level from a map and draw it on the screen, in the same way as a 2D platformer, but to give each tile depth, as shown in this screenshot from the OpenGL version:

In OpenGL this was relatively easy - simply draw a cube for each square on the map, leaving out faces that were hidden by an adjoining block. In the OpenGL version, I drew the map with every frame, but drew only the 10x10 or so blocks around the player that were actually visible.
In B3D I tried the same method, but creating a mesh with every frame proved very slow. So I tried creating the whole map as a mesh, which I would just move as needed. The more faces I added, the more the level started to jerk when it was moved around.
So I'm now stuck wondering how best to create and display the level. My current attempt is available at http://www.fatweb.org/files/gf3d.zip (load and run gf3d.bb) if anyone would be kind enough to take a look and offer some friendly pointers?
TIA