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 - tatakamucher

#31
hi erico, i tried with mp3, ogg and wav  :( :S
#32
Hola amigos, soy primerizo en android u_u y cuando pruebo mi juego no me da sonidos ni música, lo pruebo en win y en ios y todo va bien, alguna ayuda????  :giveup: :D
#33
how can i use it  :| ? some example pls  :D
#36
Quote from: Snoopy on 2013-Jul-30
Quote from: tatakamucher on 2013-Jul-30
my first code uses # and dont work, int neither, i think about the ocean solution u_u

then this is not only a problem of data types (integer or float) but also a problem in your code.  ;)

Here a simple tweening movement  (for clarity, the code is not optimized )  :):
Code (glbasic) Select


GLOBAL npos = 4, n1 = 0, n2 = 0, dtime, x_rect, y_rect, speed_rect, dx_rect, dy_rect, speed, distx, disty, dist, pos[]

DIMDATA pos[],  10, 10,  200, 10,  250, 200,   10, 200   // X, Y Format

x_rect = pos[0]
y_rect = pos[1]
speed_rect = 2

WHILE TRUE
IF dist <= 0
n2 = n1 + 1
IF n2 >= npos THEN n2 = 0

distx = pos[n2 * 2 + 0] - pos[n1 * 2 + 0]      // X
disty = pos[n2 * 2 + 1] - pos[n1 * 2 + 1]      // Y
dist = SQR((distx * distx) +  (disty * disty)) // Distance
dx_rect = distx / dist
dy_rect = disty / dist

INC n1
IF n1 >= npos THEN n1 = 0
ELSE
DEC dist, speed_rect * speed
ENDIF

INC x_rect, dx_rect * speed_rect * speed
INC y_rect, dy_rect * speed_rect * speed

//DRAWRECT INTEGER(x_rect), INTEGER(y_rect), 50, 50, RGB(244,0,0)
DRAWRECT x_rect, y_rect, 50, 50, RGB(244,0,0)  // For a "clean code" use INTEGER function, but GLB also accepts floating value in 2D ;)

SHOWSCREEN

speed = 30.0 * GETTIMER() * 0.001
WEND



hi, your code its ok for movement  :)

bur the challenge here is for a tweening animation, like a bone animation in flash.


for example i need to draw a sprite for x = 10 to x = 11 in a interval of 1000 millisecs (like x = 10.1, x = 10.2, x = 10.3... x = 11)
#37
my first code uses # and dont work, int neither, i think about the ocean solution u_u
#38
Code (glbasic) Select
WHILE TRUE



IF t3 = 0
        t4 =  GETTIMERALL()
        t3 = 1

        ENDIF
        t2 = GETTIMERALL()- t4
        IF t2 > 999 THEN t3 = 0

IF t2 < 478


x% = -24.833333
y% = 81.923077
a% = 0
t% = 0
s% = 0

a2x% = -25.5
a2y% = 79.589744
a2a% =  0
a2t% = 477
a2s% = 0

ENDIF

IF t2 > 477
x% = -25.5
y% = 79.589744
a% =  0
t% = 477
s% = 0

a2x% = -24.833333
a2y% = 81.923077
a2a% = 0
a2t% = 999
a2s% = 0



ENDIF

a3x% = x%+((a2x% - (x%))*((t2-t%)/(a2t%-t%)))
a3y% = y%+((a2y% - (y%))*((t2-t%)/(a2t%-t%)))

DRAWRECT -a3x%,a3y%,50,50,RGB(244,0,0)

SHOWSCREEN
WEND





i try to implement a tweening movemtn to animate characters but when i try to drawsprite or drawrect the x and y values has only integer values


i need some help  =D
#39
aquí un video de como va



@mentalthink: si lo leí y lo estoy aplicando para un update ;)
#40
yes erico, is a desert island to explore and try to exit (like lost  :P)
#41
Aquí iré poniendo el progreso de mi nuevo juego que estoy desarrollando  :S
#42
en la prox actualización mejorare con sus comentarios  :good:
#43
Claro! mental, gracias  =D
#44
Thanks erico  :D
#45
Quote from: Kitty Hello on 2013-Jun-17
scrolling is  bit slow. use two fingers to scroll, maybe?


i will fix in the next update but with 2 fingers dont work in ipod touch 4g  :zzz: