numeric integration???

Übersicht BlitzBasic Allgemein

Neue Antwort erstellen

biggicekey

Betreff: numeric integration???

BeitragMo, Jan 24, 2005 13:29
Antworten mit Zitat
Benutzer-Profile anzeigen
"Numeric What? Shocked Question Question Shocked

You may perhaps not be aware that you are doing numeric integration. But nevertheless, most games are doing numeric integration somewhere in their code, whether the authors realised it or not. Imagine some 2d top down space shooter where the player controls a little space ship. To make sure the game speed doesn't depend on the CPU speed, the movement code is called 50 times a second, independent of the frame rate. The following code, for example, could be used in the movement code to update the player's position on the screen.

position.x += velocity.x * timestep
position.y += velocity.y * timestep

This is known as an Euler integrator: a variable is continually updated by adding its first derivative times the timestep"


ich hab das hier gefunden, und brauch es für eine "realistische" carphysik in einem meiner "projekte"

könnt ihr mir das erklären???
und wie kann ich das in bb3d umsetzen???

ohne dass "memory acces dingsbums" und so weiter auftreten.

muss ja irgendwie mit fps zusammenhängen...

bis dann gruß icekey

BladeRunner

Moderator

BeitragMo, Jan 24, 2005 13:35
Antworten mit Zitat
Benutzer-Profile anzeigen
Das ist nichts anderes als frameunabhängiges Bewegen. Guck mal in den FAQ nach, da müsste ein schönes Tutorial von Ionpainter zu diesem Thema zu Finden sein.
Zu Diensten, Bürger.
Intel T2300, 2.5GB DDR 533, Mobility Radeon X1600 Win XP Home SP3
Intel T8400, 4GB DDR3, Nvidia GF9700M GTS Win 7/64
B3D BMax MaxGUI

Stolzer Gewinner des BAC#48, #52 & #92

Neue Antwort erstellen


Übersicht BlitzBasic Allgemein

Gehe zu:

Powered by phpBB © 2001 - 2006, phpBB Group