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.”

A new concept for Grassfire.

5-17-2018

While brainstorming and looking how the numbers built up for the Wavefront/Grassfire technique and building the windows program time and time again, I started to observe an interesting pattern. It took me a little while to figure out the pattern of the numbers but eventually started to remind me of an older image processing routine that I had built a few years ago – The Min Filter or minimum filer.
Continue reading “A new concept for Grassfire.”

Wavefront Challange, many different ways to skin a cat.

5-12-2018
In my last article, I introduced the wavefront algorithm and it’s relationship to Dijkstra’s algorithm. We also saw how the wavefront was built

My challenge is twofold, first to try to get Timothy Friez’s Wavefront algorithm, faster and secondly, to transform the function into something I can use with Z88dk (as Z88dk does not support 2D arrays).

I have written a Windows C binary to demonstrate the function, available at https://github.com/andydansby/wavefront. Now I do want to point out the obvious, this is experimental software only, used only to test methods to build a wavefront/grassfire method.
Continue reading “Wavefront Challange, many different ways to skin a cat.”

Off to catch a WaveFront, Using the Wavefront Algorithm to find a pathway.

5-6-2018

While doing some research on enemy path-finding, I came across some obvious solutions, such as A-Star among other types of algorithms. Now, I’m not trying to say anything one way or another about A-Star, however, the algorithm does not seem to be a rather easy one to write and furthermore, if I apply it to multiple enemies, I’m almost certain it will require a pass for each enemy, each time the player moves. That seems like a lot of processing power needed to plot a path to the player. Too much work for the Z80 processor when you are also updating sprites and all the other routines needed for the game.
Continue reading “Off to catch a WaveFront, Using the Wavefront Algorithm to find a pathway.”

The problem with Taxicab, examining a different graphing technique.

4-27-2018
I covered in my last article using the taxicab difference to find a pathway to our target (the player). It does help to use the Taxicab difference as it does help guide our enemy to the player, however, there are times when the enemy can and will get stuck on a tile. This is the weakness of our algorithm.
Continue reading “The problem with Taxicab, examining a different graphing technique.”

Design a site like this with WordPress.com
Get started