spykeh
spykeh
spykeh
1 post
 Game development hobbyist and professional Software Engineer. I am attempting to create an MMORPG with Earth-sized 3D world.
Don't wanna be here? Send us removal request.
spykeh · 4 years ago
Text
Road to creating my first ever Unity Game
Background
I am a professional web application engineer, however my main hobby have always been about games, so I thought why don’t I try to create some game that is actually fun and also somewhat different from other games.
I have been developing this game for a while now - about 9 months, including learning about Unity -, but I just wanted to start writing some devlogs as well.
This game’s idea is mainly coming from Pokemon GO. I thought Pokemon GO is an interesting game, and it’s different from other games in a way that we have to move in real life in order to move in game. And it is basically an earth sized game already since it uses Google Maps or Mapbox’s data only to create the environment.
But I personally like touching the joystick or keyboard to move the character as well so I thought of ways of mixing together today’s big MMORPG’s with Pokemon GO. I also want the environment to be more 3D, and for that we need elevation data as well.
Idea
In my mobile game I want to have a procedurally generated environment using only map data, and the ability to move in game with a joystick as well, not just with real GPS location.
Here comes the problem: what’s the point of moving in real life if we can just move with the joystick? Well we can limit the movement in a certain area, or add benefits to the user being close to the real location for example. I think it could be still an enjoyable way to play even on a train to work/school, or at home. Maybe even for while walking if I find some way to make it playable in Portrait mode, but no concrete idea yet.
Creating equal sized areas
As a main element of the game, and a way to decide how big of area we want to build around us, we have to separate the earth into equal sized areas. Well it doesn’t necessarily have to be equal, but it makes more sense. I also want the areas to have equal neighbors, which can also be an element of the game (eg. only being able to walk or see current area and neighboring ones.
Basically the only way to divide a sphere into equal areas is by making hexagons (and 12 pentagons). So we start with an icosahedron, and subdivide into more and more smaller hexagons until we get to the size we want. Personally I chose 19 times subdivision of icosahedron which results into hexagons sized as about same as Tokyo Dome’s area (46,755 m2)
It is a little problem, since the tiles provided by Mapbox (or other map services) are rectangles, however their area is different depending on the latitude. 
I still decided to go on the divide by hexagon route, and finding the matching tile(s) what I need. I think hexagons look cool anyways :) 
Generating environment from map data
Tumblr media
It is simple. The map is green by default which is converted to grass. Roads are painted on the terrain, and we dig space for the water area and put a flat mesh on it to create the water. And as for the terrain, we just use the real elevation data to create the mesh in 3D. All the data is coming from Mapbox. The rest can be pretty much random to make it more lively with trees, buildings, etc. 
I was even thinking of using POI or building data to decide where the buildings should be, but it seems bad idea for performance, and more importantly, unfair for people who live next to almost no buildings if the buildings are big part of the game.
Tumblr media
Fuji.
When the elevation goes above a certain level, we can change the ground color to snow for example.
Server
This is a multiplayer game, so of course we need a server to run on. Since the world is huge, I want the performance to be best as possible, so I decided to write every server code in plain C# using System.Net package. It uses mostly TCP, except for joystick movement which is UDP. Not quite sure if it is feasible for huge amount of players, since the server also has to create the environment including physics and everything, but I think if it’s scalable, it should work. For example creating servers depending on the area and choose the server accordingly as well. I found EVE Online is working similarly, so hope it works.
Combat
Tumblr media
Sorry for the hideous UI. All are placeholders/debugging.
The combat I want should be similar to today’s mobile games, like Black desert Online/Diablo Immortal/Wild Rift. So basically moving around with a joystick and easy auto targeting, but also enabling aiming skill shots.
Conclusion
I think that’s all about the progress so far. There are many minor things I missed but maybe I will write more of each minor thing later in more detail. My ultimate goal is to develop this game until a point which is actually publishable and hopefully enjoyable by people. I know it’s almost impossible to create MMORPG as a solo developer, but I hope I can achieve it by making many things procedural instead of manually created.
2 notes · View notes