Using the Keyboard

First of all, I want to thank Antonio Villena (https://antoniovillena.es/ ) for his help, knowledge, and patience with me for the information in this article.

I struggled with the next part, for some reason I was not able to resolve in my head on keyboard usage. I had to employ the knowledge of Antonio Villena in order to get this sorted out.
Continue reading “Using the Keyboard”

Advertisements

Time to play variable cleanup

7-1-2018

During the programming of this game, I often start to add a great number of variables for testing various routines. It gets far out of hand sometimes and starts eating up the memory bit by bit. Furthermore, there are variables that can be reused that can also help with saving memory.

Luckily, I do have a few tools at my disposal and want to share the techniques that I employ to find those variables.
Continue reading “Time to play variable cleanup”

Enemy movement, it’s not a bug, it’s a feature.

6-15-2018

In a prior article, I encountered a bit of a bug, on some occasions, our enemy sprites will run into walls and then will pass through them. This destroys the rules of the game, the walls are supposed to be deadly for both the player and the enemy. What does it say if the enemy can occasionally move through a wall but you cannot, the game cheats and we cannot have that! So let’s delve back into our enemy movement code and play with that a little more. Continue reading “Enemy movement, it’s not a bug, it’s a feature.”

Shooting yourself in the foot, dealing with Bullets

6-9-2018

In order for our poor little bubble to defend itself against the onslaught of enemies, we need to be able to shoot. The FASE engine can handle up to 8 bullets at a time, but we don’t need that many. 8 bullets for 4 enemies seems overly excessive. How about 1 bullet at a time. This way we can defend our bubble, yet still provide a challenge.

Continue reading “Shooting yourself in the foot, dealing with Bullets”

Moving along, enemy movement using a route.

5-28-2018

Today in the USA is Memorial Day, a day in which we honor those in the Military that died while serving. It has its roots in the American Civil War. Happy Memorial Day to everyone that is reading this.

Back to programming then.

Now that we have created our route using the Grassfire technique, now its time to move the enemy sprites along the pathway we have created for them. Our prior routine for moving the enemy is now obsolete, so time to get rid of it to make way for the new routine. I actually never truly delete a routine in my code, I just move it to another text file in another directory and save it, for when I need to look at a concept again. I think the routine was called enemyCollision, I had actually gotten rid of it ages ago as I have been concentrating on the Grassfire technique for a while.
Continue reading “Moving along, enemy movement using a route.”

Wavefront, beginning estimations

5-25-2018

Where we last left off, our enemy had a pathway to find the player, however, it took 38 passes for the furthest enemy to find you. The enemy will catch up to you, but you can move 38 pixels in total before the furthest enemy would be able to target you. There is an awkward time that the furthest enemy will just stand there not knowing where to move. What we need is an estimator.
Continue reading “Wavefront, beginning estimations”

Grassfire using a kernel approach – the code.

5-23-2018
The last article I wrote started to get a bit lengthy, so I decided to split it into several parts. Our last article, covered the algorithm in general, here we are going to delve into the code itself
Continue reading “Grassfire using a kernel approach – the code.”