Wednesday, February 23, 2011

Pixel Bender, Molehill - Updates and Future Plans for Bengine

The new low-level Flash 3D API Molehill is about to launch, I don't know what it means for Bengine. For Bengine's voxel rendering, I only need a fast way to push all Screen Buffer to the Screen, though, a fast rendering algorithm is more important. Here I want to share some new demos and plans for Bengine.

First,  the game BengineRace. I added submit scores function, now you can submit three kind of scores: Best Racer for the time you spent to complete the game, High Scores for the total score you earn and Best Destructor estimate how many voxels you destroy or more specifically, voxels left in total. You must make through the game to submit scores for the first two and you can submit the score of voxels left in total at any time during the play. Press "X" to enter destroyer mode, energy required for destroying walls is limited. After you fell in holes or died, click "continue" to respawn, then voxels destroyed last time will still be contained in your final score.

Second, I made a 8-bit version of BengineRace and now have given up that idea. The advantage of 8-bit is that the screen looks "better" in a higher resolution because of fewer colors used, maybe it's more like a solid fill engine. Besides, less memory needed for storing the voxel data when you use a palette. The disadvantage is limited color choice and the trouble to design and make the palette. You can find the early build of the game in 8-bit here:
https://flaswf.googlecode.com/svn/trunk/Bengine/demo/8-bit/Bengine-8bit.swf
Some pictures:


Third, my attempt to render Voxelstein3D/Voxlap .vxl maps in Flash!
Bengine can render those maps in a low res at a slow speed.
Voxlap demo map:

demo:
https://flaswf.googlecode.com/svn/trunk/Bengine/demo/vxl/Bengine_voxlap.swf

Cave demo map:
demo:
https://flaswf.googlecode.com/svn/trunk/Bengine/demo/vxl/Bengine_cave.swf

Voxelstein3D map:
demo:
https://flaswf.googlecode.com/svn/trunk/Bengine/demo/vxl/Bengine_wolf.swf

And finally, new plan for Bengine. Bengine will be renamed to PBengine, which initially means PixelBender+Bengine but now represents for PreBengine(Editors)+PlayBengine(Game Core)+Benigne(Voxel Rendering Core)+PostBengine(PixelBender Post-Processing).
It will be a bigger project. I hope to exploit the advantage of Molehill through PixelBender in the future.
But what can PixelBender do with Bengine? Many many things, I have to say. I will mainly use PixelBender for various Post-Processing effects for Bengine. Here is a simple example showing what it will be like:
https://flaswf.googlecode.com/svn/trunk/PBengine/demo/water/PBengineWater_buggy.swf
Make sure try to interact with the water surface with your mouse.


In this demo, I use Bengine for rendering the voxels and PixelBender for the water effect. It is still buggy, the reflection is not correct. And it is terribly slow, only about 10fps in my test. I hope Molehill can make it faster. Optimazions of Post-Processing are needed, but it will be done when Molehill is available.

But how fast can Bengine be? I don't know. I'm still improving it. The rendering algorithm has been written for several times. In the past, after each written, I always thought may be it can not be faster any more. But I proved I'm wrong. Before I wrote this engine, I never expect a voxel engine like this can run at real time in flash, let alone making a playable game. So no one knows how fast it can be and how fast it will be. I will continue optimizing it. Here is the latest demo testing the rendering speed, with a slightly different rendering algorithm from BengineRace. In my laptop, it can render the same map from Bengine Race at/above 30fps.
The demo:
https://flaswf.googlecode.com/svn/trunk/Bengine/demo/speed-test/BengineSpeedTest.swf

PS: Controls for all demos mention above:
==========
W/up: move forward
S/down: move back/recharge speed
A/left: turn left
D/right: turn right
Q: look down
E: look up
----------
Z: max speed(speed*2)
X: max armor(to destroy walls)
C: max power(to fly)
----------
Space: fly
Enter: pause

2 comments:

  1. the speed run test ran an average of 18 to 24 on a Lenovo Yoga 2, not bad. Nice work with the water effect.

    ReplyDelete

Sponsors