Calculator Community > HP Prime

Spaceinvader game

(1/6) > >>

Handmixer:
This is my current project
It seems that I am pushing the Prime to its limmits, since it runs slower on the calculator than in the emulator.
This is the raw game, no splach screens or score counting.
I am open for questions and comments

EDIT: After modifying the code and optimizing collision detection it seems to run much faster.
EDIT: Controls is mouse move ship, Enter - fire bullits, Esc - quit
EDIT: Log - change weapon
         Pick up greens for more energy
EDIT: added Alien boss level
EDIT:Some fade in added and levels start outside screen

DJ Omnimaga:
Oh that seems pretty nice so far. Are the graphics placeholders or did you plan to use them? I think a star background would be nice. Also do the graphics use rectangles? If that's the case, that's a quite clever, since DIMGROB sprite data is usually incredibly large compared to if sprites are pre-rendered with RECT_P commands. :)

Btw sorry for not replying sooner, I had a crazy two weeks of work and other activities. >.<

EDIT: Wow this is pretty impressive. I am surprised at the slow on-calc speed, though, considering I had some advanced graphical animations running at over 15 FPS, sometimes much higher (even 3D). I wonder if there isn't some command somewhere that could be slowing the game down considerably or if some for loops could be merged together to reduce the wait (or maybe the amount of bullets on the screen at once reduced to 5-10 max instead of 20)? On the previous firmware, INT() was often the culprit. Or could there be things that could simply be pre-rendered and only updated if necessary? (For example, when you draw the enemy ships, one trick could be to display all of them and all their frames in an extra GROB then instead of drawing each ship individually every loop, you just display the entire GROB in one BLIT command. To update the ship army when one is destroyed or when a  new wave appears, you just do it once an enemy is shot).

Also make sure to remove the WAIT commands for the calc version. :)

One thing I like a lot is how we can use the touch screen to move the ship and ESPECIALLY the explosion at the end, which is very reminiscent from Axe Parser games :).

XiiDraco:
I get entirely how the touchscreen works with its lists but, can't get the syntax for lists right on the prime yet. >_< Then again I pretty much never touch the thing now that I'm working on Abandoned. I should make a game for prime but I'm too lazy.

Anyway nice game Handmixer!

Handmixer:
The graphic is predrawn into G3, so that G3 contains all animations. This takes up less space.
In the end of the gameloop there is a WAIT(0.05), this is entirely for the emulator, since it will run to fast.

The gameloop doe contain a lot of FOR-loops for moving, collision detect and rendering, I Think that it may be possible to optimize by reducing to a few FOR loops.

Star background is a good idea. It could be predrawn i G4 and Blit'ed to the render buffer at the beginning of each render cycle

Hayleia:
I don't know a lot about the Prime and your game, but if all Invaders move at the same time and in the same direction, couldn't you have one image with them all instead of separate images so that it is faster to move them all ? And when one is hit, you edit the image, would that be possible ?

Navigation

[0] Message Index

[#] Next page

Go to full version