This is how the enemy.agc looks now for you to play with
So simply add ai and attack if you want.
Setup_Enemy:
type sEnemy
Id As Integer
Sprite As Integer
Health As Integer
HitPoints As Integer
Alert As integer
class As String
endtype
Global dim Entity_Enemy[20] As sEnemy
Global Enemy_Count
Return
Function Create_Enemey_Bat(obj,x,y,img,scale)
createobjectplane(obj,32,32)
Setobjectposition(obj,x*scale, ((0-scale/2)+14)+FloorHeight[x,y], y*scale)
setobjectimage(obj,img,0)
Setobjectcolor(obj,225,225,225,255)
SetObjectShader( obj, 1 )
SetObjectCollisionMode( obj, 0 )
//setobjectvisible(box,0)
Entity_Enemy[Enemy_Count].Id=obj
Entity_Enemy[Enemy_Count].Class="Bat"
Entity_Enemy[Enemy_Count].Health=2
Entity_Enemy[Enemy_Count].HitPoints=2
inc Enemy_Count
inc obj
Endfunction obj
REM //////////////////////////////////////////////////////////////
REM // Only used to set the enemy objects visible in the editor //
REM // when switching from game mode. //
REM //////////////////////////////////////////////////////////////
Function Show_enemies()
for en=0 to Enemy_Count
REM // Check if the enemy exist
obj=Entity_Enemy[en].Id
if obj>0
SetObjectVisible( obj, 1 )
endif
next en
Endfunction
REM ///////////////////////////////////////////////////////////////
REM // Main enemy loop that we use to set events and ai tracking //
REM ///////////////////////////////////////////////////////////////
Function Loop_Thru_Enemy_Objects()
REM ///////////////////
REM // Enemy Loop ///
REM ///////////////////
for en=0 to Enemy_Count
REM // Check if the enemy exist
obj=Entity_Enemy[en].Id
if obj>0
px=GetCameraX(1)/64
pY=GetCameraZ(1)/64
x=GetobjectX(obj)/64
Y=GetobjectZ(obj)/64
REM // Check if he can see the player
if LOS(px,py,x,y)=1
SetObjectVisible( obj, 1 )
SetObjectLookAt( obj,GetCameraX(1), GetobjectY(obj),GetCameraZ(1), 0 )
else
REM // As he cant see the player he dont nead to be visible
SetObjectVisible( obj, 0 )
endif
endif
next en
Endfunction
We put everything that have with the enemys here in this file for simple updating.
I will try to make an simple animation and how we should handle animations before i send it to you.
Wath do you say about a 512x512 image for an entire levels enemys?
That would be 64 frames and we set the amount of differrent enemys to 4 per level so would that be 16 frames of animation for attacking,walking,flying and dying.
We are going to have a boss level where there would be a single huge boss to fight that could use all the frames.
These files are zipped and mailed to you to look at.
Bare in mind that iam still early in devlopment
Edit ...
simply use the crate image for the time being until the image files are done.
So we can add some moving enemys.
Android 2.3 , ZTE Skate , 480x800 , 800 mhz , Samsung Galaxy Y , 240x320 , 832 mhz , Sony ericson arc 480x854 , 1 ghz
Android 4.0 , Dmtech 3g 9738B , 1024x768 , 9.7 inches , 1.2 ghz