coolest game EVER!!!
Moderator: MaxCoderz Staff
I'd maybe contact CoBB and Joe Permberton for the hard-hitting questions on discrete physics. The Sonic team and myself can also lend some support, but a lot of this stuff is new territory for us as well. That's the real ball-breaker: the physics.
My diet consists of nails, code-stealers, and HP fans.
Projects:
Robot War [TI-82, TI Flash App]
Sonic the Hedgehog [Multiplatform]
Projects:
Robot War [TI-82, TI Flash App]
Sonic the Hedgehog [Multiplatform]
-
- Calc King
- Posts: 2195
- Joined: Sun 27 Mar, 2005 4:06 am
- Location: sleeping
- Contact:
Until I know more about asm programming(I have started to learn it) or until katmaster responds, you are the best able to make those types of decisions. Forum members with more asm experience will probably be most able to answer your questions.(thanks tfg) Feel free to do what you think is best.calcul831415 wrote:@katmaster and CompWiz: Do you guys want to use ION libraries to put sprites for now and then build our own sprite routine later?
And we all have time restraints. If you don't get a whole lot of time, I'm sure we can all relate. Anything you have time for is great.
Last edited by CompWiz on Fri 06 Jan, 2006 3:29 am, edited 1 time in total.
In Memory of the Maxcoderz Trophy
I am actually taking physics right now. I can answer physics questions. In fact, here is the physics reference tables packet that we use in school. It has a bunch of great formulas at the end, and good constants(like acceleration due to gravity) on the first page. I'd be happy to answer any physics questions you may have, as I have a good amount of experience using these forumulas. As to the coding of physics, DigiTan is working on that for sonic, and no doubt knows all about it.
Just thinking about it, here are a few things to get you started: gravity pulls down with an acceleration of 9.81m/(s^2). (m/(s^2) is the unit). However, when the person jumps, they go higher if you hold down the button longer. Therefore, this would not work alone to determine jump height. If it did, you could just do 0=(initial velocity)^2 +2(9.81)d. Solve for d, then put the initial velocity in.
Hmm, I'm guessing a lot of this wouldn't make a whole lot of sense to someone who hasn't taken physics yet. Well, like I've said, ask me about any physics stuff, I can give you the formulas you need to program in, and how to use them.
Just thinking about it, here are a few things to get you started: gravity pulls down with an acceleration of 9.81m/(s^2). (m/(s^2) is the unit). However, when the person jumps, they go higher if you hold down the button longer. Therefore, this would not work alone to determine jump height. If it did, you could just do 0=(initial velocity)^2 +2(9.81)d. Solve for d, then put the initial velocity in.
Hmm, I'm guessing a lot of this wouldn't make a whole lot of sense to someone who hasn't taken physics yet. Well, like I've said, ask me about any physics stuff, I can give you the formulas you need to program in, and how to use them.
In Memory of the Maxcoderz Trophy
-
- Calc King
- Posts: 2195
- Joined: Sun 27 Mar, 2005 4:06 am
- Location: sleeping
- Contact:
Subsitute 10 for 9.81 to get slightly less exact results but easier calculations. Or, if you like bcalls, theres a htimes9 or hltimes9 that you can use if you subsitute 9. Or you can use feet, that gives you a nice 16 (or 32 depending on how you look at it) which can be calculated quickly and easily with bit shifting or add hl,hl a bunch of times.
But why do real physics. I suggest trying that equation with varying values to find was is easiest to translate into your graphics. For example, you can do 16, but then have to scale down the size of the movements so it stays within a reasonable range, or you could do 4, making up your own gravity, use smaller numbers for acceleration, and generally have an easier time of it.
But why do real physics. I suggest trying that equation with varying values to find was is easiest to translate into your graphics. For example, you can do 16, but then have to scale down the size of the movements so it stays within a reasonable range, or you could do 4, making up your own gravity, use smaller numbers for acceleration, and generally have an easier time of it.
-
- Sir Posts-A-Lot
- Posts: 252
- Joined: Tue 09 Aug, 2005 9:34 pm
- Location: south of the north pole
- Contact:
Who said that?!?! I've probably done about as much as you have.calcu831415 wrote:It's good to hear katmaster's done a lot of ASM programming already
As for learning ASM, I'm on about day 12/13. I'm getting dsl soon, so I'll be tied up with that for a bit. Otherwise, it's going well.
As for sprites, I think ION will be fine. Does anyone have a ION learning guide, cuz I only know a little bit about using ION....
As for physics, I wonder if we can get the source code for N-game itself. Does flash use source code? I've never tried using it......
This may help with understanding about sprites down the road.
-
- Calc King
- Posts: 2195
- Joined: Sun 27 Mar, 2005 4:06 am
- Location: sleeping
- Contact:
Flash has actionscript and you can decompile an swf, sometimes. Email the author and I can convert it to pseudo code for you. Actionscript is remarkably like java, so if you guys know java you could convert it yourself.
As to learning ION, andy's asm pack on ticalc.org contains a file called ionguru (actually it's called ig) which contains a very vague example of how to use the ion functions. It provides input, which is all you need, I guess.
As to learning ION, andy's asm pack on ticalc.org contains a file called ionguru (actually it's called ig) which contains a very vague example of how to use the ion functions. It provides input, which is all you need, I guess.
The jumping engine I have right now (really bad and pathetic, but at least have to start somewhere) in the Santa Game uses a constant fall down of 1 pixel per loop cycle. (it cuts one pixel from the y position of the sprite at the end of the giant game loop) Going up means storing the maximum height in the y position of the sprite (I originally only had my elf sprite jump about 6 pixels) It doesn't really look like jumping. Perhaps I can add some code to modify how long it takes to fall down.CompWiz wrote:I am actually taking physics right now. I can answer physics questions. In fact, here is the physics reference tables packet that we use in school. It has a bunch of great formulas at the end, and good constants(like acceleration due to gravity) on the first page. I'd be happy to answer any physics questions you may have, as I have a good amount of experience using these forumulas. As to the coding of physics, DigiTan is working on that for sonic, and no doubt knows all about it.
Just thinking about it, here are a few things to get you started: gravity pulls down with an acceleration of 9.81m/(s^2). (m/(s^2) is the unit). However, when the person jumps, they go higher if you hold down the button longer. Therefore, this would not work alone to determine jump height. If it did, you could just do 0=(initial velocity)^2 +2(9.81)d. Solve for d, then put the initial velocity in.
Hmm, I'm guessing a lot of this wouldn't make a whole lot of sense to someone who hasn't taken physics yet. Well, like I've said, ask me about any physics stuff, I can give you the formulas you need to program in, and how to use them.
I assume exponential acceleration would involve at least two counters (one for the # adn it's current power?) In N-Game, we need to achieve loftiness at the peak of the jumps. Ah, just store the last pixel increase into a variable and then do add hl,hl or sra a to double the position change.
-
- Calc King
- Posts: 2195
- Joined: Sun 27 Mar, 2005 4:06 am
- Location: sleeping
- Contact: