Your ants finding food reminded me of the agent based programs I played with some years ago now. In this example the agents find mushrooms and return them to their home. They "wander" about until they find a mushroom and then use astar16 routine to find their home. This also includes a isometric display. I used data statements to include graphics in source code.
Code: Select all
#include "astar16.bas"
'~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
' MAIN PROGRAM
'~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
const WORLDW = 40 'must be same as MAPW and MAPH in ASTAR ROUTINE HEADER
const WORLDH = 30
type AGENT
as integer x 'current position
as integer y
as integer dx 'velocity between -1 and +1
as integer dy
as integer item 'item held by agent
as integer itemCount 'count items collected
'required for astar routine
as APATH path'path list
as integer counter 'position so far
as integer onThePath 'moving along path
as v2D target 'desired target
end type
dim shared as integer agentCount
agentCount = 4
dim shared as AGENT agents(0 to agentCount)
'===========================
const SCRW = 1340
const SCRH = 480
const TILEW = 16
const TILEH = 16
screenres SCRW, SCRH, 32
color rgb(0,0,0),rgb(255,255,255):cls
'====================================================================
' CREATE A TILE MAP AND FILL SOME TILES WITH IMAGES
'====================================================================
dim shared as any ptr worldBlock16
worldBlock16 = imagecreate(16*16,16*16,rgb(255,0,255))
dim as integer datum
for k as integer = 1 to 4
for j as integer = 0 to 15
for i as integer = 0 to 15
read datum
if datum = 0 then
pset worldBlock16,(i+k*16,j),rgb(255,0,255)
end if
if datum = 1 then
pset worldBlock16,(i+k*16,j),rgb(255,0,0)
end if
if datum = 2 then
pset worldBlock16,(i+k*16,j),rgb(0,0,255)
end if
if datum = 3 then
pset worldBlock16,(i+k*16,j),rgb(0,255,0)
end if
if datum = 4 then
pset worldBlock16,(i+k*16,j),rgb(136,0,21)
end if
if datum = 5 then
pset worldBlock16,(i+k*16,j),rgb(195,195,195)
end if
if datum = 6 then
pset worldBlock16,(i+k*16,j),rgb(0,0,0)
end if
next i
next j
next k
line worldBlock16,(240,0)-(240+15,15),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,5,5,5,6,6,0,0,0
DATA 0,0,0,6,6,5,5,5,5,5,5,6,6,0,0,0
DATA 0,6,6,5,5,5,5,5,5,5,5,5,5,6,6,0
DATA 0,6,6,5,5,5,5,5,5,5,5,5,5,6,6,0
DATA 0,6,6,6,6,6,6,5,5,6,6,6,6,6,6,0
DATA 0,6,6,6,6,6,6,5,5,6,6,6,6,6,6,0
DATA 0,0,0,0,0,6,6,6,6,6,6,0,0,0,0,0
DATA 0,0,0,0,0,6,6,6,6,6,6,0,0,0,0,0
'bload "tileBlock16A.bmp",worldBlock16 'load bitmap tile block
'====================================================================
' ISOMETRIC DATA
'====================================================================
dim shared as any ptr ground0
ground0 = imagecreate(20,16)
dim shared as any ptr ground1
ground1 = imagecreate(20,16)
dim shared as any ptr imgAgent
imgAgent = imagecreate(20,57)
'dim shared as any ptr tree
'tree = imagecreate(20,57,rgb(255,0,255))
'bload "tree.bmp",tree
dim shared as any ptr mushy
mushy = imagecreate(15,12,rgb(255,0,255))
'bload "mushy.bmp",mushy
dim shared as any ptr man1
man1 = imagecreate(15,22)
'bload "man1.bmp",man1
dim shared as any ptr man2
man2 = imagecreate(15,22)
'bload "man2.bmp",man2
'ground tiles
dim as ulong c
for j as integer = 0 to 15
for i as integer = 0 to 19
read c
if c = 0 then pset ground0,(i,j),rgb(255,0,255)
if c = 1 then pset ground0,(i,j),rgb(0,0,0)
if c = 2 then pset ground0,(i,j),rgb(200,100,0)
if c = 0 then pset ground1,(i,j),rgb(255,0,255)
if c = 1 then pset ground1,(i,j),rgb(0,0,0)
if c = 2 then pset ground1,(i,j),rgb(100,200,0)
next i
next j
'make man1
for j as integer = 0 to 21
for i as integer = 0 to 14
read c
if c = 0 then pset man1,(i,j),rgb(255,0,255)
if c = 1 then pset man1,(i,j),rgb(0,0,0)
if c = 2 then pset man1,(i,j),rgb(255,255,255)
if c = 3 then pset man1,(i,j),rgb(100,100,255)
if c = 4 then pset man1,(i,j),rgb(255,0,0)
next i
next j
'make man1
for j as integer = 0 to 21
for i as integer = 0 to 14
read c
if c = 0 then pset man2,(i,j),rgb(255,0,255)
if c = 1 then pset man2,(i,j),rgb(0,0,0)
if c = 2 then pset man2,(i,j),rgb(255,255,255)
if c = 3 then pset man2,(i,j),rgb(100,100,255)
if c = 4 then pset man2,(i,j),rgb(255,0,0)
next i
next j
'make mushy
for j as integer = 0 to 11
for i as integer = 0 to 14
read c
if c = 0 then pset mushy,(i,j),rgb(255,0,255)
if c = 1 then pset mushy,(i,j),rgb(0,0,0)
if c = 2 then pset mushy,(i,j),rgb(255,255,255)
if c = 3 then pset mushy,(i,j),rgb(100,100,255)
if c = 4 then pset mushy,(i,j),rgb(255,0,0)
next i
next j
'====================================================================
dim shared as integer sx,sy,ex,ey
dim shared as integer world(WORLDW,WORLDH)
'dim shared as any ptr floorBlock16
'floorBlock16 = imagecreate(16*16,16*16)
'bload "floorBlock16.bmp",floorBlock16 'load bitmap tile block
dim shared as integer floor(WORLDW,WORLDH)
'=========================================================================
' DRAW ISOMETRIC DISPLAY OF WORLD
'=========================================================================
sub drawIsoWorld()
dim as integer cx,cy ' cx,cy origin on screen for isometric grid
dim as integer x,y,z ' x,y of point on normal 3D grid
cx = 640+300
cy = 160
z = 0
screenlock
'display tiles
for y as integer = 0 to WORLDH-1
for x as integer = 0 to WORLDW-1
if floor(x,y)=0 then
put (cx-y*2*4+x*2*4-10,y*4+x*4+cy-5-z),ground0,trans
else
put (cx-y*2*4+x*2*4-10,y*4+x*4+cy-5-z),ground1,trans
end if
next x
next y
'overlay items
for y as integer = 0 to WORLDH-1
for x as integer = 0 to WORLDW-1
'overlay agents
for i as integer = 0 to agentCount
if (agents(i).y\16) <= y then
if agents(i).item = 0 then
put (cx - (agents(i).y\4)*2 + (agents(i).x\4)*2-10, (agents(i).y\4) + (agents(i).x\4) + cy - z- 12),man1,trans
else
put (cx - (agents(i).y\4)*2 + (agents(i).x\4)*2-10, (agents(i).y\4) + (agents(i).x\4) + cy - z- 12),man2,trans
end if
end if
next i
if world(x,y)=3 then
'put (cx-y*2*4+x*2*4-8,y*4+x*4+cy-45-z),tree,trans
elseif world(x,y)=4 then
put (cx-y*2*4+x*2*4-10,y*4+x*4+cy-8-z),mushy,trans
end if
next x
next y
screenunlock
end sub
'========================================================================
sub drawWorld()
dim as integer x,y,n
screenlock
cls
for j as integer = 0 to WORLDH-1
for i as integer = 0 to WORLDW-1
if floor(i,j)=0 then
line (i*TILEW,j*TILEh)-(i*TILEW+TILEW-1,j*TILEH+TILEH-1),rgb(200,100,0),bf 'floor tile color
else
line (i*TILEW,j*TILEh)-(i*TILEW+TILEW-1,j*TILEH+TILEH-1),rgb(100,200,0),bf
end if
if world(i,j)<>0 then
n = world(i,j) 'get tile id
y = int(n/16) 'compute position in tile block
x = n-(16*y)
put (i*TILEW,j*TILEH),worldBlock16,(x*TILEW,y*TILEH)-(x*TILEW+TILEW-1,y*TILEH+TILEH-1),trans
line (i*TILEW,j*TILEH)-(i*TILEW+TILEW,j*TILEH+TILEH),rgb(0,0,200),b
end if
line (i*TILEW,j*TILEH)-(i*TILEW+TILEH,j*TILEW+TILEH),rgb(100,100,100),b
next i
next j
'draw agents
for i as integer = 0 to agentCount
if agents(i).item = 0 then
put (agents(i).x,agents(i).y),worldBlock16,(2*TILEW,0*TILEH)-(2*TILEW+TILEW-1,0*TILEH+TILEH-1),trans
else
put (agents(i).x,agents(i).y),worldBlock16,(1*TILEW,0*TILEH)-(1*TILEW+TILEW-1,0*TILEH+TILEH-1),trans
end if
put (agents(i).target.x*TILEW,agents(i).target.y*TILEH),worldBlock16,(15*TILEW,0*TILEH)-(15*TILEW+TILEW-1,0*TILEH+TILEH-1),trans
draw string (agents(i).x-8,agents(i).y),str(i)
locate (i+1)*2,82
print "agent";i;
'draw mushrooms
for j as integer = 0 to agents(i).itemCount-1
put (716+j*16,i*16),worldBlock16,(4*TILEW,0*TILEH)-(4*TILEW+TILEW-1,0*TILEH+TILEH-1),trans
next j
next i
screenunlock
end sub
sub fillWorld()
for y as integer = 3 to MAPH-5
for x as integer = 0 to MAPW-1
floor(x,y)=int(rnd(1)*2)
if int(rnd(1)*8)=0 then
CellSetSolid(x,y, TRUE )
if int(rnd(1)*4)=0 then
world(x,y)=4 'mushroom
else
world(x,y)=3 'tree
end if
end if
next x
next y
end sub
sub followPath(ag as AGENT)
if ag.counter < ag.path.pCount then
ag.dx = ag.path.p(ag.counter).x - (ag.x\16) 'get direction to move
ag.dy = ag.path.p(ag.counter).y - (ag.y\16)
ag.counter = ag.counter + 1 'bump counter
else
ag.onThePath = 0
ag.item = 0 'drop item
ag.itemCount = ag.itemCount + 1 'count items dropped
ag.dx = 0
ag.dy = 0
end if
end sub
sub moveAgents(ag as AGENT)
dim as integer hit
dim as integer TILEX,TILEY
hit = 0
ag.x = ag.x + ag.dx
ag.y = ag.y + ag.dy
'out of bounds
if ag.x < 0 or ag.x > 640-16 or ag.y < 0 or ag.y > 480-16 then hit = 1
'test overlap of another tile
TILEX = int(ag.x/16)
TILEY = int(ag.y/16)
if world(TILEX,TILEY)<>0 then hit = 1
TILEX = int((ag.x+15)/16)
TILEY = int((ag.y)/16)
if world(TILEX,TILEY)<>0 then hit = 1
TILEX = int((ag.x)/16)
TILEY = int((ag.y+15)/16)
if world(TILEX,TILEY)<>0 then hit = 1
TILEX = int((ag.x+15)/16)
TILEY = int((ag.y+15)/16)
if world(TILEX,TILEY)<>0 then hit = 1
if hit = 1 then
ag.x = ag.x - ag.dx 'undo move
ag.y = ag.y - ag.dy
'new trial
ag.dx = int(rnd(1)*3)-1
ag.dy = int(rnd(1)*3)-1
while ag.dx = 0 and ag.dy = 0
ag.dx = int(rnd(1)*3)-1
ag.dy = int(rnd(1)*3)-1
wend
end if
end sub
sub update()
dim as integer onTile
for i as integer = 0 to agentCount
'test if on center of tile
onTile = 0
if agents(i).x = int(agents(i).x\16)*16 and agents(i).y = int(agents(i).y\16)*16 then
onTile = 1
end if
if onTile = 1 then
dim as integer p,q
if agents(i).onThePath = 1 then
followPath(agents(i))
else
'random change in direction
if int(rnd(1)*20)=0 then
agents(i).dx = int(rnd(1)*3)-1
agents(i).dy = int(Rnd(1)*3)-1
while agents(i).dx = 0 and agents(i).dy = 0
agents(i).dx = int(rnd(1)*3)-1
agents(i).dy = int(Rnd(1)*3)-1
wend
end if
'check for mushroom
for jj as integer = -1 to 1
for ii as integer = -1 to 1
p = agents(i).x\16+ii
q = agents(i).y\16+jj
if p>0 and p<640 and q>0 and q<480 and agents(i).onThePath = 0 then
if world(p,q) = 4 then 'FOUND MUSHROOM
world(p,q) = 0 'remove from world
CellSetSolid(p,q,FALSE) 'remove from ASTAR MAP
agents(i).item = 1 'agent now holding an item
agents(i).path = makePath(agents(i).target.x,agents(i).target.y,(agents(i).x\16),(agents(i).y\16))
agents(i).onThePath = 1
agents(i).counter = 0 'zero agent current index position on path
end if
end if
next ii
next jj
end if
end if
moveAgents(agents(i))
next i
drawWorld()
drawIsoWorld()
end sub
'dim as integer x,y
CellClearAll()
'fill world with mushrooms and trees
fillWorld()
'loadMap("bigWorld.txt")
for i as integer = 0 to agentCount
agents(i).x = i*8*16
agents(i).y = 2*16
agents(i).target.x = i*8
agents(i).target.y = 28
agents(i).dx = int(rnd(1)*3)-1
agents(i).dy = int(Rnd(1)*3)-1
while agents(i).dx = 0 and agents(i).dy = 0
agents(i).dx = int(rnd(1)*3)-1
agents(i).dy = int(Rnd(1)*3)-1
wend
next i
dim as double now1
now1 = timer
do
if timer > now1 + 0.01 then
now1 = timer
update()
end if
sleep 2
loop until multikey(&H01)
'ground
data 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
data 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
data 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
data 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
data 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
data 0,0,0,0,0,0,0,0,0,1,1,0,0,0,0,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