Join us on Discord!
You can help CodeWalrus stay online by donating here.

Bounce [TI84+CE]

Started by MateoConLechuga, October 15, 2016, 11:45:11 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

MateoConLechuga

This is a simple program I made today that can bounce hundreds of balls around the screen and has the ability to add, remove, and clear and change the graphics of. It is a pretty entertaining program, and the source code is something you should really peruse if you wish to take a look at how to use interrupts and the keypad in your C programs. Enjoy :)

Download: BounceCE



[on]     - Quits the program
[clear]  - Clears the screen
[del]    - Delete latest ball
[+]      - Shows number of balls
[-]      - Switches between filled and outline
[enter]  - Toggles background color

p2

each time they hit a border they should get a bit more transparent  so balls tend to disappear after a while ^^
How many balls can teh calc handle without slowing down? :) Could you att a balls-counter as well as a fps-counter? :)

I loke those bouncing balls  :love:
  • Calculators owned: ti-83+, ti-84+, ti-84+, ti-84+se, ti-84+se(te), ti-nsphire, ti-nsphire CAS, ti-nsphire CX-CAS, ti-voyage, ti-voyage, Who reads this list anyways...?
Anyway war sucks. Just bring us your food instead of missiles  :P ~ DJ Omnimaga (11.10.2016 20:21:48)
if you cant get a jframe set up, draw stuff to it, and receive input, i can only imagine how horrible your game code is _._   ~ c4ooo (14.11.2016 22:44:07)
If they pull a Harambe on me tell my family I love them ~ u/Pwntear37d (AssangeWatch /r/)
make Walrii great again ~ DJ Omnimaga (28.11.2016 23:01:31)
God invented the pc, satan the smartphone I guess ~ p4nix (16.02.2017 22:51:49)

kotu

Quote from: p2 on October 16, 2016, 07:10:11 PM
each time they hit a border they should get a bit more transparent  so balls tend to disappear after a while ^^

you would need to use 16 bit color for that so then you won't be able to use double buffering so would get flicker.  :'(

*edit*
want the download for this Mateo lol
  • Calculators owned: TI 84+CE-T
  • Consoles, mobile devices and vintage computers owned: Sega Master System, Sony PlayStation 3
SUBSCRIBE TO THE FUTURERAVE.UK MAILING LIST
http://futurerave.uk

p2

aaah I see okey. Then better NOT adding anything ^^ Nothing worse than this annoying screen flickering...  :ninja:
One day I need to get such a calculator, too... :P nSphire CX CAS won't do it I guess... :/

*NOOO I did my 500th post here instead of in the posting milestones threat... :'( stupid me <_<
  • Calculators owned: ti-83+, ti-84+, ti-84+, ti-84+se, ti-84+se(te), ti-nsphire, ti-nsphire CAS, ti-nsphire CX-CAS, ti-voyage, ti-voyage, Who reads this list anyways...?
Anyway war sucks. Just bring us your food instead of missiles  :P ~ DJ Omnimaga (11.10.2016 20:21:48)
if you cant get a jframe set up, draw stuff to it, and receive input, i can only imagine how horrible your game code is _._   ~ c4ooo (14.11.2016 22:44:07)
If they pull a Harambe on me tell my family I love them ~ u/Pwntear37d (AssangeWatch /r/)
make Walrii great again ~ DJ Omnimaga (28.11.2016 23:01:31)
God invented the pc, satan the smartphone I guess ~ p4nix (16.02.2017 22:51:49)

kotu

Quote from: kotu on October 17, 2016, 10:23:12 PM
want the download for this Mateo lol
found the suspicious download lol
  • Calculators owned: TI 84+CE-T
  • Consoles, mobile devices and vintage computers owned: Sega Master System, Sony PlayStation 3
SUBSCRIBE TO THE FUTURERAVE.UK MAILING LIST
http://futurerave.uk

c4ooo

Quote from: p2 on October 17, 2016, 10:26:30 PM
aaah I see okey. Then better NOT adding anything ^^ Nothing worse than this annoying screen flickering...  :ninja:
One day I need to get such a calculator, too... :P nSphire CX CAS won't do it I guess... :/

*NOOO I did my 500th post here instead of in the posting milestones threat... :'( stupid me <_<
Shhh you can pretend like this is actually not your 502nd post :ninja:
Also crap i missed my 700th post >_>

kotu

Ok cool

Mateo, would you agree with me the use of interrupts in this manner is an 'advanced' technique and should be treated with caution??

In this case, in the for(i=0; i<num_balls; i++) { loop, i could actually become equal to num_balls or greater than it because of the interrupt. In this particular example, everything is ok, however, things might not be the case in other examples.

Agreed?
  • Calculators owned: TI 84+CE-T
  • Consoles, mobile devices and vintage computers owned: Sega Master System, Sony PlayStation 3
SUBSCRIBE TO THE FUTURERAVE.UK MAILING LIST
http://futurerave.uk

Dream of Omnimaga

THis looks cool. I'll give this a try when I have a chance. I am definitively curious about the on-calc speed. :)

If you are using shapes instead of sprites, would the speed be similar with sprites?
  • Calculators owned: TI-82 Advanced Edition Python TI-84+ TI-84+CSE TI-84+CE TI-84+CEP TI-86 TI-89T cfx-9940GT fx-7400G+ fx 1.0+ fx-9750G+ fx-9860G fx-CG10 HP 49g+ HP 39g+ HP 39gs (bricked) HP 39gII HP Prime G1 HP Prime G2 Sharp EL-9600C
  • Consoles, mobile devices and vintage computers owned: Huawei P30 Lite, Moto G 5G, Nintendo 64 (broken), Playstation, Wii U

MateoConLechuga

Quote from: DJ Omnimaga on October 19, 2016, 03:22:59 AMIf you are using shapes instead of sprites, would the speed be similar with sprites?
Speed would probably be at least a quarter faster with sprites :) Circles kind of take a while to draw.

Dream of Omnimaga

Hm I see. That's good then I guess, especially if someone plans to port nKaruga to the CE or something :P
  • Calculators owned: TI-82 Advanced Edition Python TI-84+ TI-84+CSE TI-84+CE TI-84+CEP TI-86 TI-89T cfx-9940GT fx-7400G+ fx 1.0+ fx-9750G+ fx-9860G fx-CG10 HP 49g+ HP 39g+ HP 39gs (bricked) HP 39gII HP Prime G1 HP Prime G2 Sharp EL-9600C
  • Consoles, mobile devices and vintage computers owned: Huawei P30 Lite, Moto G 5G, Nintendo 64 (broken), Playstation, Wii U

Powered by EzPortal