Menu

Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Show posts Menu

Messages - djtoon

#16
nope this is the besy way becuse when you enter the nebula you still get the 3d effect

and yes
im trying to get the angel of the plane in relation to the camera, becuse when the plane is flat it sapposed to disapear or lower alpha.

its all explaned in the move
#17
hi look at this


i creatd this but i cant get the part where the angel of the plane is faceing the camera

any help whold be appriciated

10x
#18
hi
im making a top down game where enemys try to catch you
there is the code for enemy movement:

Code (glbasic) Select


FUNCTION enemyMove:
LOCAL pi = 3.14159265

FOR x=0 TO LEN(enemysFleet[])-1 STEP 1



//calculate distance between follower and target
    LOCAL distanceX = (b_BodyGetPosX(tmpObjxx)-b_BodyGetPosX(enemysFleet[x].obj))
    LOCAL distanceY = (b_BodyGetPosY(tmpObjxx)-b_BodyGetPosY(enemysFleet[x].obj))

    LOCAL  distanceTotal = SQR(distanceX*distanceX+distanceY*distanceY);

  IF distanceTotal <= 80000
LOCAL moveX=enemysFleet[x].turnRate*distanceX/distanceTotal
LOCAL moveY=enemysFleet[x].turnRate*distanceY/distanceTotal


//
LOCAL totalmove = SQR(moveX * moveX + moveY * moveY)
//
moveX = enemysFleet[x].speed * moveX / totalmove;
moveY = enemysFleet[x].speed * moveY / totalmove;
//



// b_moveObject( enemysFleet[x].obj,b_BodyGetPosX(enemysFleet[x].obj)+moveX,b_BodyGetPosY(enemysFleet[x].obj)+moveY,0)
//b_BodySetAngle(enemysFleet[x].obj,-angleInRadians);


LOCAL angleInRadians = ATAN(moveX, moveY);
LOCAL andleInDegrees  = angleInRadians * (180 / pi);



LOCAL velocityX =  SIN (   b_BodyGetAngle(enemysFleet[x].obj))*enemysFleet[x].speed
LOCAL velocityY = COS (   b_BodyGetAngle(enemysFleet[x].obj))*enemysFleet[x].speed
//




b_SetLinearVelocity(enemysFleet[x].obj,velocityX,velocityY);



IF enemysFleet[x].mission="attack"


b_ApplyTorque(enemysFleet[x].obj,b_BodyGetAngle(enemysFleet[x].obj)-angleInRadians);
b_SetLinearVelocity(enemysFleet[x].obj,velocityX,velocityY);






ELSEIF enemysFleet[x].mission="run"
b_SetLinearVelocity(enemysFleet[x].obj,-velocityX,-velocityY);

ENDIF


ENDIF






NEXT
ENDFUNCTION
////


i cant seem to get the enemy's to turn at you with difrent turn rates

any ideas?

10x
#19
any one done this?
the math is messing with my brain :)
#20
im useing cos and sin animation : like xpos=xpos+sin(gettimerall()/8)*5

is there more way's? to do that?
10x
#21
10x
well ... ill try some more tricks but i guess ill give up on retina for this one if i cant get the fps i need
#22
on regular screen size  480x320 im at 32+ fps
and  on retina i get 9

any workaround or someting?
#23
its ok its just the covent vs concave polys in box2d :)
it works ok
10x
#24
the polys seem to be transparent ( object dont collide with them) any idea why?
#25
heres the working version


[attachment deleted by admin]
#26
that fix't it :)
10x kitty
#27
hi
im creating a glb function to read vertex points from vrml1 that i export from ac3d

for some reson i cant get the thing to work
here is the lib
test it and maybe fix and share :)
10x


[attachment deleted by admin]
#28
hi
im draw 2 polygons one after the other and it seems the engine connects the poly's together

any ideas why?
the arrays are difrent ones for the points for the polygon creation

#30
here is the game , forgot to post this :)
http://globalgamejam.org/2012/mofalona

its a party game where you take turns to finish a tower of bricks to reach the portal.