Log inRegister an accountBrowse CSDbHelp & documentationFacts & StatisticsThe forumsAvailable RSS-feeds on CSDbSupport CSDb Commodore 64 Scene Database
You are not logged in - nap
CSDb User Forums


Forums > C64 Coding > CL13 spring water- how ?
2015-08-04 13:10
Oswald

Registered: Apr 2002
Posts: 5084
CL13 spring water- how ?

anyone would care to share how the spring math works in there?

I've tried yesterday to make a simple spring, but it very rarely got close to resting, 8 out of 10 tweaks it "blows" up due to something google said is a problem with the euler equation. :)

so yes I'm trying to be lazy here and asking for the solution right away. Arok is less than 2 weeks away and I need to finish this fast :)

I've found verlet method, but dont understand it in the depth thats enough to turn it into 8 bit code.

for reference:

http://gamedevelopment.tutsplus.com/tutorials/make-a-splash-wit..

thanks,
 
... 10 posts hidden. Click here to view all posts....
 
2015-08-05 13:42
chatGPZ

Registered: Dec 2001
Posts: 11334
Quote:
just animate it

that actually seems the correct answer to the original question :=)
2015-08-05 14:07
Rudi
Account closed

Registered: May 2010
Posts: 125
Better do it in C or your language of choice before coding it in assembler. So you have an reference point. If c64 asm-code doesnt work you know its not the algorithm that is wrong. If you dont allready do that.

It takes a few tries to get something up and working. I made a cloth simulation ~10 years ago (in C on PC) and it worked very nicely after many tries. I learned from Hugo Elias also, he still have some of those great articles and pseudocode on subjects like these here:

http://freespace.virgin.net/hugo.elias/models/m_string.htm
and
http://freespace.virgin.net/hugo.elias/models/m_cloth.htm
2015-08-05 19:36
Oswald

Registered: Apr 2002
Posts: 5084
well, adding up a few 16 bit values and a table lookup looked simple enough to go straight for it, the problem rather was I did not fully understand the math, also the article gives a source code without damping and then later talks about damping.

now I've wrote the code by looking at that incomplete source snippet.

animating it is out of the q, in fact its simpler to make this realtime imho. why animate stuff thats a few dozens of 16 bit adds and table lookups.

remember kids, realtime rules :)
2015-08-05 20:42
Digger

Registered: Mar 2005
Posts: 425
Oswald, here you can edit the code online and strip it out until you get the idea :) http://paperjs.org/examples/future-splash/
2015-08-06 00:28
Martin Piper

Registered: Nov 2007
Posts: 711
Verlet maths can be quite sensitive to numerical accuracy because small numerical errors can get magnified quite quickly without suitable damping.

For example https://github.com/martinpiper/C64Public/blob/master/Verlet/Tes..
Previous - 1 | 2 - Next
RefreshSubscribe to this thread:

You need to be logged in to post in the forum.

Search the forum:
Search   for   in  
All times are CET.
Search CSDb
Advanced
Users Online
Higgie/Kraze/Slackers
TheRyk/MYD!
Quetzal/Chrome
Krill/Plush
sln.pixelrat
Pat Boon/CFA
Shake/Role
Dirk/Warriors of Dar..
iAN CooG/HVSC
Ice Breaker/DWI
GI-Joe/MYD!
CA$H/TRiAD
E$G/HF ⭐ 7
Guests online: 170
Top Demos
1 Next Level  (9.7)
2 13:37  (9.7)
3 Coma Light 13  (9.7)
4 Edge of Disgrace  (9.6)
5 Mojo  (9.6)
6 Uncensored  (9.6)
7 Wonderland XIV  (9.6)
8 Comaland 100%  (9.6)
9 No Bounds  (9.6)
10 Unboxed  (9.5)
Top onefile Demos
1 We Come In PETSCII  (9.8)
2 Layers  (9.6)
3 Party Elk 2  (9.6)
4 Cubic Dream  (9.6)
5 Copper Booze  (9.6)
6 Libertongo  (9.5)
7 Moving Balls  (9.5)
8 Rainbow Connection  (9.5)
9 My Song for you  (9.5)
10 Morph  (9.5)
Top Groups
1 Performers  (9.3)
2 Booze Design  (9.3)
3 Oxyron  (9.3)
4 Fossil  (9.3)
5 Nostalgia  (9.3)
Top Graphicians
1 Mirage  (9.7)
2 Archmage  (9.7)
3 Mikael  (9.6)
4 Carrion  (9.6)
5 Sulevi  (9.6)

Home - Disclaimer
Copyright © No Name 2001-2024
Page generated in: 0.054 sec.