Legacy GM Making Minecraft in Game Maker using D3D

H

HenrikoNumberOne

Guest
Hello! I am trying to make a voxel-ish kind of game (a Minecraft clone, basically) in Game Maker Studio using the 3D functionality already present. I have come about this far;



... I can run, jump, crouch and sprint. I can also look around 360* and collision works like a charm. Next thing I want to add is block placement, which has been a struggle. Working in 3D is a lot more difficult than 2D it seems, and I haven't been able to find any tutorials helping with this.

To put it simply, I need to be able to highlight the block I'm looking at, and then place a block next to that block whenever I press mb_left or something similar. I also suspect that I need to add some kind of "grid system" to make this work.

Any help would be very much appreciated!

- Henriko
 
Last edited by a moderator:

klys

Member
Was easy to run the First Shooter Demo right?

What you really want is a VOXEL ENGINE, not a First Shooter game, FPS is the gameplay, but the Voxel Engine is the esence.

So you now have the FPS part working, now you need to create a Voxel Engine and then the FPS over that Voxel Engine.

Suggestion:

First make a 3D Camera Control System like Creative mode on Minecraft.

Second make a Voxel maker invisible, with only corners visible, there is actually a example of how to create many voxels in the space on a game maker tutorial.

All from here you will be able to create what you want because that is all the basic powers of the esence of a VOXEL engine.
 
H

HenrikoNumberOne

Guest
Was easy to run the First Shooter Demo right?

What you really want is a VOXEL ENGINE, not a First Shooter game, FPS is the gameplay, but the Voxel Engine is the esence.

So you now have the FPS part working, now you need to create a Voxel Engine and then the FPS over that Voxel Engine.

Suggestion:

First make a 3D Camera Control System like Creative mode on Minecraft.

Second make a Voxel maker invisible, with only corners visible, there is actually a example of how to create many voxels in the space on a game maker tutorial.

All from here you will be able to create what you want because that is all the basic powers of the esence of a VOXEL engine.
Oh, thanks for the tips! I'll check out how to make one of those.

Edit: Okay, so I am slightly confused on what exactly a "Voxel Engine" is? I've been looking for tutorials but I can't find any... would you happen to have a link to one?
 
Last edited by a moderator:

klys

Member
The first question is... what a voxel is and why you need a engine of voxels.

Is Voxel a simple square?
 
H

HenrikoNumberOne

Guest
The first question is... what a voxel is and why you need a engine of voxels.

Is Voxel a simple square?
Um... I'm not too sure. Isn't it based around triangles, similar to polygons? I would like to get help with creating a grid based block placing system in my game, however I don't really know what voxels has to do with it? Sorry if I'm asking too many questions...
 

klys

Member
While you have your question, they need to be answer!

Voxel come from Pixel, Pixel is a square, the measurement of a draw object in a computer in a two dimentional world, so Voxel should be the measurement of cubes in a three dimentional world.

That why a Voxel Engine is them a Engine of Cubes one adyacent to each other with different properties.

The Minecraft Voxel Engine use specificly a Chunk System which allow to load a unload part of the 3d world so not all the whole world is loaded in memory while you are playing the game.

So there is many things to do here.

First the Voxel (or cube) creator in the 3d space.

Second the Chunk system for load and unload the whole world

Textures, Player Camera, Player World Interaction, Etc..
 
H

HenrikoNumberOne

Guest
While you have your question, they need to be answer!

Voxel come from Pixel, Pixel is a square, the measurement of a draw object in a computer in a two dimentional world, so Voxel should be the measurement of cubes in a three dimentional world.

That why a Voxel Engine is them a Engine of Cubes one adyacent to each other with different properties.

The Minecraft Voxel Engine use specificly a Chunk System which allow to load a unload part of the 3d world so not all the whole world is loaded in memory while you are playing the game.

So there is many things to do here.

First the Voxel (or cube) creator in the 3d space.

Second the Chunk system for load and unload the whole world

Textures, Player Camera, Player World Interaction, Etc..
Alright... so I already have the player camera, textures etc nearly done. Now I need the block system (or the Voxel creator, I guess). I need help with code to get started on that... any ideas?
 
Last edited by a moderator:

Smiechu

Member
You are the game maker... you should have the Idea... prepate some concepts how the system could be done, make some research on the internet, how others made it... gather pros and cons...
This is not somethig you can invent in 5min... this is the core system of the game you want to make...
 
The misconception most people have when they attempt to recreate Minecraft is that they think it can't be all that complicated to get the basic engine going. The world is blocky, the textures are very low-res, and it's just a matter of creating and destroying some block models in front of the camera. Usually they get to the state you're at - they download the textures, create the camera, throw in some default textured blocks to create a simple world, and then get stuck wondering how to create and destroy blocks. Surely, it can't be that difficult, you build a big grid of stacked blocks and then it's just a matter of placing new blocks in the empty space in front of the player's view, or checking for the block in front of the player and then destroying it. The simplified look of Minecraft is deceptive, there's a lot going under the hood that allows for such a system to function the way it does. Minecraft does not have a bunch of blocks stacked next to and on top of each other, there are chunks of data that determine how the world looks. You have to create and draw only the faces the world can see, know how to add to and destroy segments of the chunks, base collisions on the data in the chunks so you can properly navigate the world, just to get the basics going. With how much there is to handle, there's also a lot that needs to be optimized as things can get real slow real fast. It's a big project.

Honestly, if you need help getting started with this process, then development is going to go nowhere. If you really want to do it, I'd recommend doing research on all the elements that will go into the engine before starting to build them. Otherwise, move on to something simpler. Attempting to get this system going with our help would be a long, arduous process for both parties that eventually will amount to nothing.
 

Bunelee

Member
I have an idea.
Download the p3dc dlls, then use raycasting. Check to see whether the inventory is full or not, and whether the block is breakable, then if all parameters are checked properly, then you can start to increment a variable as long as the player holds down the button and does not turn away. Then let us say the variable hits 200. Then make the block break by switching model ids. It could be a bit difficult to implement but this is how I coded my fully editable environment.
 

Bunelee

Member
Let us say you called the variable "a". Increment a, (a++;) and when it reaches a certain value (200 in my example) break the block.
 
Top