Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

2D All the way! / strange move sprite problem

Author
Message
sprites r us
20
Years of Service
User Offline
Joined: 4th Mar 2004
Location:
Posted: 4th Mar 2004 13:40
I did some tests yesterday and my sprites moved differently if i set velocity to 1.3 or 1.5 or 1.7 but today i tried again and it seems it only uses the int part of the speed now (??) all sprites suddenly move at v=1. I cant think of anything i did differently?

anyone have an idea?
Code Stealer
20
Years of Service
User Offline
Joined: 12th Feb 2004
Location:
Posted: 4th Mar 2004 15:15
If you want to use the decimals put this # after the variable name. I got some wierd errors from the same sort of thing....

v=1
v#=1.01

GIve me more power!
sprites r us
20
Years of Service
User Offline
Joined: 4th Mar 2004
Location:
Posted: 4th Mar 2004 15:46
i have tried that, it doesnt help i have a bebug printout just before i use the move sprite command and it is using decimals...

it's just really weird...
sprites r us
20
Years of Service
User Offline
Joined: 4th Mar 2004
Location:
Posted: 4th Mar 2004 15:47
debug not bebug, obviously...
Pincho Paxton
21
Years of Service
User Offline
Joined: 8th Dec 2002
Location:
Posted: 5th Mar 2004 00:00
Every stage of your program must use #. You could have missed one out somewhere. Probable during the actual sprite command. You might have to use 1.0 for 1, 0.0 for zero etc as well.

UnderLord
20
Years of Service
User Offline
Joined: 2nd Aug 2003
Location:
Posted: 5th Mar 2004 17:42 Edited at: 5th Mar 2004 18:03
don't use v# = 1.01 make it 1.1. 1.01 will probably give you weird results try staying away from numbers like 1.001 or 0.003 ect ect try keeping it with 0.3 or 0.1 ect ect and 1.0 might be fast im not sure though so try it with like 0.2 or 0.3 something like that should give you ok speed results for your move commands

for the move sprite command just do

V# = 0.0

[code here for movement]

move sprite #,V#

[edit]

ok i did some test and doing 0.0100 for my Velocity# movement see code...



seemed to work good but when it was first starting it went really slow and looked slugish so i think using 0.1 or something would still work better...

The search continues.

Current project - A space game

Login to post a reply

Server time is: 2024-05-17 04:19:43
Your offset time is: 2024-05-17 04:19:43