Jump to content

  • Log In with Google      Sign In   
  • Create Account

Sandbox Games like Minecraft?


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
7 replies to this topic

#1 Tjandy   Members   -  Reputation: 108

Like
0Likes
Like

Posted 08 September 2013 - 06:35 AM

Hello everyone. I am new to this forum,and this is my first post.

 

As most of you had already know the game 'Minecraft',an open-world sandbox game,coded in Java.

There is a new sandbox game too, 7DaysToDie.

If you are free,please check both of them out.

 

I think 7DaysToDie is coded in C++ or C#.

 

My question is,to make a game like Minecraft and 7DaysToDie,should I choose Java or C++?

 

I mean,in handling,programming,designing and stuff,which one would be the greatest choice?

 

Thank You for reading and taking your time to read this!

 

Helpful and informative comments are appreciated.

 

Please do not give negative comment 

 

Thanks!

 

 

 



Sponsor:

#2 b5cully   Members   -  Reputation: 131

Like
1Likes
Like

Posted 08 September 2013 - 07:21 AM

On that note, with Java you *may* encounter memory problems due to (sometimes exaggerated) memory allocations done by the JVM (like minecraft has), while C++ seems to be more customizable and in this regard. Apart from that, I don't think it matters what language you use apart from personal preference, except you want something in particular.

 

If you don't have any experience in coding/making assets for a game or participating in a large project in general, I wouldn't recommend even starting... Too many people already starting games but never finished them because they lack experience, competence and endurance.

 

If anything, you can always start some small projects first before working on something as big as Minecraft or 7DaysToDie. I.e. Try making a small zombie survival game, then slowly work yourself to the top till you can actually realize the ideas you got.


Programmer, Artist and Composer.

Currently working on Starfire: http://www.indiedb.com/games/starfire


#3 molehill mountaineer   Members   -  Reputation: 595

Like
8Likes
Like

Posted 08 September 2013 - 07:28 AM

The language you choose to program in doesn't really impact the kind of games you can make.

It's a bit like asking "should I write a book on paper or with a typewriter".

You might choose one or the other depending on your specific needs (if you have a co-author and your handwriting is terrible, for example) but in the end the choice doesn't really affect the book that you'll write. 

 

(That being said: obviously an object-oriented approach will save you alot of headaches).

 

One of the reasons many game developers code their projects in C++ is because it give you a large amount of control over how memory is managed.

The programmer is responsible for releasing parts of the memory the program is no longer using.

For example: after a bullet hits the wall the c++ instance of the bullet object must be removed from memory. If the programmer forgets to do this the player will effectively cause a bullet object to occupy a piece of RAM memory every time he pulls the trigger. This is what's known as a memory leak.

 

Because c++ gives you a large amount of control you can optimize the time it takes to render a 3D scene to a large degree, If you know what you're doing.

If you don't know what you're doing it means your game can become an unreasonable "resource hog".

 

Java, on the other hand, does this sort of stuff through "garbage collection" - the virtual machine will take care of deleting objects for you.

You don't have to worry as much about memory leaks but larger games will be much more difficult to optimize.

 

 

Generally speaking Java programs take less time to develop, because more is "done for you" through the use of libraries, automation, etc.

The downside is that you have less control over what's going on under the hood.

 

I'm guessing you're new to programming so Java wouldn't be a bad place to start since it will be easier for the reasons mentioned above.

Once you learn to think like a programmer you'll be able to learn new languages pretty quickly.

 

I do have to say, however, that making a game on the scale of minecraft is far too ambitious.

Think of it like learning how to play a guitar: it takes time, effort and lots and lots of practice. There's a good reason most people's first game is text-based.


Edited by molehill mountaineer, 08 September 2013 - 07:46 AM.


#4 Malabyte   Members   -  Reputation: 589

Like
-1Likes
Like

Posted 08 September 2013 - 07:37 PM

Post deleted (redundancy)


Edited by Malabyte, 09 September 2013 - 07:14 PM.

- Awl you're base are belong me! -

- I don't know, I'm just a noob -


#5 Servant of the Lord   Crossbones+   -  Reputation: 21190

Like
1Likes
Like

Posted 08 September 2013 - 07:51 PM

C++ also has garbage collection (the stack and smart pointers) - it just looks and behaves differently than the normal appearance of what people think garbage collection has to look like.

 

While normally I wouldn't recommend C++ over another language because most languages would do fine making most indie games, with Minecraft it lags like crazy because of the absurd RAM usage (because of the nature of the voxel world). One of C++'s strong points is how well you can compact memory usage - since I don't have any experience with Java myself, I'm not sure how Java measures up compared to C++ in that area, but it's definitely an area I'd take into account if I was selecting a language to make a Minecraft clone in.

 

But, more importantly, go with whichever of the two languages you already are familiar with - if you later encounter performance problems (unusual for an indie game, but voxel worlds happen to be RAM heavy), then you can figure out ways of combatting that or even write just that part in C++ or a similar language.

 

C++ would probably be harder to learn upfront (it takes years), but if you don't know any language, then even Java might have you trying to run before you can crawl. If you don't know any language, your first goal is to actually learn a language - you don't start off by making a game.


Edited by Servant of the Lord, 08 September 2013 - 07:56 PM.

It's perfectly fine to abbreviate my username to 'Servant' rather than copy+pasting it all the time.
All glory be to the Man at the right hand... On David's throne the King will reign, and the Government will rest upon His shoulders. All the earth will see the salvation of God.
Of Stranger Flames - [indie turn-based rpg set in a para-historical French colony] | Indie RPG development journal

[Fly with me on Twitter] [Google+] [My broken website]

[Need web hosting? I personally like A Small Orange]


#6 Tjandy   Members   -  Reputation: 108

Like
0Likes
Like

Posted 08 September 2013 - 09:09 PM

Thank you all above posts ^^

 

I know C++,since I do my own projects(together with D3D).

 

I'm just thinking of creating a game,like a 'hobby',during my free time.

 

Once again,thank you for the very informative replies,it is much appreciated!



#7 TheChubu   Crossbones+   -  Reputation: 4827

Like
0Likes
Like

Posted 09 September 2013 - 12:16 AM

On that note, with Java you *may* encounter memory problems due to (sometimes exaggerated) memory allocations done by the JVM (like minecraft has)

Thats 80% programmers fault ("newing" everything, making non-reusable objects, etc) and 20% JVM's need for more memory to function.

 

The allocations aren't made just because, the programmer makes them with new, thus its their responsibility to keep allocations in check, pretty much like in any language. In Java its easier because many of the corner cases are removed (deallocation is taken care for you, objects are passed by reference and every object is created in the heap thus its easy to see the lifetime of any object, and so on).

 

This is an indepth article on JVM's memory requirements http://www.ibm.com/developerworks/library/j-codetoheap/.

 

Nevertheless, manual memory management is indeed a pretty good thing to know. So if you think you could do it in C++, by any means go on, you'll learn a lot. I still prefer Java because its syntax is dead simple and you get multi platform support pretty much for free.


"I AM ZE EMPRAH OPENGL 3.3 THE CORE, I DEMAND FROM THEE ZE SHADERZ AND MATRIXEZ"

 

My journals: dustArtemis ECS framework and Making a Terrain Generator


#8 Malabyte   Members   -  Reputation: 589

Like
0Likes
Like

Posted 09 September 2013 - 05:18 AM

While normally I wouldn't recommend C++ over another language because most languages would do fine making most indie games, with Minecraft it lags like crazy because of the absurd RAM usage (because of the nature of the voxel world). One of C++'s strong points is how well you can compact memory usage - since I don't have any experience with Java myself, I'm not sure how Java measures up compared to C++ in that area [...]

 

I believe 7 Days to Die is written in C++ and not Java, and there's at least a clear difference between both the the textures and the voxels in that game and in Minecraft. Same with Blockscape (although I'm not sure what Blockscape is written in). So if that's anything to go by, there you have it. Although for all we know, Notch could just be a poor programmer and the guys from 7DD could be supermen.


Edited by Malabyte, 09 September 2013 - 05:19 AM.

- Awl you're base are belong me! -

- I don't know, I'm just a noob -





Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS