QB64 Phoenix Edition
Poly Blaster - a physics-based ball blasting game! - Printable Version

+- QB64 Phoenix Edition (https://qb64phoenix.com/forum)
+-- Forum: QB64 Rising (https://qb64phoenix.com/forum/forumdisplay.php?fid=1)
+--- Forum: Code and Stuff (https://qb64phoenix.com/forum/forumdisplay.php?fid=3)
+---- Forum: Games (https://qb64phoenix.com/forum/forumdisplay.php?fid=57)
+---- Thread: Poly Blaster - a physics-based ball blasting game! (/showthread.php?tid=3064)

Pages: 1 2 3 4


RE: Poly Blaster - a physics-based ball blasting game! - Dav - 09-24-2024

What a super game, @RokCoder!  Nice looking, simple and fun to play.  The code is great too.  Sure wish I knew how to use GL stuff.

When I get back home tonight, I'll try to see how far I can get in the game.  Won't be near Terry I'm sure.

- Dav


RE: Poly Blaster - a physics-based ball blasting game! - TerryRitchie - 09-24-2024

(09-24-2024, 07:54 PM)Dav Wrote: What a super game, @RokCoder!  Nice looking, simple and fun to play.  The code is great too.  Sure wish I knew how to use GL stuff.

When I get back home tonight, I'll try to see how far I can get in the game.  Won't be near Terry I'm sure.

- Dav
Be one with the balls. Cool


RE: Poly Blaster - a physics-based ball blasting game! - RokCoder - 09-24-2024

(09-24-2024, 07:54 PM)Dav Wrote: What a super game, @RokCoder!  Nice looking, simple and fun to play.  The code is great too.  Sure wish I knew how to use GL stuff.

When I get back home tonight, I'll try to see how far I can get in the game.  Won't be near Terry I'm sure.

- Dav
Cheers Dav! I have no idea what dark arts Terry is using to get his scores!


RE: Poly Blaster - a physics-based ball blasting game! - TerryRitchie - 09-25-2024

(09-24-2024, 10:06 PM)RokCoder Wrote:
(09-24-2024, 07:54 PM)Dav Wrote: What a super game, @RokCoder!  Nice looking, simple and fun to play.  The code is great too.  Sure wish I knew how to use GL stuff.

When I get back home tonight, I'll try to see how far I can get in the game.  Won't be near Terry I'm sure.

- Dav
Cheers Dav! I have no idea what dark arts Terry is using to get his scores!
It must have been a fluke. I played for like 2 hours today and only managed a little over 19K on hard difficulty. Smile


RE: Poly Blaster - a physics-based ball blasting game! - TerryRitchie - 09-25-2024

There is one improvement that could be made to the game to make it perfect. The mouse pointer does not equal where the balls will go. In Peggle where you place the mouse pointer that is where the ball will shoot. The mouse pointer is always a bit off. Perhaps hide the mouse pointer and have a small bulls-eye icon or something like that instead that never leaves the screen but is true to where the balls will aim for.

So many times I've miscalculated at the worst possible moment because I keep forgetting the mouse pointer is not what I should be aiming for.

The game is hella fun otherwise!


RE: Poly Blaster - a physics-based ball blasting game! - RokCoder - 09-25-2024

(09-25-2024, 02:03 AM)TerryRitchie Wrote: There is one improvement that could be made to the game to make it perfect. The mouse pointer does not equal where the balls will go. In Peggle where you place the mouse pointer that is where the ball will shoot. The mouse pointer is always a bit off. Perhaps hide the mouse pointer and have a small bulls-eye icon or something like that instead that never leaves the screen but is true to where the balls will aim for.

So many times I've miscalculated at the worst possible moment because I keep forgetting the mouse pointer is not what I should be aiming for.

The game is hella fun otherwise!
The mouse pointer was where you were aiming at with the idea you had to take gravity into account yourself. In retrospect I don't know why I thought that was a good idea! Thanks for your suggestion - I've updated it to pass through the mouse pointer now (which involved gnarlier maths than I had expected).

I played Peggle last night for the first time in decades. I'd forgotten all about that game until it was mentioned in this thread. It made me think about adding all sorts of extra power-ups and options (such as showing how the balls will bounce when lining up the initial shot) but this was only supposed to be a simple game and not a huge time sink. That's a rabbit hole I'm going to steer clear of Smile


RE: Poly Blaster - a physics-based ball blasting game! - TerryRitchie - 09-25-2024

- That's a rabbit hole I'm going to steer clear of 

That's a shame. Your ideas of Peggle like additions sound awesome.


RE: Poly Blaster - a physics-based ball blasting game! - RokCoder - 09-25-2024

(09-25-2024, 02:59 PM)TerryRitchie Wrote: - That's a rabbit hole I'm going to steer clear of 

That's a shame. Your ideas of Peggle like additions sound awesome.

I'm still not jumping into that rabbit hole but I did dip my toe in slightly. The code already existed for collisions, updated trajectories, etc, so I've applied that to the targetting as an option that's set to false by default.

If you update line 247 to `game.longTarget% = TRUE` you can see what it looks like. Similarly, you can modify the constant value on line 63 (`Const LONG_TARGET_BALLS = 40`) to determine how long the target extends to. It's quite nice as you can even see the path modifying in real time when aiming against rotating polygons. What I'm not so sure about is the fact that it's only giving the path for balls of default size. Larger or smaller balls aren't going to follow the path accurately. That's the only thing stopping me from implementing it properly.

If it were to go in, my thoughts are that it could be activated -
  • temporarily by picking up a new bonus type during game play
  • for n seconds each time the player is aiming (after which it drops back to default length)

I'd be interested in thoughts on this. I don't think I'll be adding any other features but this one might be worth slipping in...


RE: Poly Blaster - a physics-based ball blasting game! - a740g - 09-26-2024

@RokCoder, I opened a PR to work around the bugs you commented on in the code.


RE: Poly Blaster - a physics-based ball blasting game! - RokCoder - 09-26-2024

(09-26-2024, 12:04 AM)a740g Wrote: @RokCoder, I opened a PR to work around the bugs you commented on in the code.

Nice one - much appreciated!