Welcome, Guest. Please login or register.

Login with username, password and session length

 
Advanced search

1411507 Posts in 69374 Topics- by 58429 Members - Latest Member: Alternalo

April 26, 2024, 05:53:15 AM

Need hosting? Check out Digital Ocean
(more details in this thread)
TIGSource ForumsDeveloperTechnical (Moderator: ThemsAllTook)Creating a minecraft-like engine for mobile with decent performance?
Pages: [1]
Print
Author Topic: Creating a minecraft-like engine for mobile with decent performance?  (Read 1211 times)
tobloef
Level 0
*


View Profile
« on: September 25, 2015, 01:05:42 AM »

I think there comes a time in every Minecraft player gone developer's life where they consider creating a Minecraft clone. It's not really that I want to make a full game, but I think creating the engine would be a fun challange. I would very much like it to run on mobile, but I worry about the performance. I've considered using Unity, but I feel like I would get much better performance if I wrote the game from scratch. I'm not sure though, and I have no idea what I should use, which still works on mobile. I would like the performance gained to be worth it, compared to the extra time spent coding, so if I only gain a few FPS worth of performance by writing my own 3D engine from scratch, maybe that off the table. Though it might be an interesting challange.

What are the pros and cons of the different approaches to creating something like this? Can you recommend me anything specific?

Thanks!
Logged
Layl
Level 3
***

professional jerkface


View Profile WWW
« Reply #1 on: September 25, 2015, 04:00:55 AM »

It's very unlikely that you'll get an equal or better performance than Unity when making your game from scratch, remember that Unity has an entire team of experts who directly work with hardware vendors and driver developers.
Logged
Polly
Level 6
*



View Profile
« Reply #2 on: September 25, 2015, 04:16:41 AM »

Depends on how you'd implement it in Unity.
Logged
gimymblert
Level 10
*****


The archivest master, leader of all documents


View Profile
« Reply #3 on: September 25, 2015, 05:10:58 AM »

You would need a lot of reading, but there is already unity engine led engine on mobile. Go here http://forum.unity3d.com/threads/after-playing-minecraft.63149/ they talk about every perf issue under the sun
Logged

dlan
Level 1
*



View Profile
« Reply #4 on: September 25, 2015, 05:22:08 AM »

This article could put you on the right track when it come to implementing a voxel engine in Unity.

Building a voxel engine from scratch is certainly a good learning experience and will allow you to learn more about how the underlying graphics API work. Now, if you don't have prior knowledge when it come to 3D graphics programming, you probably won't get better performance than with Unity, at least at the beginning. Since you are concerned with performance on mobile, it's a good idea to get familiar with the underlying hardware of mobile phone and API like OpenGL ES, here some papers on the subject:

(general paper about OpenGL and Tile-Based Architectures usually used in Mobile GPU)
http://www.seas.upenn.edu/~pcozzi/OpenGLInsights/OpenGLInsights-TileBasedArchitectures.pdf

(Nvidia paper on how to build an app that respect the Android lifecycle, contains some good advice about how to build a game on mobile device)
https://developer.nvidia.com/sites/default/files/akamai/mobile/docs/android_lifecycle_app_note.pdf

Minetest is another project that you could have a look at, it's open source and fairly complete at the moment, even though the mobile version is quite buggy at the moment (at least on my device)
Logged
tobloef
Level 0
*


View Profile
« Reply #5 on: September 25, 2015, 06:58:38 AM »

This article could put you on the right track when it come to implementing a voxel engine in Unity.

Building a voxel engine from scratch is certainly a good learning experience and will allow you to learn more about how the underlying graphics API work. Now, if you don't have prior knowledge when it come to 3D graphics programming, you probably won't get better performance than with Unity, at least at the beginning. Since you are concerned with performance on mobile, it's a good idea to get familiar with the underlying hardware of mobile phone and API like OpenGL ES, here some papers on the subject:

(general paper about OpenGL and Tile-Based Architectures usually used in Mobile GPU)
http://www.seas.upenn.edu/~pcozzi/OpenGLInsights/OpenGLInsights-TileBasedArchitectures.pdf

(Nvidia paper on how to build an app that respect the Android lifecycle, contains some good advice about how to build a game on mobile device)
https://developer.nvidia.com/sites/default/files/akamai/mobile/docs/android_lifecycle_app_note.pdf

Minetest is another project that you could have a look at, it's open source and fairly complete at the moment, even though the mobile version is quite buggy at the moment (at least on my device)

Thanks a bunch! Your answer were exactly the stuff I was looking for.
Logged
InfiniteStateMachine
Level 10
*****



View Profile
« Reply #6 on: September 25, 2015, 08:21:46 AM »

It's very unlikely that you'll get an equal or better performance than Unity when making your game from scratch, remember that Unity has an entire team of experts who directly work with hardware vendors and driver developers.

I'd have to disagree there. Their focus on ease of use for authors and targeting many platforms. As such they have relatively heavyweight objects and a generalized graphics pipeline. It's pretty easy to bring unity to its knees in that regard.

A scratch made solution for rendering a lot of cubes would be very easy to beat unity in perf. Assuming you have a background in rendering.
Logged

Layl
Level 3
***

professional jerkface


View Profile WWW
« Reply #7 on: September 25, 2015, 10:27:58 AM »

I'd have to disagree there. Their focus on ease of use for authors and targeting many platforms. As such they have relatively heavyweight objects and a generalized graphics pipeline. It's pretty easy to bring unity to its knees in that regard.

A scratch made solution for rendering a lot of cubes would be very easy to beat unity in perf. Assuming you have a background in rendering.

Assuming you were to render naively with a gameobject-per-block, sure. However if you render using something like a gameobject-per-chunk, generating the mesh at runtime you get much better performance. There are indeed a bunch of nifty tricks you can pull to get absolute maximum performance out of your rendering engine if you're writing from scratch, but I felt those were out of scope of this question as they're just not going to matter for a simple game.
Logged
InfiniteStateMachine
Level 10
*****



View Profile
« Reply #8 on: September 25, 2015, 03:26:43 PM »

I'd have to disagree there. Their focus on ease of use for authors and targeting many platforms. As such they have relatively heavyweight objects and a generalized graphics pipeline. It's pretty easy to bring unity to its knees in that regard.

A scratch made solution for rendering a lot of cubes would be very easy to beat unity in perf. Assuming you have a background in rendering.

Assuming you were to render naively with a gameobject-per-block, sure. However if you render using something like a gameobject-per-chunk, generating the mesh at runtime you get much better performance. There are indeed a bunch of nifty tricks you can pull to get absolute maximum performance out of your rendering engine if you're writing from scratch, but I felt those were out of scope of this question as they're just not going to matter for a simple game.

Fair enough.
Logged

Pages: [1]
Print
Jump to:  

Theme orange-lt created by panic