Many years ago, probably about twelve to fifteen, I was working on building a custom e-commerce system using Adobe Coldfusion. I was a young developer and so were the rest of the developers I worked with. Non of us were really qualified to build such a complex system, but we didn't know that, so we did it anyway. It ended up working fine for the customers we had. I'm sure I would not be happy with most of the code if I saw it today.
As part of the project we needed to build in product sorting. I came up with an idea that looked good, but in the end was not practical. You could choose to sort the products by name, price etc. and when you chose an option the page would move the products around using javascript. In the end this was all abandoned for a more practical version of sorting that reloaded the page.
However, from the code I had written for this I created a game. I called it the Fish Game. Basically there is a square game area and you can add food and fish. The food is added at a random location and the fish always start in the upper left corner. The fish move towards the food and when they get close enough they "eat" the food.
Each fish has a maximum speed and an amount of life energy. The faster the fish moves the more energy it uses up. When a fish eats food it gains energy. When a fish collects enough energy it will spawn a new fish. The new fish will be randomly a little slower or faster than the parent fish. As time goes on the fish get faster and faster because the fastest ones always get the food. Eventually they reach a point where they are using too much energy moving and they cannot get to the next piece of food before running out of energy.
Below is a link to the game if you want to try it out.
https://projects.mattdyer.us/fish/index.html
Friday, February 28, 2020
Subscribe to:
Post Comments (Atom)
Where Will We Go With AI
As AI becomes a more powerful coding tool I could see it taking us in two directions. One would be more and more bad high level code that ...
-
Some Android applications use space on your Google Drive to store data. You can't see this data by browsing drive the normal way. You ...
-
I started a new 3d unity project to play around with terrain creation. You can add a terrain object and then they have tools for raising a...
-
I have several apps published on the Apple Appstore. Four of them are using iAds and that service is going to be discontinued soon. I am g...
No comments:
Post a Comment