The Geek Biker

Rambles of a geek that rides a bike

Java ASCII Maze game

Every now and then I get an urge to code. But I don’t care about the big long lasting-big thinking projects. Just something to keep me busy. So I thought I’d get my hands dirty in the world of ASCII mazes.

I’ve used libjcsi before in the past when I write TextWorld. It is pretty awesome and easy. So lets step through it.

So I’ve started Netbeans and started coding away without any planning on where I’m going with this.

/*
 * A small little game for me to ponder over and play around a bit.
 */
package asciimaze;

/**
 * The uber main class.
 * @author Tertius
 */
public class AsciiMaze {

 /**
 * @param args the command line arguments // meh- won't need these.
 */
 public static void main(String[] args) {
 // TODO code application logic here
 }
 
}

Cool…so probably need to download and start importing the libjcsi packages. Initialise it and use it.

So, what did I end up with for now:

/*
 * The uber main class
 * and open the template in the editor.
 */
package asciimaze;

import net.slashie.libjcsi.ConsoleSystemInterface;
import net.slashie.libjcsi.wswing.WSwingConsoleInterface;

/**
 * Still the uber main class
 * @author Tertius
 */
public class AsciiMaze {
 //Initialised this bad ass ascii interface. 
 private ConsoleSystemInterface csi = new WSwingConsoleInterface("Ascii Maze");
 /**
 * @param args the command line arguments -- meh, not going to use this
 */
 public static void main(String[] args) {
 //Need to initialise stuff
 //Need to create a map
 //Need to save the map into some sort of buffer
 //Need to get the key pressed
 //Need the check where the dude is going to move to
 //Need to check if the dude can move there
 //Move the dude if all is well on the western front (all fronts really)
 //Do some more buffer stuff
 //Probably need to put all of this in some sort of a loop.
 }
 
}

Think I’m almost done.

 

 

Advertisements

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: