Optimizing memory part 3

1-31-2018
My big error so far is trying to directly interpret the xxxx bytes free statement as a direct statement of how many bytes there are left. But I have started to notice a pattern. If the number of bytes left is less than 12587, then there are going to be crashes at the end of the game, so we need to shave some more memory off from the routines.

Today, I’m going to examine the enemyAI function.
Continue reading “Optimizing memory part 3”

Optimizing memory part 2, let’s play Limbo

1-25-2018
Where we last left off, I had trimmed off unwanted functions and was going to start experimenting with moving localized variables to globals. I was going to do the by creating a header file and push all of the global variables to it to keep better track of the globals visually.

My last code adjustment before moving these variables on compiling resulted in a memory footprint of 12728 bytes free.

Continue reading “Optimizing memory part 2, let’s play Limbo”

Optimizing your Memory part 1

1-23-2018
It would seem that in my coding progress that something started to go wrong, very wrong. I left off last time trying to figure out why this piece of code works.

Continue reading “Optimizing your Memory part 1”

I’ve got a problem and the problem is me – Debugging

1-13-2018
When you are working on a program and you are the only one really working on the program, you are going to have issues.

In my excitement on trying to churn out articles as quickly as possible, I’ve been noticing bugs, here and there and a little everywhere. No mind I say, I’ll come back a little later and fix it.

I’ve said that time after time and now it’s time to pay the piper his price. I can’t really do any more coding or even test my next article until I remove some bugs that I have introduced.
Continue reading “I’ve got a problem and the problem is me – Debugging”

Grace Hopper

This is a story I had placed on Facebook about a year or so ago, but I want to retell it with a point in mind to act as an introduction to my next article.

I grew up in Virginia (in the USA) near the city of Richmond. Now I was not in the city itself, but about 35 miles away from it in “King William” county. It was a small country school. Now the area is probably about a 2.5 hours away from Washington, DC.
Continue reading “Grace Hopper”

Collision detection Revisited part 3 – Pythagoras was a gamer

1-8-2018

Collision detection within a circle.

Ancient Greece, 520 B.C., nighttime. Pythagoras looked up at the night sky and saw three stars: Deneb, Vega, and Altair. These 3 starts formed a perfect triangle. He thought to himself, I wonder how to calculate the distance from one star to another using this triangle. Moments later, he came up with A squared + B squared = C squared. He then loudly pronounced, “my work here is done”. While walking home another thought came to him. These stars look like pixels, if I draw lines between them in my mind, I’ve got a vector based game I can envision.
Continue reading “Collision detection Revisited part 3 – Pythagoras was a gamer”

Collision detection Revisited part 2 – Bounding Box much faster

1-7-2017

Being kinda bothered with the performance of the bounding box routine I gave out last time, I decided to play around with the performance. What eventually came out of it is a much improved and faster version.

So, a long time ago, Pythagoras came up with a formula to calculate the distance between two objects. The Pythagoras theorem. For those who need to be reminded of it (like I did), the formula is square root (A squared + B squared) = C squared.

Today, I’m going to butcher it. Time to get out the code cleaver.
Continue reading “Collision detection Revisited part 2 – Bounding Box much faster”

Collision detection Revisited part 1

1-3-2018 to 1-6-2018
The problem with Tile based collisions

Tile based game engines seem to have an inherent problem with collisions that I can’t seem to easily work out, that of Collision detection. Here is the issue at hand, a tile is based on a square grid. In the case of FASE, but not limited to FASE is while everything nicely aligns to squares, not everything is exactly square.
Continue reading “Collision detection Revisited part 1”

Moving Along – Animating your character Sprite

1-4-2017

To make our main character sprite a little more engaging, let’s animate your sprite with the images we built in my last article. Animating our little bubble is rather easy with the FASE engine and makes our little bubble look much nicer than a static sprite.
Continue reading “Moving Along – Animating your character Sprite”

Changing your sprites

1-3-2018
Welcome to my first post of the New Year.

This is not a lesson in art. I’m a terrible artist and you should not take any art advise from me. That being said, having all the logic in the world is not going to make a good game. You need to have a character that your players will enjoy playing and enemies you are going to want to avoid.

We already know that our game is going to be about a bubble and we also know that our enemies are going to want to pop our little bubble.

So, our first order of business is trying to make a bubble.

Continue reading “Changing your sprites”

Design a site like this with WordPress.com
Get started