Devlog #2: World Generation
No more is the entire world a big 100x100x100 cube! Instead, I've implemented some basic worldgen using perlin noise. This sounds like it should be simple enough, and to be fair it almost was. However, you always end up encountering just one more thing that makes it that little bit harder to make it work. In this instance, I wanted to ensure that my world generation system was as robust as possible, to do this, I built it around what I call 'chunk preprocessors.' Preprocessors are simply a special class which contains a method invoked before a chunk is built. In this case, it's responsible for generating the terrain for that chunk if it hasn't been already. Chunk preprocessors are ran by the chunk generation thread, not on the main thread, allowing them to be relatively performant. However, if you are loading a lot of chunks you will see some slow-down. Being able to generate large worlds rapidly wasn't really a priority for me, since in-game you'll only be playing on fixed-size maps, however I still wanted to make the system as robust as possible.
Another thing I added is more dynamic blocks. Now, instead of block data just holding a name and texture, blocks can also have their own 'Process' methods. A block is processed when it is placed and every time any of its neighbouring blocks are modified. To test this, I made a grass block, which uses this process method. When a grass block is processed, it checks if the space above it is free, and if not converts itself into a dirt block, avoiding ugly stacks of grass.
Get Build Fight Game
Build Fight Game
Status | In development |
Author | peterkcodes |
Genre | Shooter |
More posts
- V0.11.1 ChangelogDec 08, 2023
- V0.11.0 ChangelogDec 05, 2023
- 0.10.1 ChangelogDec 04, 2023
- 0.10.0 ChangelogDec 04, 2023
- Version 0.9.0Nov 29, 2023
- Version 0.8.0Nov 21, 2023
- Version 0.7.0 ChangelogNov 21, 2023
- Devlog #9: New Player & New PlacesNov 06, 2023
- V0.6.0 ChangelogNov 06, 2023
- v0.5.0 Changelog (+ how to play)Nov 01, 2023
Leave a comment
Log in with itch.io to leave a comment.