Creating a game world...

For starters - I’ve never tried making a game before.

I wanna do this for my own satisfaction and fun, while learning scripting language on the side for educational purposes.
I have this idea for a game in my head, pretty well sketched out, and I wanna do small parts of it while learning by doing.

This idea here might be over the top, and if so please give me some advice on where to start if I wanna be able to do what I describe below.

I would like to do an FPS, but for now we can leave out the S part.

I would like to create a game world, that resembles a 20 km x 20 km real world location.
The size isn’t important for now - I’ll start by making a small sector. Just asking to know, taking the points below into consideration, if this is within grasp - or possible at all?

When you start “a new game”, this world should be randomly generated…

  • The world should consist of one “big” city, several small towns and countryside.
    So im thinking making “chunks of world” that can be put together in different ways
  • but I don’t know s**** :slight_smile: What’s the best way to do this?

The player should be able to reconstruct some of the buildings.
For example to tear down a piece of a wall and insert a new door.
Is this possible? Maybe by making the world in tiles? But I cant make second and third floors, if it’s a world of tiles correct?

I’m sorry for all my ignorance, but I would really like to try this. Unity seems like a perfect tool and the community seems nice and helpful :slight_smile:

Thanks in advance

This sounds possible. Like you said, you should make a system based off of “pieces”, which many developers do. If you need an example check out something like fallout 3 or the sims 2. Basically what you are going to want to do is create a bunch of pieces, such as wall, wall /w window, wall /w door etc, then piece them together inside of unity. I don’t really understand how you are going to make the player reconstruct the buildings in a first person environment, but, despite the implementation, this could be done easily by removing pieces of the building in real time using scripting. Of course, one huge thing to consider here is performance: once when you construct a building in Unity you should use the mesh merger script to merge the building at runtime, because each of those pieces is going to be at least one draw call, which will add up insanely fast if you are making a whole city. Removing pieces with this system would be tricky and I myself probably couldn’t do it easily or gracefully, but in theory you could replace the merged building with the pieces again and when the player is done manipulating the building, merge it again. To make this even more performance effective, when the player manipulates it only the general area of the piece being manipulated should be turned into the pieces, IE the first floor or the north side.

I’m not saying any of this would be particularly easy, but that’s probably how you would do it. Also, I could be wrong on some things. I.E, I don’t know if you can merge meshes easily or at all after the game starts. I assume you can, but I’ve never tested this. Probably someone with more experience scripting can confirm this or provide a more elegant solution.

Random placement of buildings to form a city would need to be generated by a procedure (“procedurally generated”). That will require some intuitive thinking on your part to implement properly, though, so good luck.

If this is your first or an early Unity project, you should probably start with something simpler and go back to this later, just to get your feet wet. Like, first you should model and arrange a basic room or small area with some interactive objects like crates or barrels to get a feel for level design before trying a system with so many variables.

Hope this helps some.

All this is do-able, and as you say, it is best approached by taking it in small chunks. Start out by taking a look at the many tutorials available.

First… thanks for the rapid replys…

Unfathomable Chaos: The reconstruction thing comes from me playing a bit too much minecraft at the moment, and would like to be able to give the player some control of the environment… thinking about it though, placing objects and the like should be enough - no need to tear down walls.
“procedurally generated” - I will look into that - Thanks :slight_smile:

Pakfront: …but what am I looking for? Making a building should be pretty straight forward following tutorials and the likes, but what is a good way to approach it if I wanna work toward accomplishing my goal?

Thanks

Unfathomable Chaos has some good guidelines for your specific idea. I was suggesting start with the basic tutorials (Lerpz, FPS) and understand how the character and camera control scripts work. Implement your own character walking on terrain. Then look into how Instantiate and Prefabs work and then write a simple script that places some Prefabs around the terrain.

Thank you …now that’s guidelines :wink:

Very much appreciated from both of you

Ill give it a try