Alternative minecraft

Started by
105 comments, last by bvanevery 10 years ago

DX11 removed the ability for us to load models using the DX9 method so we had to find the collada loader and modify it so it would work with animations and textures.


you know... you could just export your model to .fbx format... this would have saved you 4 months of pain...
Advertisement

[quote name='riuthamus' timestamp='1342545207' post='4960068']
DX11 removed the ability for us to load models using the DX9 method so we had to find the collada loader and modify it so it would work with animations and textures.


you know... you could just export your model to .fbx format... this would have saved you 4 months of pain...
[/quote]

What do you mean? maybe elaborate, since you obviously know something I do not not! smile.png We are using SlimDX and as far as I knew ( which i could be wrong ) it does not have a built in process for handeling the loading/importing of meshs. ( We are also a C# process, not C++ ).
I think i was wrong, i was looking for this "article": http://dougrogers.blogspot.com.br/2008/03/fbx-loader-for-directx.html that presents a fbx loader for DirectX.

As the .fbx format supports animations, i thought that this would be a easier way for you to go...

I never used SlimDX, but as you said that you had to modify the collada loader, i thought that it had a built in "Content Pipeline", sorry.
No worries, i didnt mean my post to seam hostile. I would have loved if you were right. Right now DAE seems to be the only thing that works. There is not enough documention on how work with FBX, if you know of some please let me know and me and my team will make one!
So, what to write it in?
a) Unity
b) WebGL
c) Some other cross-platform engine or API

I need: code easy to maintenance, speed, 300MB memory, Mobile support, rather easy modding or mod api easy to write
Those are some serious requirments.

I know that our project can handle some serious shit and runs well on mid teir 2008 graphics cards but there is no way a mobile version of it would work. 300mb of memory will be eaten up within minutes with a fully loaded voxel based game. What is the scope of your project? Make a big world or just a simple box builder/modifier? If you want to make a game that lets you modify buildings or make small things than that is 100% doable within a 300mb limit. If you are aiming for expansive world.... your going to be very limiting on what you show the player and what you load. So, first things first

1) What is the goal of your game
2) What are the limitiations of your game ( memory, video card or not? )
3) What features to you expect to use ( dynamic lighting, things of this nature )

Once you get a grasp on those things, you can really start to decide what is best for you. Honestly, Unitiy will probably be the best thing to start out with. It is already ready to go for the web applet part and has some very strong setup tools for you to play with. The limitiations of unity come when you start to talk about the type of game you wish to make and how detailed you want to make it. This is not to say that unity cant do it, it simply means that unity will need to be tailored to your setup. I think to properly answer your question we really need to know what your plan is... where do you hope to take it? what is the end goal you wish to have when you are done? If you dont know what your end goal is, you should really look into making a design/game doc first. Once you have the first parts of that filled in you can get a better idea of what you will need.
The most serious problem is voxel engine. I've done one, that renders 900 15x128x15 chunks on 60+ FPS in c# (with no optimization like viewing frustum, but with infinite world) and eats 120MB RAM, but this game is going to have some blocks 1x1x1 divided into 8x8x8 which makes 512 smaller blocks. With LOD it's possible to render, but I'll need some more RAM.

What about game design doc - the game is going to have many game modes like campaign, survival, wave defence, freebuild, component build, special ops etc.
How to start writing such a document if I don't want ti lost in papers, until I start actual programming stuff?

The most serious problem is voxel engine. I've done one, that renders 900 15x128x15 chunks on 60+ FPS in c# (with no optimization like viewing frustum, but with infinite world) and eats 120MB RAM, but this game is going to have some blocks 1x1x1 divided into 8x8x8 which makes 512 smaller blocks. With LOD it's possible to render, but I'll need some more RAM.

What about game design doc - the game is going to have many game modes like campaign, survival, wave defence, freebuild, component build, special ops etc.
How to start writing such a document if I don't want ti lost in papers, until I start actual programming stuff?


Well, I said the same thing, until I started to write one out and realized that it really helps for you to focus on what you are going to do. We can all sit here and say we want this and that and all the bells and whistles for a game, but then you go and try to add that with a 300mb clamp on your ram and you are really going to limit what you can do. I was simply suggesting it to help you focus on what your idea for the game is. Keeping that in mind really helps you to understand what is needed and what is something you can deal without. For example:

If you are going to have waves of monsters you are going to render a player mode, monster models, how many waves? how many monsters per wave? All those models add up really quick and before you realize it your over the 300mb cap. The design doc helps you to understand what your limitations are and where you are going. From those limitations you can then decide what engine you should use, as well as what key things to start programing. I am just spreading some of the advice that has helped us in our production. By all means take my words with a grain of salt. I just wanted to help.

We made our game in XNA thinking it would be a great idea, as we started to progress and the coders wanted to start to code more of the things I wanted added rather than the core elements they realized they couldnt do alot of the stuff because of the DX9 limitation. So we had to waste 2 months of development to convert the game from XNA to SlimDX. Something that could have been avoided if I would have had all the stuff planned ahead of time. Again, just something to think about. I think your answer would be Unity at this point.
with those requirements, WebGL is almost out, i've seen some examples and the fps is really low, if you include game logic in javascript, depending on the browser, all of that javascript will be loaded at once, and that is not good. but you can use it if you use something like node.js to move your game logic to server side and make ajax calls. JQuery makes this task really easy.

the real deal is server load. you WILL need a server if you go the WebGL way. not only for multiplayer, but for all modes. unless make a package with your JS files and send it to the player, but that only works for PC/MAC and exposes all your code...

as for the Unity, its a pretty good engine and you should be able to reuse much of your voxel engine. just remember that you only need to subdivide the blocks when they are punched by the player and you don't even need to have all that chunk in memory. you can load only 3 layers for example. no way the player will break through three blocks faster than you can load the next three.

you can just generate a giant piece of the world in the world creation and store all that in disc, unload all. then load only the 3 superficial layers, capping the horizontal side of the layers to the players LOS. for the next 9 layers, store in memory the "block type id" and the "block id" (the last represents the id for the serialized block structure) for each block. every time the player breaks a block, you load a block on the same line of the block that he break, keeping the 3 layers of fully loaded blocks and the 9 layers of block ids.

all the numbers on the above description were arbitrary and will need some play test to tweak, but should save some memory, at least compared with the minecraft-way-of-loading-things. I was very surprised when i discovered that minecraft loads then entire topology of the chunk...

as for mods, if you use Unity, at least on windows you can use the Managed Extensibility Framework (http://mef.codeplex.com/ , the link is outdated because MEF now ships with the .net framework, but should give you an overview) also, for the WebGL solution, mods shold be straightforward, as all you need to do is to load a js file. The only concern about the loading of a js file is that you have no control over what that file will do.

I'm yet looking for mod in the Mono framework (as that it's what Unity uses).

in the very end, the choice is yours, the two solutions are managed, the two will have high memory requirements to do what you want. The only other solution i can think of is using plain old C++ with DirectX or OpenGL. that will give you more control over the memory, but will be harder to port for mobile devices.
I've created a simple game document.
Because i can't upload this file as an attachement, I'm placing it here:

Planned game modes:

-Survival – Player spawns with nothing in the world of voxel terrain and has to survive and complete some game goal. . . .

-Freebuild – Player gets a world and infinite materials. The only goal of this game mode is to build, what you want.

-Campaign – Player spawns somewhere in pre-created world and has to complete various tasks/missions.

-Special Operations – Game mode unlocked after completing campaign. It'll contain a few missions o play at diffrent difficulties and survival op., where player has to survive waves of enemies.

-Multiplayer – start a multiplayer server – (Survival or Freebuild)

-Multiplayer Special Ops – let the player has some help. Let him play with a teammate!

-***Multiplayer campaign – after game is finished, we can think about sth. like that.

-Official map server/User-created maps – Let other users build maps in freebuild and share them with built-in map server.

-Component build – The idea of components is to build sth. in freebuild, save it and „call” it in while playing survival mode as a set of semi-transparent blocks, to see where to place particular block.

Terrain generation/Voxel structure

-World will be divided into chunks (for example: 16x16(1x1x1)blocks). Each chunk will be 16xHeight of chunk*x16. Each block can be (but don't have to) divided into smaller blocks:
1x(1x1x1) = 512x(0.125, 0.125, 0.125) or
1x(1x1x1) = 1x(8x8x8)
* - I don't know how high chunk has to be, but i want it rather to have sth around 128 blocks. If player wants to build sth. higher than 128, a new chunk, (this time I think 16x32x16) will be generated on the top.

-Terrain has to be as realistic as only possible.
-The deeper player is, the more solid rocks are.
-The deepest type of blocks has to be really solid and drop no item, so that it's pointless to mine them.

Terrain modifying:

-Player has a backpack and some space in clothes as an inventory, so the maximum, he can carry is 1.25 block.
-Player can also carry a block in hands.
-The more overloaded player is, the slower he moves.
-Player can use various types of transport for repositioning more blocks.
-Types of transport:
-A boat
-A ship
-A minecart
- . . .
-Player can also pull or push a block.

Physics:
-Physycs has to be as realistic as possible.
-Every block could has a value that indicates if the block is as overloaded that it is goig to break, or to fall.
-. . .

Rendering:
-It'd be great if the game could render 900 chunks at 60+ FPS.
-The only thing to render are visible block's surfaces. I have my alghorytm to handle this, but if I find sth. better i'll replace it.
-I have no idea how lighting should be done:
-Easy way: Use unity's built-in lights and shaders. (could be hard to optimize, if for example i have a lava lake 50xx6x50 and each lava block is a diffrent dynamic light object)
-Not so easy way: Create own lighting engine as in minecraft (I mean sth. like if you turn the smooth lighting in minecraft off) At later stages, light can be smoothed.

-Various shader and weather effects:
-rainfall
-snowfall (if a word like that exists...)
-sandstorm
-storm
-fog/mist over mountains tops or over sea in some circumstances.
-etc. . . .

-Optimization like block-LOD
-Camera viewing frustum.
-Optimization like . . .

The game is rather going to be written in Unity.
Come with some additional ideas and comment.
Sorry, if my English isn't perfect.
Kiel368.

*If you see … somewhere, it means that this topic has to be expanded.

Of course, the first version is going to be very basic.

This topic is closed to new replies.

Advertisement