🎉 Celebrating 25 Years of GameDev.net! 🎉

Not many can claim 25 years on the Internet! Join us in celebrating this milestone. Learn more about our history, and thank you for being a part of our community!

Devlog #2: New job, team meeting and fixes!

Published January 31, 2021
Advertisement

Hey everyone! Welcome back to this devlog dedicated to the development of Lost Dreams, a puzzle/exploration game. I got a bit delayed on the publication of this post because of a few things that happened to me workwise (it will be explained further down).

As the first post already made an introduction of the game and of the development process, I've decided to go straight to the point and explain what has been done day by day. Let's go!

Game Development:

Wednesday, 20th of January 2021:

  • I was able to fix the initialization recognition on an empty scene or a scene that doesn't have all the required GameObjects. It now checks if the 5 main GameObjects are set (Management, GUI, Cameras, Light, and Word) and the same for the child GameObject Zone [0,0,0]. If one or multiple of those are not in the scene, the tool will create it/them automatically on new initialization.
  • For an easier development environment, I've changed the names of the dev blocs so they would point in a specific direction. This allows me to reference them with specific unit vectors (vectors of length 1) making automation way easier and logical.
    • North faces the positive z-axis, vector (0, 0, 1)
    • South faces the negative z-axis, vector (0, 0, -1)
    • East faces the positive x-axis, vector (1, 0, 0)
    • West faces the negative x-axis, vector (-1, 0, 0)
  • I finally rewrote the zone expansion code from my prototype and adapted it for the project and the tool. On click on a dev cube (for now, they are yellowish cubes on the outside of the base layers)), a new zone will be created with an offset of 1 cube. The offset is for now set in stone but I'm thinking about giving the option to change it.
Creation of new zones by using clicking on the expansion Dev Bloc. The state of the tool in that GIF is as it is at the end of the devlog. When the expansion was implemented, the white framed cube wasn't working, same for the cube placement in the zones.

Thursday, 21st of January 2021:

  • The new zones created were not properly centered on a grid and aligned to the position 0 in the y-axis. It is now done!
  • There were more problems related to the position of newly created zones. Each new blocs were having a 0.5units difference in position relative to the y-axis. This was due to the position of the parent GameObject Zone [X,X,X] that was not set to an integer value for the y-axis. After quite some time of coding, fighting with int and float numbers, I was able to correct that problem. I now keep the habit to make the position of the parent object as a reference point that follows the same logic as the first zone, and then every child GameObject will have their position relative to the parents, and not relative to the global reference. It's a bit messier to think about all those references, but it makes coding way easier (and I'm kinda used to it thanks to my university years in Physics).

Friday, 22nd of January 2021:

  • There was a big problem when I was creating cubes in new zones: they were not created in the proper layer of the proper zone. This was just due to how Unity handles raycasting on layers. I had to separate the logic for each layer I wanted to get a raycasting on, starting with the most important one. For now, I have 2 layers called layer (the cubes being placed) and baselayer (the grey floor). Before I was checking the raycasting on first the baselayer then the layer inside the same if statement by using “if (statement1 || statement2)”. This was a big mistake as if my pointer is at the same time over a cube and a floor, the raycasting will get the floor first and return a hit on the floor instead of the cube… It's now separated by using an “if” and then an “else if”. I know that I could have switched the statement order but having the conditions separated this way makes it easier to read.

Saturday, 23rd of January 2021:

  • Found lots of small bugs related to the position of the dev cubes on the creation of a new zone. It took way more time than I thought to go through it but in the end, I made it. The expansion/creation of new zones is now fully functional!
  • Today is meeting day with the team. We do one every 2 weeks to be able to keep track of what has been done and what we expect to achieve in the next 2 weeks. This is super helpful especially during Corona time as it became difficult to see each other and had to find a way to keep the motivation up and running. I would recommend anyone working in a team to do the same: communication is key!
Cube creation and zone recognition. The cubes are created in the hierarchy respectively to which zone they are in. No more cube appearing in the wrong zone GameObject!!!

Sunday, 24th of January 2021:

I tried to find a way to get a preview of every face of a prefab cube, following the ±x, ±y, ±z axis. I want to use those previews in the cube creation window to allow the user to say if a character can go through that face of the cube or not. This is a setup that will be used for the pathfinding algorithm/system that I want to create. Just so you know, I have no idea if it will work but the idea is to create gizmo spheres in the middle of each face of each cube that will hold an isObstacle reference. The pathfinding will then check if you can go from one node to another one without passing through one of the “obstacle” gizmo. This is still a work in progress but I'm pretty sure that's the way to do it in a custom-made voxel world.

Now, the big problem is: how to get those previews?! Well… I have no idea. I took some time to try to get at least a preview with a different angle from the default preview but nothing. Even trying to change the position of the prefab relative to the default camera didn't do the magic. In the end, I checked if a plugin existed and found Runtime Preview Generator and it seems to do the job. I've set it up and it's now ready to use in my project.

Monday, 25th of January 2021:

I got a new job! As you may know, I am a freelance developer and didn't have any project for the beginning of the year. I got a call during the previous week and am now part of a full-time coding project. I've never had to do only coding from 8 to 16 in my previous job so you can understand my surprise when at the end of the day, I was completely dead. It was impossible for me to code anything or think about anything so no coding on the project.

Rest of the week, until Sunday, 31st of January 2021:

Nothing happened for the same reason as Monday. During the weekend I enjoyed some free time and started doing some sculpture with polymer clay. I haven't done that for ages and have to admit that it's actually quite relaxing. I was usually coding during my free time but because of my intense week (had to learn a new coding language and do encryption/encoding, which I've never done that way before…), I wasn't able to get myself to code anything. At least, on Sunday, I started doing some code again but this will be for the next devlog!

What's next?

As there are still many things I didn't do from what I've said in the previous post, I still need to do:

  • Add more parameters in the cube creation process
  • Add the pathfinding
  • Add the move option (I might actually put this one on hold)

With my new job, I think that will be plenty of coding for the next week!

Once again, if you want me to explain stuff in detail or give some examples of code, don't hesitate to leave a comment!

0 likes 0 comments

Comments

Nobody has left a comment. You can be the first!
You must log in to join the conversation.
Don't have a GameDev.net account? Sign up!
Profile
Author
Advertisement
Advertisement