Welcome,
Guest
. Please
login
or
register
.
Did you miss your
activation email
?
1 Hour
1 Day
1 Week
1 Month
Forever
Login with username, password and session length
Home
About
Team
Rules
Stats
Status
Sitemap
Chat
Downloads
Forum
News
Our Projects
Major Community Projects
Recent Posts
Unread Posts
Replies
Tools
SourceCoder3
Other Things...
Omnimaga Radio
TI-83 Plus ASM File Unsquisher
Z80 Conversion Tools
IES TI File Editor
Free RAM areas
Comprehensive Getkeyr table
URL Shortener
Online Axe Tilemap Editor
Help
Contact Us
Change Request
Report Issue/Bug
Team
Articles
Members
View the memberlist
Search For Members
Buddies
Login
Register
Omnimaga
»
Forum
»
Calculator Community
»
TI Calculators
»
Axe
(Moderator:
Runer112
) »
linear momentum
« previous
next »
Print
Pages: [
1
]
Go Down
Author
Topic: linear momentum (Read 3519 times)
0 Members and 1 Guest are viewing this topic.
leafy
CoT Emeritus
LV10
31337 u53r (Next: 2000)
Posts: 1554
Rating: +475/-97
Seizon senryakuuuu!
linear momentum
«
on:
January 20, 2011, 02:35:27 am »
How would you go about programming linear momentum in the x axis? for instance starting slow then easing into fast and when you stop pressing the arrow keys it takes a while to stop.
Logged
In-progress: Graviter (...)
Binder News
LV8
Addict (Next: 1000)
Posts: 785
Rating: +46/-3
Zombie of Tomorrow
Re: linear momentum
«
Reply #1 on:
January 20, 2011, 06:36:41 am »
I have an example of this.
It uses GDB1XS (I think) for the X speed. I used data for everything. Very few actual vars used.
Feel free to modify, but please give me credit.
«
Last Edit: January 20, 2011, 06:40:01 am by Binder News
»
Logged
Spoiler
For
userbars
:
Hacker-in-training! Z80 Assembly Programmer Axe Programmer
C++ H4X0R Java Coder I <3 Python!
Perdidisti ludum Cerebrum non habes
"We are humans first, no matter what."
"Fame is a vapor, popularity an accident, and riches take wings. Only one thing endures, and that is character."
Spoiler
For
Test Results
:
squidgetx
Food.
CoT Emeritus
LV10
31337 u53r (Next: 2000)
Posts: 1881
Rating: +503/-17
rawr.
Re: linear momentum
«
Reply #2 on:
January 20, 2011, 07:19:17 pm »
Basically you'd have a velocity and a change-in-velocity variable. Every frame velocity is increased by the change in velocity. Pressing keys would increase the change in velocity, and if no keys are pressed and the velocity is not 0, the velocity would decrease.
Or something like that (note: I didn't look at Binder News' program yet
)
«
Last Edit: January 20, 2011, 07:19:38 pm by squidgetx
»
Logged
Read my webcomic!
|
My SoundCloud
Projects:
[url=http://www.omnimaga.org/index.php?topic=5988.msg117813#msg117813]Check out the demo now!
- Current progress: battle engine and stuff
Proud author of:
Cuberunner
|
SpaceDash
|
The Psyche
|
XXEdit
|
AxeSynth
|
StickNinja
|
Gravity Guy
|
Embers:Phoenix
|
Zombie Gun
Axe: Need help optimizing?
User of Axe | zStart | TokenIDE | CalcGS | MirageOS
leafy
CoT Emeritus
LV10
31337 u53r (Next: 2000)
Posts: 1554
Rating: +475/-97
Seizon senryakuuuu!
Re: linear momentum
«
Reply #3 on:
January 20, 2011, 09:57:33 pm »
@Binder News could you document your code? I don't fully get what some of it means.
Or you could just explain what it means or something.
Logged
In-progress: Graviter (...)
Print
Pages: [
1
]
Go Up
« previous
next »
Omnimaga
»
Forum
»
Calculator Community
»
TI Calculators
»
Axe
(Moderator:
Runer112
) »
linear momentum