Grassfire using a kernel approach – the code.

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

Advertisements

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

Taxicab Difference part 2, optimzations

4-19-2018

Our last approach to using Taxicab difference is a memory hog and rather slow, two items that are not appealing to programming in general and especially in games and especially, especially on a ZX Spectrum where we have limited speed and limited memory. So, let’s see what we can do to make it better. So, where we last left off, memory was before we added our Taxicab routine at 13823 bytes free and after 10965 bytes free, for a total of 2858 Bytes.
Continue reading “Taxicab Difference part 2, optimzations”

A different approach to enemy movement. Taxicab Difference

4-7-2018
If we are trying to find the distance between 2 points on a grid, then perhaps one of the simplest ways to do so is by using what is called Taxicab distance. Taxicab difference is also called the Manhattan difference and it’s a descriptor of a block by block approach to distance.

Continue reading “A different approach to enemy movement. Taxicab Difference”