Find User here you can look for a user

Proposed Road Changes for v0.23.0

1mo
#1
One of the long-standing issues with My Colony 2 is that roads currently cannot be deleted. The reason for this has to do with the way roads were set up at the beginning of development for MC2.

For those who don't know, every game of My Colony 2 consists of two parts, the server and the clients. Even if you start a single player game on your own device, the game engine spawns a server on a separate thread, and a game client that you connect to the server with.

Additionally, the game world is split into chunks (kind of like Minecraft). As you scroll around the world, the server has to transmit all of the information about the chunks in your view area.

Further, the "Road" items in My Colony 2 are technically structures, just like the greenhouse or the ore refinery. You can see this in the Game Editor. So each tile of road that is laid down is similar to building a structure.

Since there is the potential to be way more road structures than regular structures, this can eventually lead to there being a ton of road objects created on the server, and a lot of data that needs to be transmitted from server to clients. This is further compounded by the fact that My Colony 2 maps are unlimited in size, potentially opening the door for tons and tons and tons of roads.

To try to get around this, instead of creating a road object for each tile of road placed, My Colony 2 creates one road object for each set of roads you build, and then remembers the end points of that road. So if you start drawing a road at coordinate x,y, and then move from point a to point b to c, d, e, f, and so on, the game just remembers that you build one road network with several points. Then the game just plays "connect-the-dots" by drawing your road from one point to the next.


If you look at the image above, this entire thing would be considered one single data object on the server. This saves a ton of space when saving the game, and a ton of bandwidth when transferring data from server to clients.

Since the roads are just a collection of endpoints, the don't technically "exist" on each individual tile that they occupy. This is the reason why you are currently unable to delete roads in My Colony 2, and the reason why roads can be built on top of other occupied spaces. Roads are basically just an illusion to the game right now. You may have also noticed that roads that provide a utility, such as the Solar Road, only provide one tile worth of power, even if they look like they take up 1000 tiles.

So I have been thinking for a while of a good solution for roads that will make them work better, allow for them to be demolished, and not break the bank for save file size and bandwidth. So here I want to share what I am thinking of changing, and maybe some of the people out there who are smarter than I am will have some comments or better solutions in mind!

Firstly, roads will no longer be counted to the engine as structures. This will remove the necessity of storing as much data for roads as is required for structures. The downside is that the game will not be able to have all of the features of structures, but of course none of the existing roads do anything fancy anyway.

For each chunk in the game, the server will store an associative array of road types (pavement, solar, brick, etc) and an array of coordinates in that chunk that has each type of road. That way when the game has to transfer chunk data to a client, it just says hey, here is a list of tiles that have pavement, and here is a list of tiles that have bricks, etc.

Finally, roads will no longer be tied to a settlement like structures are, and will no longer have an owner. For power generating roads like the solar road, they will simply add to the utility pool for the settlement they are in. If they are out in the middle of nowhere, they will not do anything.

So basically, any player can drop any kind of pavement wherever they want. Now there can be restrictions, like you cannot build anything in a chunk that is "owned" by another player. But his will allow players to build roads outside of their settlement boundaries. This will also allow for the building of long highways connecting one settlement to another, without expanding settlement borders.

So anyway, those are the road changes I am considering for the next update. Let me know what you think or what suggestions you have on how to make roads better in My Colony 2!
Owner of Ape Apps, LLC
1mo
#2
This is actually a very good idea I second this.
Have a fantastic day!
~cakedon (formerly itsLiseczeq)
Welcome
Ape Apps, LLC is an independent software development company founded in 2010 by Brandon Stecklein. Over the years, Ape Apps has published over 400 apps and games across various platforms. You can get in touch with Brandon on Twitter or by leaving a post on his wall @bastecklein
App of the Day