Quantcast
Channel: Small Basic
Viewing all articles
Browse latest Browse all 669

3D RayCaster Maze - Featured Small Basic Game

$
0
0

Check out this fantastic 3D real-time game (that runs online)...

 

3D Color RayCaster Maze - by Old Basic Coder

 

From the creator, Old Basic Coder...

I made a "3D Maze" type program as an exercise. Had not programmed anything for about 25 years, fancied getting back into it, and downloaded the free version of Visual Studio. It popped up with the option of SmallBasic, so I thought I'd start there first.

My first attempt at the 3D maze has been uploaded to program ID - DWV967

However, I wanted to develop this further into something that resembled the old Bard's Tale games and have some simple textured walls/graphics. But couldn't work out how to transform and project the textures in software alone. I then read about RayCasting being an efficient method of portraying a simple pseudo 3d world made from blocks, with the ability to map simple textures.

Found a tutorial at lodev.org with some sample C++ code. I eventually worked out how to translate this into Smallbasic (have never coded C++ before!!) and managed to get the basic engine working.

After that, I made some improvements to the code (though it is still a bit messy, could probably be optimised and needs more annotation), and included colour shading that gets darker the further away the walls are.

My RayCaster Maze has been uploaded to program ID - RVR504 

FIrst Version - BRS931

It's probably not running fast enough to include textures within Small Basic, which would probably benefit from some type of screen buffering (double buffering?) but am now very keen to see if I can port this to my Nexus 7 using "RFO Basic!", include textures and eventually some basic RPG elements too.

 

I would love to see the RPG elements too, like characters who give you hints in the maze or random enemies that pop up.

I issued the challenge to the community in the Small Basic forum to improve on the maze:

Small Basic Community Challenge: Want to turn this 3D Maze into an RPG?

 

Great job, Old Basic Coder!

   - Ninja Ed


Viewing all articles
Browse latest Browse all 669

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>