Navigation

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

    3D Block game (complete)

    Work In Progress
    8
    29
    2769
    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.
    • Kat
      Kat Fuze Team last edited by

      Wow! Awesome work :D

      1 Reply Last reply Reply Quote 1
      • monkeee
        monkeee F @monkeee last edited by

        saving and loading :

        monkeee 1 Reply Last reply Reply Quote 5
        • monkeee
          monkeee F @monkeee last edited by monkeee

          Now I made it so save data contains texture data. We can choose from 7 different textures or colours.

          One downside of this is that it takes up 3 times more space. This means currently I can only save and load 1 25x25x25 world.

          I tried increasing the world size to something like 32 but it keeps giving me a stack overflow error. I think this is because I store the world in memory as 3d 32x32x32 array. Maybe I should store it as a 1d array of length 32^3?

          The stack overflow error came from inside the for loop I used to convert the 3d array into a saveable format. It said I called too many functions or something.

          Also I think I may have a go at using run length emcoding to further shrink the size of the save data.

          How I saved the world:
          3d world array, elements are integers 0 to 7 --->
          Flatten into 1d array, element are ints --->
          Convert integers to bits and store them into an array -->
          Group six bits together, bit shift left by 1 and then add 1-->
          Convert the 7 bits to an integer. use this integer to get a character. --->
          Append all characters together into a string--->
          Save this string to file.

          (Loading is the reverse of this)
          Looking at the steps now, i think because each stage has a for loop, this may have contributed to the stack overflow error. I don't know how to fix it though.

          I should probably stop working on this for now. I have exams next week 😭. I'll try picking it up after exams tho.

          in the future i want to create a game where you can use, combine and place coloured blocks. Each block has their own unique power up. Health, speed, jump, ice, break, explosion, wind block, portal, gravity, colour mixing block. Idk if I'll be able to do all that but it's good to keep a note of. Also I could just save each level like I did here. nah

          monkeee 1 Reply Last reply Reply Quote 3
          • monkeee
            monkeee F @monkeee last edited by

            Saving and loading with a block palette of size 7:

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

              @monkeee You are so legit. This is brilliant - I'm sure the kids at our workshops would absolutely adore playing with it - I'll show them this amongus clip because I'm sure they'd get a kick out of it :D

              monkeee 1 Reply Last reply Reply Quote 1
              • AlienDjinn
                AlienDjinn last edited by

                Wow, that's epic @monkeee! Amazeballs!

                -Alien

                1 Reply Last reply Reply Quote 1
                • monkeee
                  monkeee F @Dave last edited by

                  @dave thanks :) .i haven't uploaded the project yet though, I'll try do so after exams are over next month

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

                    This is really impressive! I'm excited to see where it goes!

                    1 Reply Last reply Reply Quote 0
                    • monkeee
                      monkeee F @monkeee last edited by monkeee

                      @monkeee Here is probably the final program:
                      ID : DEZ73M5ZEB SBU73MNDHB.(LIVE)

                      monkeee 1 Reply Last reply Reply Quote 4
                      • monkeee
                        monkeee F @monkeee last edited by monkeee

                        I realise now I could make it more like Minecraft:

                        • Random Terrain --> use perlin noise/ hash stuff ye doable
                        • Textures --> use fuze's own terrain objects like https://fuzearena.com/catalogs/view/4917 use provided models instead. frame rate takes a huge hit
                        • Chunk system --> use rle to compress size of matricies saved to file. No compression so far but i am able to save and load multiple worlds. also chunk system sounds like effort. my code feels so fragile, i dont want to change anything lol.

                        main problem is frame rate takes a hit when loads of cubes drawn on screen. sadge

                        monkeee 2 Replies Last reply Reply Quote 0
                        • monkeee
                          monkeee F @monkeee last edited by monkeee

                          @monkeee

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

                            Very impressive stuff! Could make a nice little 3D shooter out of it with randomized levels...

                            Are you using the terrain functions for the custom texture?

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

                              @vinicity tank you. thats a great game idea, wish i had thought of it. Originally was going to turn it into a parkour type game but idk if i will be able to finish the base mechanics to actually start on that.

                              yeah then i used 6 terrain objects and oriented them to make a cube to place down. I have a feeling the lag is from this massive array that i have in memory rather than from rendering it all but idk.

                              1 Reply Last reply Reply Quote 1
                              • monkeee
                                monkeee F @monkeee last edited by

                                @monkeee

                                vinicity monkeee 2 Replies Last reply Reply Quote 4
                                • vinicity
                                  vinicity F @monkeee last edited by

                                  @monkeee How cool is that! It's almost Minecraft!

                                  1 Reply Last reply Reply Quote 1
                                  • monkeee
                                    monkeee F @monkeee last edited by

                                    @monkeee update:
                                    added ability to place up to 63 models and 126 colours. Added a model selection menu. saving and loading works okay. one problem i have encountered is saving a world doesnt preserve the models rotation, so i might have to work around that.

                                    preview:

                                    The code is getting pretty spaghetti now to a point where its very difficult to work with. might remove some stuff and refactor. Ui code is pretty overcomplicated.

                                    monkeee 1 Reply Last reply Reply Quote 7
                                    • monkeee
                                      monkeee F @monkeee last edited by monkeee

                                      @monkeee update:
                                      got rid of colours. now only 63 models.nearly done just got to clean everything up a bit. Everything user interface is a tangled mess.Project is very large probably wont update in future. Rotations can now be saved but the save file is now 65kb instead of just 32kb. Alot of optimizations could be made but im too lazy to think

                                      Anyone have any models which would make a good addition to this? I have quite a few more slots open for models which i could theoretically load.

                                      Also i dont know what to call this game since it has deviated a bit from the original projects. Any suggestions would be great.

                                      Heres another preview:

                                      monkeee 1 Reply Last reply Reply Quote 6
                                      • monkeee
                                        monkeee F @monkeee last edited by

                                        Good news!
                                        I am finally finished with this project. yay

                                        Heres another preview:

                                        monkeee 1 Reply Last reply Reply Quote 0
                                        • monkeee
                                          monkeee F @monkeee last edited by

                                          @monkeee
                                          .... Bad news : 20220712_215416.jpg 💀

                                          monkeee 2 Replies Last reply Reply Quote 0
                                          • monkeee
                                            monkeee F @monkeee last edited by

                                            @monkeee
                                            Its all fixed now thanks to @pianofire so false alarm.

                                            After 1 year and being on and off with fuze, i have finally finished this project. I am very satisfied with the final product, i made it the best i possibly could.

                                            Also i added speedrunning blocks which can be used for parkour/ map play throughs. Could also be used for speedbuilding a creation.

                                            I am happy it didnt crash and burn like so many of my other projects haha. Learned alot about game dev and programming from this and glad i was arrogant enough to see it till the end.

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