Navigation

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

    3D Block game (complete)

    Work In Progress
    8
    29
    1877
    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.
    • monkeee
      monkeee F last edited by monkeee

      I made a 3d game where you can place and jump on blocks. It's got an inventory system, 3rd person camera and basic collision response.

      IDs (updated)(LIVE):
      Final project : DEZ73M5ZEB

      • Artcraft S plus pro ultra max : SBU73MNDHB ( download this one)
      • Artcraft (readable code) : 6QL63MNDHB (no ui, minimal)
      • Fuzecraft: DEZ73M5ZEB (very first attempt, pretty bad and overcomplicated)

      Can you guys give feedback on the camera, controls and the inventory.

      monkeee 1 Reply Last reply Reply Quote 10
      • LinkCraft
        LinkCraft F last edited by LinkCraft

        the camera is great. the inventory could use a few things like separating the hot-bar items from the rest of the inventory and being able to navigate the inventory with the joysticks but other then that it looks great. very impressive

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

          This post is deleted!
          1 Reply Last reply Reply Quote 1
          • monkeee
            monkeee F @monkeee last edited by monkeee

            version 0.1
            i added a user interface now :


            This took longer than making the gameplay content lol.

            New ID : DEZ73M5ZEB

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

              Picked up fuze again and I remade everything.

              ID : DEZ73M5ZEB 6QL63MNDHB

              Got rid of all the unnecessary bits of code, leaving only the main important features. Now the code is roughly only 350 lines and actually readable lol.

              I used raycasting to find the closest "air" block that intersects the line of sight of the player; which makes placing and removing blocks less clunky. I added a saving system but that doubles the amount of code so I removed it as I want to keep everything as simple as possible.

              Feel free to copy or experiment with this probably wont be on fuze for a while :( (what a lie lol)

              possible future improvements:

              • could add collision mechanics by checking if blocks around are filled. if true and if round_vector(player_pos + deltaTime()*player_vel) == pos of block that is filled =>then adjust position.
              • improve raycasting function (could use only 1 for loop instead of 3 separate ones idk) (use less variables???)
                * add chunk system maybe????? (group positions that are close together) (that way dont have to loop through every single placed block only a specific region) (one 3d array representing world)
              • add ui
              • add music and sound effects
              • save system : "%" + str(len(str(block_positions))) + "%" + str(block_positions)--> save to file (save 3d array as string of characters)
              • load system : read between "%" to get length of list --> turn back into position info ---> place blocks down
              • add textures by using terrain object like last time.(too much effort not doing, use coloured blocks instead)

              https://fuzearena.com/catalogs/view/5701

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

                collisions in action:

                monkeee 2 Replies Last reply Reply Quote 3
                • PickleCatStars
                  PickleCatStars F last edited by

                  I had a go of this, it was pretty nice.

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

                    This post is deleted!
                    1 Reply Last reply Reply Quote 0
                    • 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
                                            • First post
                                              Last post