MonkeyCraft - Minecraft like project

Started by Pakz, March 24, 2018, 00:47:23

Previous topic - Next topic

Pakz

Spend the last two days working on this minecraft like game world. I followed a course from udemy which gave me some directions.

I am using Monkey2. The emscripten did not work yet so no playable in browser link. The code(including example code) for the project is  on my github page.

https://github.com/Pakz001/Monkey2-3D

I do not have a infinite world yet. Everything is pregenerated. And there is still a lot more basic things to add.



Monkey mojo3d is quite useable already.

Pakz


Qube

Cool 8) - There is a thread on the AGK forums doing a Minecraft type thing. Might be worth a peek for ideas and inspiration.
Mac Studio M1 Max ( 10 core CPU - 24 core GPU ), 32GB LPDDR5, 512GB SSD,
Beelink SER7 Mini Gaming PC, Ryzen 7 7840HS 8-Core 16-Thread 5.1GHz Processor, 32G DDR5 RAM 1T PCIe 4.0 SSD
MSI MEG 342C 34" QD-OLED Monitor

Until the next time.

Pakz

I spend some time looking through the thread there. Noticed some code for perlin noise. I never really understood that method of terrain generation. Will take a look later.

The way I am generating the terrain at the moment is more like tunneling and the hill algorithm. I spend a number of years learning and researching how to generate maps so I have lots of ideas on what I can add.

I got stuck yesterday with development when I created a new method for the cubes that has textures and there were errors given. I downloaded the latest development version of monkey2 and the error seemed to have gone away. It appears that the memory used is quite a problem. Mark mentioned this on a thread where I asked for help.

The current world2 test with textures has 800mb of memory used. There is a 2gb limit for emscripten(browser) since that is 32bit I will need to keep that into account.


Pakz



It has been a while since I did anything with the project but I spend a night and morning trying to make it better.

I added trees which are placed based on a seed(grow) array. This is a array where I place numbers on. I enter a loop and pick a random x and y and see if a number is present there and if so place that same number besides it. This way you end up with zones or islands if you will. This I use to see if a tree can be placed there. This makes it look like there are area's on the map where there are no trees and area's where there are trees.

I also added a dungeon algorithm that I did. I simply copied into the project and added a ceiling and a floor. I still want to add different heights for the rooms and a stair to the surface. The dungeons are randomly placed on the map and should be mostly underground. Usualy they are unreachable unless the tunnelling algorithm broke through the walls.

I also was working a bit on the texture atlas. There is still something not right on the edges. I still want to make it so that each side of a cube can have a different texture.

Another thing I was planning is ambient lighting. I think(?) this is done with having a larger texture atlas where every image has a version with shadows on the edges. These textures then get placed in corners making it look like it has been lighted. Since I am using small textures I think I can make this work. This would be useful since the regular lighting on lower end machines seem not to give a good framerate and need to be disabled there.

The code is still on github in my account (pakz001) in the public monkey2 3d rep in the mining folder. There are a number of examples and experiment files there that should mosly compile with a later version of monkey2.


Qube

Great to see you are continuing with the project :)

QuoteThis would be useful since the regular lighting on lower end machines seem not to give a good framerate and need to be disabled there.
On lower end machines I would of thought that the extra code / calculations required for each shadow texture version would be slower than GPU based shadows? - Could be wrong there but I can't see a software based version with all the possibilities being quicker than GPU hardware accelerated shadows. Unless it's just a simple basic more localised shadow effect you're after in which case it would be quicker.

Really nice impressive work and just think, if you came up with this idea 10 years ago you'd be super rich by now ;D
Mac Studio M1 Max ( 10 core CPU - 24 core GPU ), 32GB LPDDR5, 512GB SSD,
Beelink SER7 Mini Gaming PC, Ryzen 7 7840HS 8-Core 16-Thread 5.1GHz Processor, 32G DDR5 RAM 1T PCIe 4.0 SSD
MSI MEG 342C 34" QD-OLED Monitor

Until the next time.

Pakz

I have been playing the original Minecraft a lot. I bought it last year, both the java and windows 10 version. The Windows 10  version last time I checked was at 100+ hours playtime.  I am still in the first world there. Not even ventured far. Only started building roads connecting nearby biomes this month.

Games I play a lot I tend to want to make myself. So I keep working on it. It was a little bit to complex for me but the Minecraft Udemy course helped me get started. This project will be a multi year thing I bet. There is so much to learn and Mojo3d is still in development. There wil be times when I will not work on. Months probably.

My own code based lighting thing is just a simple check for every block during a chunk creation to see if a shadow texture needs to be added. If Corner then ..! I think there wil not be that much slowdown. And I am not wanting to finish this year or next year so CPU's and GPUs wil improve. I am already looking forward to the new 1100 series that should be released this year. 1160 for laptops this hollyday season.