Tag Info

Hot answers tagged

79

There are several reasons for that. I'm just gonna touch on a few: It makes your source code a mess. If you have a lot of dialog (trees), a huge part of your codebase is just text that has nothing to do with your actual game code. You'd need to recompile every time you change so much as a single character. The dialog itself is hard to navigate. I imagine ...


29

Putting game content data in code means that to see any potential change or iteration of that game content data, you have to recompile the game itself. This is bad for two reasons: Many languages that games are written in have long compile times. C++ is particular can be very bad in this respect, and C++ is a very common language for large commercial ...


22

Legally I would be prepared for "change this name" notices and make it very easy to change that name; no matter how much in the right you think you are, it's just a nice thing to do. Create and maintain a dictionary of names to avoid, no matter how legal it is anyone who sees "George Bush" in your game will immediately lose their sense of immersion. ...


18

I'll avoid even looking at your code and instead simply explain how to build a torus. To understand fully what I will say, you need to know some basic vector algebra: vectors sums: X:=(x1,x2,x3), Y:=(y1,y2,y3); X + Y=(x1+y1, x2+y2, x3+y3) scalar multiplication: X:=(x1,X2,x3); a·X = (a·x1, a·x2, a·x3) norm: |X| = ...


17

Add a disclaimer: "All characters appearing in this work are fictitious. Any resemblance to real persons, living or dead, is purely coincidental." Use the above to cover yourself. And I'll use the below to cover myself. I'm not a lawyer and your legal decisions and consequences are your own. Of course, since neither of us are lawyers, the ...


15

You can generate the optimal path using A*, then distort it with midpoint displacement. This will ensure your endpoints are met and allow you to control the randomness to a great degree. For example, I would not randomize roads as much as rivers. Whatever intelligence is building roads typically attempts to be optimal about it. Take care to ensure that ...


11

Hire a writer. There really is no way around this. You need creative names for stuff? You need a creative person who can name stuff for you. You can try to learn how to be a writer yourself, but if you aren't clever with words then you won't be clever at naming things. But in a general direction, remember: If you want to make an apple pie, first you must ...


9

Here's a great example of procedural terrain generation, using parameters like moisture, height etc... http://www-cs-students.stanford.edu/~amitp/game-programming/polygon-map-generation/


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

You've already chosen an answer, but I think you're making this more complex than you need to. A lot of people have the same names as famous people, whether by choice or accident. You don't see the estates of famous people demanding average people change their names to avoid confusion, and there's no reason you should worry about it unless you are ...


6

As always, as always, it depends. But first, I would like to argue that hard coding is not bad by itself. I have hard coded content, specifically dialog text, in some simple games, and the world didn't end. We programmers love abstracting things, but remember that each layer of abstraction you make will make your program more complex and more difficult to ...


5

I suggest automatically generating, and maybe caching, the convex collision meshes instead of creating them by an external tool. However, I am not sure which of the following ideas is what you want. Do you want to end up with a single convex shape for a single model? That would be a convex hull around all vertices. Of course that simplification results in ...


5

I think the obj file format is what you need. OBJ is pretty commonly used in 3D graphics, and it's a text file. You will need to walk through your mesh properties and write your own file. Then you'll be able to load and display it.


5

These are the three approaches that I would take: Loot tables: Build a table for each zone and sub-area. Loot table should be approximately close to the theme and difficulty level of the enemies, I.e. if it is intro level and mobs can range from level 1-3, then so should the loot. You can make different loot drop tables for specific sub-areas as well. If ...


4

Most tools are simply designed to combine existing words. Like this one: http://www.wordlab.com/gen/acme-namemaker.php That sort of thing may be helpful. But as someone who comes from a theater/playwriting background, there's a real art to coming up with a good name. A good character name includes some onomatopoeia, where the name sounds like the item ...


4

As long as you can prove your code (in case of legal action, your code will be used as evidence) is generating those names randomly there will be no problem because depending on the amount of data (names, last names, jobs) it is just a matter of statistics to find the probable chance of having those combinations be the same as a real person. As Byte56 ...


4

An approach I've seen taken is to simply convert the diffuse texture map to grayscale, or copy one of its RGB channels, and then fuss with it a bit (for instance, altering the levels, inverting part or all of the image, etc.) This can be useful if the specularity is reasonably well correllated with the diffuse color. It's still a manual process though; ...


3

It's not too difficult, provided that you have a sudoku solver. Making sudoku solvers is a hard / interesting problem, so it's best to save it for a different question. Or you can just read this and see how you go. To generate a solved puzzle, simply run the solver on an empty board. The only caveat is you should randomise the "guesses" that the solver ...


3

The A* algorithm will also allow you to assign values to tiles indicating their suitability. For instance, you can assign the lowest cost scores to low land for rivers, to flat land (but not swamp) for roads, and generate based on that. This doesn't give you the shortest route, but it does give you the most efficient route. Apply a little randomness to your ...


3

The commandos titles look like they use prerendered backgrounds. This means that one or multiple artists design the whole wort in a 2d or 3d programm. Commandos looks like it was done in 3d and then post processed in like photoshop. The exporter of the 3d programm used a special export method, as the viewing perspective is not physically correct. Objects ...


3

If you're providing all the information for the bones, then really this is more of a importer isn't it? The code is not really generating any content, it's simply displaying the content you provide. Start with the simple case of a single bone. Make sure your code can read the bone specifications and draws the bone correctly (starting out with simple lines ...


3

The better answer I can give you is to do this preliminary steps: 1. Evaluate the offort required to build a prototype. Your prototype should be playable, limited in space (levels or map size or whatever space-related), in features (non customizable colors or static version of dynamic features). A pro if such a prototype may be evolved into a demo version ...


3

I'm afraid the conversion in the first place was probably a bad call. Depending on Visual Studio (Express) and XNA Game Studio isn't so bad, because they're free downloads. And I believe the WinForms 2 sample is a good starting point for getting the content pipeline working outside XNA. And loading from XNB should be faster than de-serializing XML. As for ...


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

You need to slice the image up in 9 parts. Four corners, four sides and the inner content. In this image, you can see how each different slice can be resized to produce the result you desire. Do not scale corners, leave them be as they are. Then you need to scale the top and bottom side along x-axis, but not in y. And then left and right sides you need to ...


3

I would suggest that in addition to using random numbers, it would be more interesting and logical, and good for play balance and sense of immersion, if the loot were related to the nature of the place and what else is there. Not just how deep into the dungeon it is, but what is the nature of each part of each dungeon level. Whether pre-designed or randomly ...


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

What about when height is a factor? I can make a heightmap with diamond square algorithm. I was thinking of adding some random water to each tile and then iterating through and moving water to lower elevations until it was all settled, but that would slow, and would probably make lakes, not rivers. I was also thinking of looking at normals for each tile. If ...



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