Breakout! - Printable Version +- HP Forums (https://www.hpmuseum.org/forum) +-- Forum: HP Software Libraries (/forum-10.html) +--- Forum: HP Prime Software Library (/forum-15.html) +--- Thread: Breakout! (/thread-317.html) |
Breakout! - Egan Ford - 01-04-2014 06:07 AM Caveats, notes, etc...:
To play:
Video: RE: HP Prime Breakout! - Egan Ford - 01-04-2014 06:08 AM 2nd video using emulator. Colors look better. But nothing looks better than the real thing. RE: HP Prime Breakout! - Kevin Ouellet - 01-04-2014 07:12 AM Very nice! One suggestion I would have for players who are more used to directional controls would be to add d-pad controls allowing the user to press left and right to move the paddle around. With the touch screen it can be akward since your fingers often blocks the ball view, so those who are not used to playing games on a smartphone might have trouble beating just one level. RE: HP Prime Breakout! - ArielPalazzesi - 01-04-2014 09:30 AM (01-04-2014 07:12 AM)Kevin Ouellet Wrote: Very nice! +1 RE: HP Prime Breakout! - Egan Ford - 01-04-2014 03:57 PM (01-04-2014 07:12 AM)Kevin Ouellet Wrote: One suggestion I would have for players who are more used to directional controls would be to add d-pad controls allowing the user to press left and right to move the paddle around. With the touch screen it can be awkward since your fingers often blocks the ball view, so those who are not used to playing games on a smartphone might have trouble beating just one level. The keyboard may be a challenge. Paddle-based games like Pong and Breakout usually have an absolute value paddle with stops at each end returning a value of 0 - 255 (for 8-bit systems) that can be used to know exactly where to place the paddle. That is how this touchscreen pong also works. Touchscreen challenged players can hold the Prime like a Gameboy and use two thumbs and just touch the screen (not touch-drag) and the paddle will jump to that position. I meant to video that, but forgot. For fat fingers, one can decrement paddle_y at the top of the code to move the paddle up. I tried to place the paddle where one could drag the paddle and have the paddle align with one's fingernail. Spinner-based games like Arkanoid and Tempest rely on measuring variable velocity or acceleration and the stops are in the software. Digital d-pads provide neither absolute position or velocity making them poor for paddle and spinner-based games. However ... I have three possible options for D-pad support: A. The D-pad is an accelerator. While holding the left or right arrow the paddle accelerates, if left or right is released the paddle could full stop or coast to stop. With full stop I expect most will overshoot and with coast-to-stop there will be some training. Coast-to-stop aligns with button-based games that require acceleration, e.g. Asteroids. I think most could learn this. Rapid breaking can be implemented by using the opposite direction. B. The D-pad with linear velocity based on the current ball x velocity (e.g. 1.25 * vx * speed adjustment). This would align with the player's desire. If the ball is moving in the +x or -x direction fast, then you want to track it fast, and vv. This would be easier to implement and possibly be easier for users to learn quicker. Releasing left or right would full stop the paddle. C. Do nothing and hope that users can learn to use the touchscreen. If clearing a level is too hard just change base_ticks to 30, 35, or 40. The game will start out slower and very easy until you hit an orange or red brick, then it will be harder, but not as hard as it is now. Another option would be to change the fast speed (hardcoded) from 2 to 1.5. There are endless permutations to tune this game. RE: HP Prime Breakout! - Mic - 01-05-2014 07:54 AM Very impressive ! RE: HP Prime Breakout! - tgallo - 01-05-2014 09:20 AM awesome!! RE: HP Prime Breakout! - Thomas Klemm - 01-09-2014 10:32 PM Image search on google for: Atari Breakout RE: HP Prime Breakout! - tgallo - 01-09-2014 10:50 PM (01-09-2014 10:32 PM)Thomas Klemm Wrote: Image search on google for: Atari Breakout AWESOME! RE: Breakout! - Dante - 02-03-2014 03:32 AM Hi! I've downloaded the zip file, unzip it, and there are two files. I can't get it to run, How can I make it run? Thank you! RE: Breakout! - Egan Ford - 02-03-2014 05:11 PM (02-03-2014 03:32 AM)Dante Wrote: I've downloaded the zip file, unzip it, and there are two files. I can't get it to run, How can I make it run? Use the connectivity kit or equiv to upload to your calc the file breakout.hpprgm. RE: Breakout! - Dante - 02-04-2014 06:24 AM I use the virtual HP Prime emulator, I've sent the .hpprgm file to the emulator's working folder, then go to program catalog and run it from there, but nothing happens! I maybe doing something wrong. RE: Breakout! - Han - 02-04-2014 08:24 PM Open the source file, and then immediately exit it. This forces the program to be recompiled. The .hpprgrm file contains more than just source code. By recompiling, you are ensuring everything is matched with your calculator. If there is any incompatibility between your settings and the source code, it will show up during this process. RE: Breakout! - Dante - 02-05-2014 04:26 PM Hi Han! What do you mean by opening the source file? you mean open it with the connectivity kit or the Emulator? and I guess the source file is the one without .hpprgrm extension! RE: Breakout! - debrouxl - 02-05-2014 05:22 PM The program suitable for the calculator / emulator is in the .hpprgm file as a UTF-16LE string (sometimes prefixed by binary metadata). RE: Breakout! - Han - 02-05-2014 07:16 PM (02-05-2014 04:26 PM)Dante Wrote: Hi Han! After the program has been transferred to the calculator, press [Shift][2] to open the program catalog. Select the program and press [ENTER] to "open" the source file for the program. Then simply hit [ESC] (or better, use "Check" from the menu at the bottom of the screen) to see if there are any errors. Hopefully, there are no errors. What you effectively did was "recompiled" the program. RE: Breakout! - Dante - 02-06-2014 09:04 PM I've downloaded the file from the link above and I've sent both files to the HP Prime working folder on my PC, then launch the HP Prime Virtual Calculator and go to the program catalog [Shift+2], there's only one file called Breakout, I select it and click [Enter] like if I was going to edit it, and there's nothing but the common headers like when you're going to start a new program (I've attached an animated thumbnail). I repeat, there is only one file when you open the calculator's program catalog, I can't see the source file! RE: Breakout! - Han - 02-07-2014 04:46 AM Looks like you found the issue. A program with no code will do nothing. What version of the emulator are you running? Is it the most recently updated one? RE: Breakout! - danielmewes - 01-04-2015 06:58 AM Very nice game! |