So, I have started making a game for the TI-84+ and its called Plinko, which is played on The Price Is Right. I was wondering how I would go about keeping the board up on the screen and changing the "puck". I have the logic but when I draw a circle simulating the "drop" the previous puck locations are still on the board. Can anyone help me fix it?
I'm assuming you're using circle(x,y,r)? I recommend getting familiar with Basic Libraries, such as this function, like those found in Doors CS 7. With those, you'll be able to use a sprite and the library will do all the work: drawing, erasing the sprite when it moves.
What I suggest doing is drawing the board, using stopic to store it, then every time the puck moves clear the screen, recall the pic and then draw the new puck location, while this seems like more work than just erasing the puck in the long run it will be quicker and allow you to expand the method to work in other scenarios.
You can find my implementation of Plinko here
It was written long ago but is rather optimized and should be a good place to look for inspiration. If you have any questions please don't hesitate to ask.
You can find my implementation of Plinko here
It was written long ago but is rather optimized and should be a good place to look for inspiration. If you have any questions please don't hesitate to ask.
"Always code as if the person who will maintain your code is a maniac serial killer that knows where you live" -Unknown
"If you've done something right no one will know that you've done anything at all" -Futurama
"Have a nice day, or not, the choice is yours." Tom Steiner
<Michael_V> or create a Borg collective and call it The 83+
<Michael_V> Lower your slide cases and prepare to be silent linked. Memory clears are futile.
Actually, does Circle( support 0 like Line( does? I've never tested.
Code:
Code:
:Circle(32,24,6 // Draw the circle
:Circle(32,24,6,0 // Erase the circle
Well i tried that and it took forever to recall the pic. I don't seem to understand your code but I'll look more into it later when I have time.
Thank you very much!
Thank you very much!
odogollie wrote:
Well I'm trying to do it with out the help Doors CS 7.
Why? If you have lots of routines available to make your program faster and smaller, why reinvent the wheel?
Comic: Unfortunately, it does not support erasing.
Odogollie: If you're convinced about not using any Doors CS functions, I would indeed go with TheStorm's implementation. Don't forget that you could draw the degree symbol with Text() for a quick small circle too. Also, I'm considering moving this topic to TI-BASIC.
KermMartian wrote:
odogollie wrote:
Well I'm trying to do it with out the help Doors CS 7.
Why? If you have lots of routines available to make your program faster and smaller, why reinvent the wheel?Sometimes reinventing the wheel is the way to learn more And DoorsCS would just a dependency that could be avoided
AHelper wrote:
Sometimes reinventing the wheel is the way to learn more And DoorsCS would just a dependency that could be avoided
If everyone followed that logic, then the thousands of hours and years of my life that I spent developing the shell would have been a complete waste of time. Register to Join the Conversation
Have your own thoughts to add to this or any other topic? Want to ask a question, offer a suggestion, share your own programs and projects, upload a file to the file archives, get help with calculator and computer programming, or simply chat with like-minded coders and tech and calculator enthusiasts via the site-wide AJAX SAX widget? Registration for a free Cemetech account only takes a minute.
» Go to Registration page
» Go to Registration page
Page 1 of 1
» All times are UTC - 5 Hours
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Advertisement