Voxel game based on Minecraft in browser for phones/tablets.

Started by Pakz, November 26, 2022, 03:28:13

Previous topic - Next topic

Pakz

I'm using Three.js and javascript to create a browser voxel game. I'm using a Ipad to develop it.

edit: site ( site may be offline from januari)
https://cromdesi.home.xs4all.nl/html5/voxelthing/

I tried to do a game like Minecraft years ago in Monkey2. But M2 was no longer being updated. Three.js I discovered a while ago and is backed by Google it seems. The developer is a old Demoscene coder who works for Google.

My ipad is the new pro version. Which should allow some bad coding and stil run things quickly. I have older devices which I sometimes test the project on too. <2020 devices have fps problems with the current version.

Minecraft is a game I play on my phone. I'm getting my ideas from that.

My idea is to create a browser touch screen version of a voxel world(Controller planned too) With building and mining and various procedural generation for the world. Javascript has those useful 'infinite arrays' Where you just use the index where it is needed. It can go negative too. Non used slots are just 'undefined' and give no errors and stay low on memory. This means I can just generated area's on the fly. I want to create mobs too.

A big problem is that the ipad does not seem to support multicore development with javascript. Workers which use the cores are disabled it seems. This means that adding chunks can not use multiple cores and that this wil take longer. This might mean I need to have loading screens or have to develop parts on a laptop.

The current version has not much gameplay yet. I'm stil working on the controls and block interaction. Yesterday I added a highlighted block on the last touched position and better block removal. There are textures used as atlas. Lighting is something that requires me to investigate Minecrafts system and how to recreate this in Three.js.

Things like jumping and collision are early too. The camera controls are problematic at the moment. There is a limited turn right now. This needs work. Collision with the map was a quick hack too. It has a platformer thing to it.

I plan to have it work on my iphones and tablets. I am new to javascript and browsers so there's a learning curve.

I have a website for hosting the game. But my provider said they would stop hosting this in december. I got a email asking me if I would like to keep it right now. So I have no idea if it wil be alive in januari.

The project is on github ( https://github.com/Pakz001/html5examples/tree/master/3D/threeTest/Test ) Book31.html is the last version at the moment. The folder is filled with different versions from different states.

The repo should be downloaded or cloned. Individually copying out the files would do too. Inside a downloaded repo(compressed) there are .html files that can be opened in the browser. There are gfx and .js files inside that are required.

Here is the last video I did for the project :



Minetest is a well known clone and the ultimate Minecraft clone. This is desktop version only. I had not seen any mobile touch screen browser versions of any voxel game where you can go and explore a large voxel world. So I wil keep hacking away to create something like that.
Edit:I noticed there is a android touch version for minetest.

Matty

It looks good. not having played minecraft however i wonder if the lack of a right mouse button will cause a difficulty with your interacting.

i've found mobile/tablets are fast enough for a lot of things these days, but the interface is what holds them back for gaming properly with.

Pakz

The mobile touch version of Minecraft is very playable. They have Call of duty and other shooters on touch also. It might be less than using a mouse, but I think a lot of people are used to screen controls.