Monday, October 20, 2003

Repton.NET 0.06 Alpha

I can't take any of the credit for the latest updates to Repton.NET; I've been totally snowed under with other work, and therefore haven't been able to do any development for the past month or so. Chris on the other hand has been doing sterling work on the project, and has implemented a large number of the things that were missing. The game is now essentially playable, with the notable exception that the Fungus doesn't 'grow' in the maps at the moment.

A word of warning however; don't attempt to enter a password - you won't get very far!

 

ReptonSetup.0.6.Alpha.msi (1.01 MB)
Tuesday, October 21, 2003 8:47:49 AM UTC
I found fungus quite tricky

The obvious approach would be to randomly pick a square of the map. If it borders onto a fungus square, then grow the fungus into it.

However this has a problem. When fungus is growing along a passageway, it will take a long long time to randomly pick the single next square that it can grow in to. All this time is wasted processing power, which for me was a problem. (Although maybe your programming environment gives you more CPU power to spare)

The other problem is that when the fungus is out in the open it will grow much faster, because you'll get more random hits on squares to grow in to. You follow me?

My algorithm was as follows: I kept an array of coordinates of fungus squares. Any fungus square which could not grow in any direction (not even in the future after a diamond was collected or rock moved) was dropped from the array. So the array was a list of potentially growing fungus. Periodically it chooses which square to grow at random from the array.

cunning hey?
Wednesday, October 22, 2003 7:22:21 AM UTC
Thanks for your tip Harry; the map handling is already fairly optimised in the game, and to be honest with the power of processors nowadays it's not really a worry.

The tricky bit, as Chris has been finding, is getting the speed 'just right'. Too slow and it fails to be a challenge - too fast and some of the later levels become impossible to complete.
Tuesday, October 28, 2003 1:22:46 PM UTC
Harry,

Thanks for the tip, I have used this idea to implement the replication in the game and it seems to be working well. Because of the way information is stored I am generating a random MapPoint in the game and during the appropraite loop see if this point holds Fungus.

This seems to be working well but I have not tested it on all levels so will need to find out if it causes problems on later level.

Chris
Chris
Name
E-mail
Home page

Comment (HTML not allowed)  

Enter the code shown (prevents robots):

Live Comment Preview