coolest game EVER!!!

Got a brilliant program idea? Let us know!

Moderator: MaxCoderz Staff

User avatar
DigiTan
Calc Master
Posts: 1069
Joined: Fri 04 Mar, 2005 12:52 am
Location: NW Wisconsin
Contact:

Post by DigiTan »

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]
threefingeredguy
Calc King
Posts: 2195
Joined: Sun 27 Mar, 2005 4:06 am
Location: sleeping
Contact:

Post by threefingeredguy »

You don't have to stop using the ion libraries. If you intend to use a shell, then save the space. Unless you need a sprite routine that isn't XOR. Then use sigma's or movax's. I heard those were faster, though I have never checked.
Image
CompWiz
Calc King
Posts: 1950
Joined: Thu 13 Oct, 2005 1:54 pm
Location: UB

Post by CompWiz »

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?
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. :)

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 Image
Liazon
Calc Guru
Posts: 962
Joined: Thu 27 Oct, 2005 8:28 pm

Post by Liazon »

I, myself have not started, mainly because I have no clue where to start when it comes to physics (not an available course until next year).
Image Image Image
CompWiz
Calc King
Posts: 1950
Joined: Thu 13 Oct, 2005 1:54 pm
Location: UB

Post by CompWiz »

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.
In Memory of the Maxcoderz Trophy Image
threefingeredguy
Calc King
Posts: 2195
Joined: Sun 27 Mar, 2005 4:06 am
Location: sleeping
Contact:

Post by threefingeredguy »

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.
Image
Patori
Maxcoderz Staff
Posts: 1479
Joined: Sat 18 Dec, 2004 3:51 am
Location: Toledo, Ohio, USA

Post by Patori »

threefingeredguy wrote: But why do real physics.
Amen to that. I don't think a game would be much fun if a sprite fell too fast to control, or too slow for that matter either.
Currently coming up with a new signature idea... since my forum avatar changer was killed by an upgrade...
CompWiz
Calc King
Posts: 1950
Joined: Thu 13 Oct, 2005 1:54 pm
Location: UB

Post by CompWiz »

That's true. Fun to play is way more important than having realistic physics.
In Memory of the Maxcoderz Trophy Image
katmaster
Sir Posts-A-Lot
Posts: 252
Joined: Tue 09 Aug, 2005 9:34 pm
Location: south of the north pole
Contact:

Post by katmaster »

calcu831415 wrote:It's good to hear katmaster's done a lot of ASM programming already
Who said that?!?! I've probably done about as much as you have.

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......
cheese=yum
Image
User avatar
kalan_vod
Calc King
Posts: 2932
Joined: Sat 18 Dec, 2004 6:46 am
Contact:

Post by kalan_vod »

This may help with understanding about sprites down the road.
threefingeredguy
Calc King
Posts: 2195
Joined: Sun 27 Mar, 2005 4:06 am
Location: sleeping
Contact:

Post by threefingeredguy »

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.
Image
CompWiz
Calc King
Posts: 1950
Joined: Thu 13 Oct, 2005 1:54 pm
Location: UB

Post by CompWiz »

threefingeredguy wrote:Email the author and I can convert it to pseudo code for you.
about what? The flash file is freely downloadable. What do you want?
In Memory of the Maxcoderz Trophy Image
Liazon
Calc Guru
Posts: 962
Joined: Thu 27 Oct, 2005 8:28 pm

Post by Liazon »

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.
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.

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.
Image Image Image
threefingeredguy
Calc King
Posts: 2195
Joined: Sun 27 Mar, 2005 4:06 am
Location: sleeping
Contact:

Post by threefingeredguy »

CompWiz wrote:
threefingeredguy wrote:Email the author and I can convert it to pseudo code for you.
about what? The flash file is freely downloadable. What do you want?
The swf file is freely downloadable, but I need the FLA file. Unless you wanna find a compatible decompiler.
Image
CompWiz
Calc King
Posts: 1950
Joined: Thu 13 Oct, 2005 1:54 pm
Location: UB

Post by CompWiz »

@TFG: e-mail sent. I'll let you know when I get a responce.

@calcul831415: working on physics when I get a chance. Feel free to look at the formulas from the pdf file I posted a link to .
In Memory of the Maxcoderz Trophy Image
Post Reply