Author Topic: GRAVLAB II  (Read 2879 times)

0 Members and 1 Guest are viewing this topic.

leofox

  • Guest
GRAVLAB II
« on: September 24, 2006, 06:33:00 am »
Gravlab was a little test program i made in TI-basic, a demo of a falling and bouncing ball. For my senior assignment (or w/e you call that in English), i decided to remake it in ASM/Basic.
In essence, it's now a physically accurate simulation of a ball falling in vacuum. Features i plan to add are multiple objects, friction, realistic collision , shooting the ball (giving it a certain start velocity) and maybe even wind.
I don't plan to use it in a game, it's main purpose is demonstration in physics class, clarifying gravity. Similar programs are already used in physics class, but usually the teacher does the settings and the students only watch. Gravlab II would allow every student to figure it out by themself.

Basic/ASM means that the main menu and user input is written in TI Basic, but the actual graphical simulation (where accuracy and speed are so very much needed) is 100% Assembly without any rom calls in the main loop.

a screenie:
user posted image
Values here are acceleration of $00,$00,$01 and frameskip of $80.
In human, that means the acceleration is 1/65536th of a pixel, but it only draws one in 128 frames (so it runs at a decent speed). It's kinda jumpy now, but that's because most of the speed is spent on calculating. Higher acceleration is recommended, so you can lower the frameskip for a smoother picture. You lose a bit of accuracy though, but that shouldn't matter because the speed barely goes above 1pixel anyway (the problem with these is that if your speed is too high, objects will fall through each other).

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55943
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
GRAVLAB II
« Reply #1 on: September 24, 2006, 08:15:00 am »
wow nice I experienced ball bouncing a while ago in BASIC, however I dont have the program anymore I had it bounce around and I could make it move right or left, maybe some kind of games could be made with it? Like where you have to get a bouncing ball through several levels without hitting vertical walls?

leofox

  • Guest
GRAVLAB II
« Reply #2 on: September 24, 2006, 08:10:00 pm »
You can set the values at the beginning, so i could make a little bonus game where you have to guide the ball through a series of levels by choosing the right values.

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55943
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
GRAVLAB II
« Reply #3 on: September 25, 2006, 02:40:00 am »
aaah that sound cool, it would be fun i think, or some kind of pong game ^^

elfprince13

  • Guest
GRAVLAB II
« Reply #4 on: September 25, 2006, 02:54:00 am »
this looks kinda cool, are you gonna have walls and stuff like that?

leofox

  • Guest
GRAVLAB II
« Reply #5 on: September 26, 2006, 02:32:00 am »
Now it just checks for a value to determine a horizontal line, but i want to change that so it pixel checks. That might give trouble with realistic collision of other balls though.

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55943
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
GRAVLAB II
« Reply #6 on: September 26, 2006, 04:34:00 am »
ouch considering the ball is circular >.< that may be one though thing...

leofox

  • Guest
GRAVLAB II
« Reply #7 on: October 03, 2006, 06:36:00 am »
oh god i didnt even think of that one...

Offline Netham45

  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2103
  • Rating: +213/-4
  • *explodes*
    • View Profile
GRAVLAB II
« Reply #8 on: October 03, 2006, 07:48:00 am »
Maby you could use octagons? still round, but with flat sides.
Omnimaga Admin

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55943
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
GRAVLAB II
« Reply #9 on: October 04, 2006, 10:56:00 am »
well if the ball is small i think hit detection shouldnt be very complex. but if the ball is big(ger) it may be harder to calculate angle