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”

Spastic fantastic, Enemy movement problems part 3

3-17-2018
In my last article detailing the enemy movements, I laid out the ideas for this article, here we will try to smooth out our enemy movements using our new variables. We will also try to inject the enemy bias to travel in the direction of our player.

Continue reading “Spastic fantastic, Enemy movement problems part 3”

Spastic fantastic, Enemy movement problems part 2

3-3-2018
In my last article, I posted a few solutions that came to mind when trying to correct the per pixel enemy collision in order to prevent the extremely jerk movement of an enemy sprite. I didn’t write up the second solution because that requires quite a lot of room and I didn’t want the article to go on too much more.
Continue reading “Spastic fantastic, Enemy movement problems part 2”

Spastic fantastic, Enemy movement problems part 1

So there is a bit of a problem with the enemy movements, it’s been an ongoing problem, but so far I have ignored it, the enemy movement is spastic, almost like a drunk.

It’s hard to describe it verbally and impossible with a photo, but here a video showing the effect.

https://youtu.be/qoDyVk5zeUA

It’s actually pretty funny.
Continue reading “Spastic fantastic, Enemy movement problems part 1”

Driving while Blind, Directional enemy steering

2-16-2018

In my last article, we were concerned about making sure the enemy follows the same rules as the player, mainly not touching an obstacle. There are a number of ways that this can happen in logic, but let’s try to approach the most simple method. I’m leaning towards more simple because simple in code means less memory and more speed.

Continue reading “Driving while Blind, Directional enemy steering”

Giving a Blind octopus 4 white canes, directional obstacle collision detection for enemies.

2-11-2018

Our enemy sprites cannot see, they do not know what is in front of them, behind them, nor to the left or right, they are completely oblivious to barriers. When we last approached enemy AI in artificial stupidity, we had the enemy move toward the player. They went completely through all obstacles and did not vary from their path. Would it not be more interesting if the enemies followed the same rules as the player does, avoid all obstacles while still trying to move toward the player?

Continue reading “Giving a Blind octopus 4 white canes, directional obstacle collision detection for enemies.”

Quick Explanation of my progress

2-8-2018
I just want to explain my progress on the game. There is not a game at the moment. There is not even a resemblance of a game. The reason is I’m just testing game logic. After the logic is complete, I can start actually working on the game, so the progress toward an actual game all depends on good clean, fast, and small engine logic.

Once that is done, I can start working on the game.
Continue reading “Quick Explanation of my progress”

Running into a Tile, Tile based Collision

2-7-2018

Tile-based collision is quite basically a no-frills, square based collision detection technique. Quite like the square based detection, this will only detect based on a square region. There is no radius needed, nor does it require any additional memory, as an added benefit, it runs rather rapidly. Unlike the other collision detection methods, this method automatically tells you the tile number, without any memory requirements. This method was suggested by Antonio several months ago and I just now got around to coding the method.

Continue reading “Running into a Tile, Tile based Collision”

Quick, think of a number between 1 and X. Random Numbers

2-1-2018

Where we last left off at enemy AI, I had chosen a randomize type routine to make random decisions for the enemy to chase you.

The first decision would be for the enemy to do nothing. Another decision it would make is to pursue you on the X axis, another would be to use the Y axis and a final decision would be to use both axis.
Continue reading “Quick, think of a number between 1 and X. Random Numbers”

Design a site like this with WordPress.com
Get started