PLAYBASIC SOURCE CODES


4 Way Map Movement (Moving through tunnels)

     This example lets the user navigate an object through a map. The object is only allowed to move in 4 directions and the object is assumed to be the same size as a map tile.

     The path ways through the map must also be a single block in size, so the object fits tightly. Normally this would mean moving through the tunnel would require pixel perfect navigation. To counter this, the movement code takes two approaches. Firstly, there's check to see if the object is able to move in the requested direction. So when the player presses up, we check the tile above, if that's empty they're allowed to move up. If that fails. We fall into a second phase, where we look at the tiles above and the left/right of our current position. If one of those is empty, then we then translate the user up request, into either a left or right movement. Which will slide them into position.

     Code built with PB1.64N beta 4 (may need changes for older versions)

4-Way-Map-Movement.png
#1
4_Way_Movement_Test.zip (13.5 KB)

Tree Parallax

     This little demo builds old school parallax effect with a bunch of trees, the effect is not the interesting part really. It's that rather than use images/sprites the tree images are converted into a font (CRF), so the rows of trees are drawn as strings..
Tree_Demo.jpg
#1
Tree_Parallax.zip (48.43 KB)

Tron

     This example is simple tron/snake styled game where the players must control the dot without it crossing over the trail it leaves behind. The version of the game uses line intersection to suss out the potential collisions, rather than the normal map/pixel method.

Tron_V001_Thumb.png
#1
Tron_V001.zip (4.57 KB)

Find Me

     A cool little radar inspired game.
find_me.jpg
#1
find me.zip (464.71 KB)

Lunar Lander

     A Simple (unfinished) Lunar Lander remake by Monkeybot using randomly generated landscapes.

     Use cursors for sideways movement and Space bar to thrust

Lunar_Lander.png
#1
Lunar_Lander.zip (5.36 KB)