RSISS InsectSimulator by Jonathan Johnston
This is a simulation of different life forms interacting, living, dieing and evolving in the same habitat
Original Author: Jonathan D. Johnston
Inputs
you input the amount of Ants, spiders, antlions, food, the rate of evolution and the refresh rate.
Assumptions
The code is very sloppy. I have no formal programming education, my structure is non-existant and my comments short
Returns
and you get a numerical and graphical update at the specified refresh rate
Side Effects
WARNING! EXTREMELY ADDICTIVE!
here you are gambling with virtual insectual lives.....MUHAHAHAHAHAAAAaaaa!
API Declarations
theres a bunch of global types, variables and an api call.
Declare Function IntersectRect Lib "user32" (lpDestRect As RECT, lpSrc1Rect As RECT, lpSrc2Rect As RECT) As Long
Public Type Settings
Colour As Integer
End Type
Public Type Ant
Colour As Integer
Strength As Integer
Speed As Integer
Sight As Integer
Life As Single
Reproduce As Integer
X As Single
Y As Single
Direction As Byte
End Type
Public Type Spider
Colour As Integer
Strength As Integer
Speed As Integer
Sight As Integer
Life As Single
Reproduce As Integer
X As Single
Y As Single
Direction As Byte
End Type
Public Type AntLion
Colour As Integer
Strength As Integer
Size As Integer
Life As Single
Reproduce As Integer
X As Single
Y As Single
End Type
Public Type AntFood
Colour As Integer
Life As Single
Reproduce As Integer
X As Single
Y As Single
End Type
Public Type RECT
Left As Long
Top As Long
Right As Long
Bottom As Long
End Type
Public Habitat As Settings
Public Ants(1001) As Ant
Public Spiders(1001) As Spider
Public AntLions(1001) As AntLion
Public Food(1001) As AntFood
Public AntOpen(1001) As Integer
Public AntOpenLength As Long
Public SpiderOpen(1001) As Integer
Public SpiderOpenLength As Long
Public AntLionOpen(1001) As Integer
Public AntLionOpenLength As Long
Public FoodOpen(1001) As Integer
Public FoodOpenLength As Long
Public AntUsed(1101) As Integer
Public SpiderUsed(1101) As Integer
Public AntLionUsed(1101) As Integer
Public FoodUsed(1101) As Integer
Public tempSortList(1101) As Integer
Public AntSightRECT(1001) As RECT
Public SpiderSightRECT(1001) As RECT
Public AntRECT(1001) As RECT
Public SpiderRECT(1001) As RECT
Public AntLionRECT(1001) As RECT
Public FoodRECT(1001) As RECT
Public tempRECT As RECT
Public AntAmount As Integer
Public SpiderAmount As Integer
Public AntLionAmount As Integer
Public FoodAmount As Integer
Public FoodUpdate As Byte
Public AntLionUpdate As Byte
Public EvolutionRate As Byte
Public SpiderDeathCount As Long
Public AntDeathCount As Long
Public FoodDeathCount As Long
Public AntLionDeathCount As Long
Public Cycles As Long
Public UpdateCount As Integer
About this post
Posted: 2002-06-01
By: ArchiveBot
Viewed: 70 times
Categories
Attachments
CODE_UPLOAD1296012222000.zip
Posted: 9/3/2020 3:45:00 PM
Size: 8,308 bytes
Loading Comments ...
Comments
No comments have been added for this post.
You must be logged in to make a comment.