The Geek Biker

Rambles of a geek that rides a bike

The pixel…it moves!

After struggling a good while to get c++ and netbeans talking, and figuring out how the netbeans ide is supposed to work, I finally got my hello world to compile.

Next stop, graphics initialization. Luckily with Allegro that is quite easy. And left me another hour trying to figure out how to get keyboard input working.

Once I got that under control, I start moving a pixel…that’s right…I got to move a pixel in the direction of my choosing. Some say I don’t have control over my life…well, I do over that damn pixel.

So I created an object : movealbeObject (good name hey!). Which now has a speed, direction, x and y coordinates. I assigned a new rectangle to another object called, gameCharacter which extends my moveableObject. Currently this one has a few more properties to be extended, it has bullets and a weapon.

I then did some work on getting my rectangle to shoot a pixel. This pixel will travel to the end of the screen and reset.

O yeah! So that is where I decided to go to bed. I got a rectangle that can move forwards and backwards, move direction and shoot one bullet.

I think the next step will be to create a bullet object. This should extend moveableObject and have some other properties like damage.

I will also need to start thinking about a weapon object. What kind of properties?

magazine size, fire rate etc.

But first, food.


I forgot about collision detection!!! Right…that will be my first task.


Leave a Reply

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

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

Google+ photo

You are commenting using your Google+ 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 )


Connecting to %s

%d bloggers like this: