Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Trouble with animating a rolling ball...
#11
Quote:Let me insist again with the idea I suggested on friday. Picx% and picY% are a function of the position in the table
Code:
Picy%=(cint (bally!*k1+k2) mod 10)*10
Picx%=(cint (ballx!*k1+k3) mod 10)
K1 must be adjusted to give the rolling effect (probably it must be negative)
K2 and K3 are "slip" constants, avoiding the ball showing the same "face" every time it's in the same place.

I'm at work now and i can't try it...

Oops!!! Antoni: that's what RelSpheremap would do. :*) Sorry, not RelLensmap but relspheremap.
y smiley is 24 bit.
[Image: anya2.jpg]

Genso's Junkyard:
http://rel.betterwebber.com/
Reply
#12
I tried that and it's probably closer than anything I've tried yet. I can't seem to find the right values for those slip constants though. :???:
Reply
#13
The distance between two sprites is 1 in horizontal or vertical direction, but is 1.41 or sqr(2) in the 45º direction, so the animation can't be so smooth..

Slip can be fixed and zero, if you want. The important one is k1.
Antoni
Reply
#14
Here's what the game looks like so far, if anyone was wondering. Wink
[Image: PoolShot.jpg]
Reply
#15
Wow looks nice. I wanna play it!
[Image: sig.php]
Back by popular demand!
I will byte and nibble you bit by bit until nothing remains but crumbs.
Reply
#16
DOC!!! care to send me a beta?
y smiley is 24 bit.
[Image: anya2.jpg]

Genso's Junkyard:
http://rel.betterwebber.com/
Reply
#17
Looks impressive!
16 balls x 100 bmp means 1600 bmp....a fair job!
Antoni
Reply
#18
Wow, impressive screen shot!
I'd be intrested in playing, or Beta testing,
whenever it's available.

Cya!

Nemesis
Reply
#19
Cool, thanks fellas. Wink

This may sound absurd, but I increased the number of images per ball to 400, so now it has 6400 images. I was trying to smooth out the animation. It runs fine on my PC, but I think I might have to add a little code to skip loading of some frames if there isn't enough XMS on other people's PC's... or I might just cut 'em back down to 100 images per ball. I'm not sure yet.

Rel: Okey dokey! :bounce:
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)