Navigation

    Fuze Arena Logo
    • Register
    • Login
    • Search
    • Categories
    • Recent
    • Popular
    • Users
    • Groups
    • Help
    • Discord

    Super LASER BLAST!

    Finished Projects
    9
    22
    1602
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • SteveZX81
      SteveZX81 F last edited by

      Looks awesome!

      1 Reply Last reply Reply Quote 1
      • Retrocade_media
        Retrocade_media F @vinicity last edited by

        @vinicity Looks great! I love the use of my template!

        1 Reply Last reply Reply Quote 1
        • vinicity
          vinicity F last edited by

          Someone asked me about the algorithm for determining if the the laser beam touches the circles. So, I thought I would write a little bit about it.

          At first, I thought the problem of determining where a line crosses a circle wouldn't be very hard, but it turns out that it is far from trivial. I googled a bit and found that the maths behind it are rather tricky, and there are a lot of different ways to solve the problem. In one of the threads on StackOverflow, someone mentioned that they had solved it with a recursive function, so I thought I would try that as well.

          What is a recursive function?

          In computer science, recursion is a method of solving a problem where the solution depends on solutions to smaller instances of the same problem. Recursion solves such recursive problems by using functions that call themselves from within their own code.

          For this to work, the function must have a "base case" which terminates the recursion, and it also needs to divide or shrink the input data, which then becomes the in-data for the next recursion call.

          My solution

          Since we have the angle for the laser beam, and the location and radius of the circle, first off we can just use some simple trigonometry to determine if a circle will be hit or not. If it will be hit, we call the recursive function called intersectsBlob(). It takes as input parameters the circle (circles are called blobs in my code), and the start and end points of the line (or laser beam) we want to check.

          beb096e3-8989-48e2-9c30-a17011b7e50b-bild.png

          The function midPoint() return the midlle point of the line:

          33564b5c-fe34-4043-9b21-ee676187b784-bild.png

          Then we have the "base case" which terminates the recursion. If the distance from the middle point of the line to the blob's center point is the same as the radius, then we have found the answer:

          6f8efe9f-e9dc-4b35-862e-29a4ad667cf6-bild.png

          Note that it actually terminates if the difference is less than 2 pixels. This is good enough, and keeps us from hitting Fuze's recursion limit.

          Next, we divide our line into two equally long lines, and check which of them has a middle point that is closer to the answer than the other. The one further away is discarded, and then we call intersectsBlob() (that is, the same function that we are in) again, but this time with the new line coordinates:

          096b4e7c-6fec-42bd-b18e-8a63b5cd237e-bild.png

          And then we just return the answer.

          ca92ef2b-1b8d-4c91-a85d-062d92235fed-bild.png

          That's it. The entire function looks like this:

          9cf9857b-da13-4f5f-a919-f0bcae3206cb-bild.png

          1 Reply Last reply Reply Quote 5
          • vinicity
            vinicity F last edited by

            1 Reply Last reply Reply Quote 6
            • Jongjungbu
              Jongjungbu F last edited by

              You finally used your particle system in a way that I truly enjoy. When that laser hits something. It looks so cool.

              1 Reply Last reply Reply Quote 6
              • Dave
                Dave Fuze Team last edited by

                So very satisfying to watch! Congratulations - awesome work.

                1 Reply Last reply Reply Quote 3
                • vinicity
                  vinicity F last edited by

                  Some progress has been made and a lot of bugs have been squished!

                  1 Reply Last reply Reply Quote 8
                  • vinicity
                    vinicity F last edited by

                    @Dave , may I please request that you add some thumping techno with the next patch?

                    Pretty, please?

                    Dave 1 Reply Last reply Reply Quote 1
                    • Dave
                      Dave Fuze Team @vinicity last edited by

                      @vinicity Won't be able to for the next patch, but certainly for subsequent ones I could look at it :)

                      1 Reply Last reply Reply Quote 2
                      • vinicity
                        vinicity F last edited by vinicity

                        The game is now finished and has been shared.
                        Download ID: HBG33MND5C

                        The game is now called Super LASER BLAST!

                        It is a relaxing puzzle game, with mechanics inspired by an old flash game called Gimme Friction Baby. Try to rack up as many points as possible by making combos!

                        It supports both touchscreen and joycon controls, and you can switch display modes on the fly in order to play it with the Switch on the side (Tate style!) or the other way up (for instance when playing on the TV).

                        Big thank you to @Retrocade_media for the Tate Template code and to @spikey for the persistent High Score code!
                        I hope you like it, and please post your high scores in this thread!

                        Expect a new update shortly with support for a new Time Attack game mode.

                        1 Reply Last reply Reply Quote 5
                        • spikey
                          spikey F last edited by

                          @vinicity glad to hear this code was useful! I will right away try Super LASER BLAST.

                          vinicity 1 Reply Last reply Reply Quote 1
                          • vinicity
                            vinicity F @spikey last edited by

                            @spikey Yeah, a great piece of code, very neat and easy to use! Thank you for that!

                            1 Reply Last reply Reply Quote 1
                            • xevdev
                              xevdev F last edited by

                              I like this you've done a great job. Cool graphics and an original mechanic for the gameplay. And the touch controls make it just a great way to play.

                              1 Reply Last reply Reply Quote 1
                              • Retrocade_media
                                Retrocade_media F last edited by

                                It'll be a minute before I get back to my switch, but I'm excited to try this out!

                                1 Reply Last reply Reply Quote 4
                                • spikey
                                  spikey F last edited by

                                  @vinicity ID: DM3N3MNDN8 (DEMO - High Scores V2.0, for saving multiple tables)
                                  cheers 😀
                                  I added also a resetHighScores() function.

                                  1 Reply Last reply Reply Quote 4
                                  • landein207
                                    landein207 last edited by

                                    I don't know why but can't download it because the ip (HBG33MND5C) it says project: not found is this showing to everyone or is just me?

                                    1 Reply Last reply Reply Quote 0
                                    • pianofire
                                      pianofire Fuze Team last edited by

                                      This means that it is awaiting approval. It takes two people to approve a program and unfortunately it is just me here at the moment

                                      1 Reply Last reply Reply Quote 1
                                      • vinicity
                                        vinicity F last edited by vinicity

                                        Hold off, I found a game breaking bug. Will fix and re-share.

                                        1 Reply Last reply Reply Quote 1
                                        • vinicity
                                          vinicity F last edited by vinicity

                                          New update is now live!

                                          Please download the latest version of Super LASER BLAST, since there are lots of bug fixes and new features.

                                          Changes made in Version 2.01 (Release date 2020-09-02):

                                          • Added immersive HD Rumble
                                          • Added Rank view in HUD + Rank up sound effect
                                          • Added Time Attack mode
                                          • Added Expert Mode
                                          • Added new loading screen (thanks, toxibunny!)
                                          • Added support for multiple high score tables (thanks, Spikey!)
                                          • Various fixes and tweaks

                                          Time Attack turns the heat up by making every second count as you race to beat the highest scores. You only play for six minutes, making this the perfect mode to play while waiting for the bus or for your next zoom meeting to start.

                                          Expert Mode is not for the faint of heart! Only true experts have a chance when circles that are left alone increase their health after every fourth shot fired. Once health reaches ten, the circle becomes indestructible. Better not let that happen!

                                          1 Reply Last reply Reply Quote 3
                                          • vinicity
                                            vinicity F last edited by

                                            Version 2.02 is now live.

                                            Contains fixes to make Super LASER BLAST work in Fuze 2.15.

                                            1 Reply Last reply Reply Quote 1
                                            • First post
                                              Last post