Hot answers tagged

138

Just some quick additional suggestions, that sometimes complement what others have already said. 1) water solution: I never understood why killing the player with a shark or something. Just let him/her swim infinitely (like with a proceduraly generated infinite ocean). That alone would closer resemble the idea of how distant it would be in real life to ...


69

Different games have different requirements in how realistic they are to their genre, e.g. FPS games can constrain to a building, whereas RPG games like Rust / DayZ / Skyrim have larger and more open world maps to suit their style. Some common ones across games (and examples) include: Constrain to an Island and: Ruin the only bridge out (GTA 3, Vice City, ...


56

I am a bit hesitant to add this option, but it could work. Torus. When seen in 2D (neglect height for a moment) the inside AND the outside of a torus are endless. They simply wrap around on both axes. Placing your characters on a shape like that could be tricky. You could always go easy on yourself and get a less exact torus. (source) Now we're talking ...


54

Well now - what a simple but interesting question to tackle. When reloading a level there are so many factors that need to be taken into account that the answer can go many ways. If your level state contains a large list of assets it can be more practical to start from a clean slate when reloading a level back to a save/mission state as this maintains the ...


49

Basically, you just need to put something at the edge of the world that the player can't move past for some reason. Anything will work, as long as it stops the player from going any further in a particular direction while using the actions allowed by your game. You seem to be looking for a comprehensive list, so here you go; I think this covers all the ...


43

Depends on the game. In a obstacle course/parkour type game against a time limit it's common to add checkpoints that add to a time limit which is tight enough to that a big mistake will cause failure. In a puzzle game however like your example then just letting the time run out is a better idea. It's probably also a good idea to let them undo actions that ...


31

Flat Earth The Earth is flat, so why not border the world realistically; A cliff that falls into space.


27

To briefly answer your main question first, the main advantages of a procedurally generated game world are that: The world can be huge, much larger than any manually designed game world could possibly be. The world (or at least parts of it) can be regenerated for each game, potentially increasing replay value, since the player will always have something new ...


27

Caves. No start, no end, no invisible walls. There will be no obvious 'walls designed to keep the player from leaving the playing area', since you're in a cave. All walls are the same.


26

First of all, you should measure where exactly the bottleneck is so you don't waste time improving things which are already good enough. The bottleneck could be any of these: Reading the XML file from the hard drive Your XML parser parsing it Your code which interprets the output of the XML parser and converts it into your internal data structures The ...


21

Kill the player Death is an easy way to tell the player they have made a big mistake. And you save them the trouble of restarting by restarting for them. An easy way to retro-fit death into a scenario is to introduce a deadly time-constraint, like water flooding, or walls closing-in. Your imagination is the limit!


21

A very interesting example is in the first scene of Fallout 4 : You are in your normal house during a normal day and suddenly there are news reports and alerts of nuclear bombs (the beginning of the nuclear war of 2077). You are then tasked to go to the nearby vault as soon as possible. But you can take a long time to do so if you wish. The relevant part is ...


14

To clarify the existing answers against your question about consoles: they don't have enough memory to store both the starting state and current state for larger complex games. A game could store the level and initial state separately so that just the state could be restreamed in, and this is very likely what many games do. Even streaming just that is ...


14

Include leaving the game area in your story. Perhaps those pesky guards wont let you leave the city. Perhaps the front door or gate is blocked/locked. It might not all be impossible, but still hard to leave the game area. What happens when the player does leave? You win the game! (but perhaps there is another better ending?) The point is the player need ...


12

Asking how many levels to include in a game is sort of like asking how many paragraphs to include in your essay, or footsteps to take in your journey. Once you have a clear idea of your destination and your path, the question answers itself. But it is a question worth considering because it leads to some interesting observations about game design. What is ...


12

A "you have no chance" message can be a pretty jarring break of immersion. If the user is really trying to figure out how to beat the level, his/her mind is deep in their mental model of what is going on. Such a message would be interrupting. If you do want to do this my advice would be one of: Bring the message up slowly, perhaps as just a warning blip ...


11

Tell the player, then save them. A good example how to do this well is the Portal series. Despite the very well thought out puzzle designs where most mistakes can either be fixed or results in immediate death, there are a few situations in the game where the players can trap themselves or screw up the puzzle in a way that it can not be solved. The ...


11

A neat trick I've seen in a game from the past (Ultima 7): make the entire world map seamless, namely once the player has reached an edge, (s)he gets teleported to the opposite side. This technique could work pretty well also if your map is surrounded by water, without the need of blocking the player o killing him/her.


9

Your question is very general to being with, so a specific answer (like mountains, water, or caves) can't really be given as we don't know what specific setting you are talking about. A general answer would be to incorporate things from the environment into the border. Some examples would be: A city. Construction can block exits. The wilderness. As you ...


7

I disagree with much of Blue's answer, I do not believe there is a technical case for not resetting levels - I certainly never encountered one. Level loading is almost always slower than level resetting, in fact I find it difficult to conceive of an occasion when it wouldn't be. In most cases games could offer effectively instant level loading if the devs ...


7

Advantages of Procedural Generation Can easily scale your maps / designs to truly large sizes, much larger than you could create by hand. By creating a system where chunks of terrain are created on the fly, you can avoid having to write pieces of code to load in chunks from permanent memory. Over the long term, you may be able to discover more viable ...


7

Most games don't have a separate class for each level. The usual way is to store the layout of each level in a file. These map files contain the environment and the positions and properties of all objects in it. When a level starts, the map file is loaded and a Level object is initialized with the data from that file. When the player finishes the level, ...


7

Despite it being used for virtually everything, and despite it being used even in high-volume, low-latency applications, XML is an abysmal format for almost everything, but in particular for applications that have timely constraints, including games (except maybe for storing the game's settings). Even for live data, a simple binary tagged format which ...


6

I don't see why you couldn't give some less subtle hints. Something like this: Seems like an obvious enough encoding. You could remove the keys from the levels that have already been completed. Of course you can tune the prominence of the keys into your desired solution. They could be the same scale as the locks behind the numbers as well. Just some food ...


5

You are asking for a concept of scenes inside one activity. This is as easy as creating an abstract scene or an interface that will have methods like renderMe() and onUpdate(long timeElapsed). Then in your engine or game-loop you simply render the current scene. How do you switch between scenes is upto you. You can have a governing class SceneManager. So how ...


5

The way the game Osmos solves this, when you've got to the point where the game is unwinnable, is to have a "Doesn't look good..." message appear unintrusively on the screen. As a player, this is really helpful, as it is entirely possible for the game to look vaguely winnable when on the edge; also it allows the user to choose whether to restart or to ...


5

There are a number of factors to approaching this problem, although you are on the right track. Single Load The first approach, as you've already tried, is to load it all at once. This puts all your load time and file I/O up front. As you've already noticed, as a map size grows, your initial load time can become annoying to the user. This also creates an ...


4

Sounds like you have discovered a game- or level- design issue which you might want to address in other ways, such as reconsidering how the game rewards success, or shifting to an alternate game mode where there is a secondary goal when the main goal will no longer be possible. The details depend on the game, of course, the expected players' interests, and ...


3

I'm going through your questions one by one. How are these scales and maximums determined? Is there some magical formula or a generic guideline (like from a game)? No, there is no magic formula whatsoever. The only rule of thumb is that people usually like round numbers. That is why there are so many games with max lvl 100 (or 99) and not max lvl 639. ...


3

When building your game, Unity will not include all the scenes by default. Ensure that your scene is included and checked in the build window. The build settings window appears after selecting build and displays the currently selected scenes to be built. You can also find it by selecting File->Build Settings. You may need to add the scenes yourself and then ...


Only top voted, non community-wiki answers of a minimum length are eligible