Tag Info

Hot answers tagged

21

Amit Patel, a user of this site, has created a wonderful resource of information about random world generation that will certainly be of use to you. Further there are some great questions/answers about procedural generation on this site. Road / river generation on 2d grid map Procedural world generation oriented on gameplay features How can I generate ...


17

By playing it! Whether a game world is too big or small depends on a countless number of factors, including: How big the player is How fast the player moves How many other characters there are Whether the game is multiplayer The hardware capabilities of the target platform Your target audience How the save mechanism works (can I pick up where I left off, ...


17

Back when I experimented with this type of thing (late 1990s), I read some papers and books to learn about water flow, but I didn't keep a record of which ones I looked at. I ended up doing my own thing because I wanted to handle erosion. I wanted rivers to produce canyons and floodplains. I wanted dam reservoirs to fill up with sediment. I wanted rivers to ...


12

How accurate do you want to be? A good but complex choice would be simulating all that history: Generate a random region list and adjacencies between these regions. Generate random civilizations with characteristics such as population, belligerence, technology... and populate the regions. Simulate as many years of history as you want, determining outcomes ...


12

We did something like that in Stendhal for raids. We did not aim for completely avoiding restarts. So changes to our core infrastructure services such as client/server communication do need a restart. But adding entities, creatures and NPCs, and modifying existing objects does work. (Oh, and sometimes live bug fixing, reflection can be used to manipulate ...


9

I approach games from the opposite point of view; instead of "how big should my world be?", I ask: "how small can my world be?" If your game doesn't absolutely require a particular bit of space -- if that space isn't accomplishing something useful (thematically, emotionally, or in terms of game mechanics), then I say that that space should be removed as it ...


8

There's no real technique as such. The easiest way is to have a set pixel:real world units scale. If your character is 90 pixels tall, you'd have your ratio at about 45:1 in metres (assume your character is 1.8m, or 6 feet~). Then you can build everything from this. Your house may be 10m wide, so it would need to be 450 pixels in width. The main thing here ...


8

Even with a manual process of model generation, there are some tricks you can use to maximize your output. We can follow the same basic rules for real life conservation. The three R's: Reuse - Take the same model and apply a different texture to it. This can save you the time it takes to generate a model. And will give a convincing "that's a different ...


8

Gameplay is always more important than realism. Realism is a tool to make the game more accessible and easier to understand. When game features work like the player expects them to work in real-life (note: the players expectations are not necessarily realistic), it makes it easier for the player to learn the game. But that's it. As soon as realism starts to ...


6

You are on the right track. Consider Minecraft. Minecraft only loads the areas (also called chunks) immediately surrounding players. This is how the server is able to run without running out of memory, and why clients don't get bogged down from network traffic. If it is a very low amount of information being sent between Client/Server, would it make ...


4

Your problem is purely two-dimensional, in the plane formed by the sphere centre and your source and destination points. Using quaternions is actually making things more complex, because in addition to a position on a 3D sphere, a quaternion encodes an orientation. You may already have something to interpolate on a circle, but just in case, here is some ...


4

What you are basically looking for is a hot-pluggable system. You run a main application and then add plug-ins at runtime that get integrated in the event loop. First, start off thinking about what your world expects from a game entity. For example (based on your description): interface Entity { void init(World world); // Called when loaded for the ...


4

If these things are occurring while the player is offline, then simply use calculations to determine what the values should be when they're logged on next (and do the same whenever another player in the game accesses their publicly viewable statistics that would be effected by this). For example, a player sustains a sickness that can be half-way recovered ...


4

I agree with The Communist Duck, but there are other issues. Generally in 2D RPG and strategy games, closed areas and areas that access thru doors are smaller than what it should be. You may need to do that as well to make your towns smaller and easier to navigate. Similarly and potion would be bigger than what it should be to allow user to see and pick it ...


3

If your map is not extremely dense, you would be best off defining it with a list of nodes rather than an actual array or grid. Create a list of nodes, where each node has a set of links to what node you will go to if you travel N, S, E, W, U or D. This is how MUDs typically work I believe. Also text-based adventure games. Here is a bit of pseudo code to ...


3

I believe I've been staring back at this question for the last three days, while asking myself how the procedural generation of worlds or even galaxies can, at the same time, be deterministic(such as always generating the same content from the same seed), look natural, and still have unique, interesting, unusual or even beautiful features in its landscape. ...


3

Save the world (no pun intended) and all its state (positions, velocities, all variables). Close the program. Implement changes (ensuring backward compatibility with saves). Recompile program. Restart program. Load world and state. Repeat This is a general solution though, I don't Java specifics to know if you can dynamically implement code blocks and ...


3

It is generally a good idea to only send the information to the client which is supposed to be shown to the player. Following this principle reduces network traffic and prevents cheating. But keep in mind that when the player moves their character, you certainly want to start the move on the client-side before receiving the confirmation from the server to ...


3

There is a good answer for the question if you arrange your game under the premise that you want to optimize it's usability for human access. But sometimes the fun comes from beeing initially overwhelmed so apply the principle with care. Get your scope and the taxonomy. Scope first, i use the example of a chess game: A user chooses a piece to move (or a ...


3

Make sure both quaternions are on the same hemisphere on the hypersphere. If their dot-product is less than 0, then they are not. In that case negate one of them (negate each of the its numbers), so they are on the same hemisphere and will give you the shortest path. Pseudocode: quaternion from, to; // is "from" and "to" on the same hemisphere= ...


2

Yes, there is. Here's a dirt-simple history generator: #!/usr/bin/env python # to create a visualisation, run like this: # ./timeline.py --dot | dot -Tpng > filename.png import sys import random from pprint import pprint # Names is a newline separated list of nation names. file = "names.txt" names = open(file, "r").read().split("\n") history = [] dot ...


2

Similarly to Trevor's answer, perhaps you could work backwards, starting from the question: "How big does my world need to be in order to accommodate X, Y and Z?" X, Y and Z here are of course your game's contents. They can be cities, or distinct areas, or targets, and so on. Unfortunately a lot of work may need to be done before you can reach even having a ...


2

If you want a scalable solution use a graph data structure (Wikipedia Link) With a graph you can associate each region with a node on the graph. Each node contains the neighbours of that node in the graph (the nodes that are connected to it). You also have a lot of increased flexibility with a graph, for example: A region had a north, west and east exit ...


2

Wouldn't such an algorithm automatically generate more 'tactical' terrain when roads are generated between cities? Assuming that roads can only have a certain elevetion change per distance, terrain height would be adapted to the heigth of the road, which would lead to generation of chokepoints whenever a road passes through a hill/ravine/whatever. Of ...


2

Only paper dealing with similar issues I could find off-hand is Stachniak and Stuerzlinger's "An Algorithm for Automated Fractal Terrain Deformation". It assumes you create the terrain first and deform it (or rather, let the algorithm pick the parameters to deform it with automatically) to fit your constraints later, so it doesn't answer the question ...


2

These updates typically take place in "game time," not real time. Slipstream the code to update statistics and effects that should change over time right before the sequence that inserts the character into the world. At that point you know how long it has been since the character logged out and now when he's about to log back into the game environment, ...


1

Maybe I'm oversimplifying, but why ignore the fact that cities are built on advantageous terrain, or for that matter, any size of a civilized area for whatever reason? Maybe the terrain offers a tactical advantage for a military installment or perhaps there is a lumber mill at the intersection of a large forest and a river that has a larger village ...


1

Lighthouse 3D has a good survey of some simple algorithms for terrain generation. If you're starting with a map that contains cities or other interesting areas, you could use some of these techniques to generate whatever terrain you would like. For example, intelligent use of the fault algorithm could be used to create cliffs or valleys around your city ...


1

Each node could have a 3d index and 8bit flag where you use 6 of those bits to determine if a direction is walkable or not. Example node: XYZ(choose data-type depending on your map size requirements) 128,129,523 UDEWNS(up,down,east,west,north,south) 100001 Would mean you can walk up and south from zone 128,129,523. When you walk one of the directions ...



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