_id
int64 0
49
| text
stringlengths 71
4.19k
|
---|---|
4 | Game Characters vs Characters in other medias How do a characters designed for a game differ from characters made for books or movies? When a book or a movie is converted into a game, what are the differences and similarities that have to be addressed? Are there pitfalls in character design when jumping between these different medias? |
4 | How to Create a Game? I'm a newbie. I like to play games, but I'd also like to program them too. I know it's difficult to create a game, but please share the basic info I need to get started creating my first game. What do I need to study to become a game developer? What is game AI? What is a Game Engine? What are the different types of game engine? |
4 | Random Procedural vs. Previously Made Level Generation What the advantages disadvantages of using random procedural generation vs. pre made levels? There seems to be few that I can think of, other than the fact that items may be a problem to distribute in randomly generated terrain, and that the generated terrain may look weird. The downside to previously made levels is that I would need to make a level editor, though. I cannot decide what is better to use. Could answers include code examples of both procedural and premade generation, as well as the pros cons? |
4 | Giving points to users how can I make it interesting? I have a website where users can choose the winner of a sporting event. If they guess correctly they get 1 point, otherwise they receive zero points. At the end all users are ranked based on their score, which is computed like this score points (number of guesses number of misses) It's a rudimentary system but it works alright. However I am looking for a points system that's more interesting to the user, that makes the game more engaging. For example giving more points for picking the underdog in an event might make the game a bit more interesting. Can you offer me some suggestions? |
4 | How to start encouraging team collaboration? I am working on converting a single player game to multiplayer, but I am concerned that if I simply do a 1 1 conversion, even in modes with "multiple players" there won't be any incentive for team work. And since I have more experience with single player mechanics than multiplayer ones, I could use some advice on this. Here is what I have implemented so far points that reward team based achievements higher than single player achievements eg. single kill vs team kill a "spotting" mechanic which allows players to show their team the enemy's position on the minimap health amp ammo items which can be shared to resupply the team team based game modes such as capture the flag, TDM etc My main concern with the above, is that there is a heavy reliance on individual players to want to play in a team based way. If they don't want to, they can still lone wolf it in most cases which can have a negative effect on the rest of the team who is trying to play collaboratively. It only takes one person in a team to spoil the fun! For example, the COD series has had a number of perks, achievements and streaks designed to encourage team collaboration but I have rarely seen these used in multiplayer since a lone wolf strategy seems to be more common. Another example, the Battlefield series has had an entire class devoted to supporting team members with health packs, repairs, ammo resupplies etc and in multiplayer it is common to see this being used to fully effect. So why do such features mechanics work in one game of the same genre but not in another? I assume the type of player is relevant here, but there must be more to it than that. What are some tried and true ways to encourage team based play or collaboration? This does not necessarily mean players talking to each other, but rather working together to achieve the same goal or different parts of the same goal. |
4 | Cost to licence characters or ships for a game I am producing a game pitch document for a university game design class, and I am looking for examples of licencing cost for using characters or ships from other IP holders in a game. For example cost of using an X Wing in a game, licencing from Lucas cost of using the Enterprise in a game, licencing from Paramount cost of using the Space Shuttle (if any), licencing from Nasa EDIT The closest information I can find is from an article about Nights of the Old Republic, but isn't nearly specific enough for my needs What Kotick means by Lucas being the principal beneficiary of the success of The Old Republic is that there are most likely clauses in the license agreement that give percentages, points, or another denomination of revenue out to Lucas and his people just for the Star Wars name, and that amount is presumed to be a great deal of money. Kotick is saying that because the cost of the license is so prohibitive, as he has personally had experience with in his position as CEO of Activision Blizzard, that EA will not be able to be profitable because of the hemorrhaging of money to the licensor. EDIT 2 Another vague source stating that FOX uses a "five figure rule" (assuming between 10,000 99,000) It seems FOX, like most studios, will not license individuals to create new works based upon their products. They will only commission individuals of their choosing if they elect to branch out into expanded product lines related to those licenses. Alternately, they are open to making the licencing available to large corporations with access to global markets, but only if those corporations agree to what Ms Friedman called a "five figure guarantee". Presumably this means that the corporation seeking the licensing must agree to pay a 5 figure sum for that license, and be confident that their product will sell enough volume to recoup that fee, and to produce sufficient profits to make the acquisition worth their while. |
4 | Could I make my own pokemon game without running into a copyright issue? I've always wanted to make a video game that criticises pokemon. I want to know if I could use pokemon as the characters in the game without running into copy right laws. The game itself will have nothing to do with the normal purpose of pokemon but at one point also mimics pokemon mystery dungeon a little. that point in the game would be similar to the rescuing of other pokemon and will also have some of the same characters in pokemon mystery dungeon. so, could I possably make this game? or not. If I couldn't, what would it take to have permission. If your wondering how the game criticises pokemon, it does so cause it's supposed to be a gory hard core M game. What if I was to not include any of the titles from pokemon like pikachu for example and just simply give the characters real life names as well as give minor changes in designs and abilities? Could that help avoid copyright problems? |
4 | 100 points between 0 1000 on an increasing scale Basically, it's for roleplay, I need to generate 100 points along a scale. Level 1 is the starting amount, and is at point 0 on the scale. Level 100 is the highest amount planned at this point, and it needs to be at 1,000 on the scale. My problem is generating points 2 99 between those two. I could do it cheaply and just go with one level at every 10 points. But that's not how I want it to function. Ideally, I'd like a sloping curve, so that in the early stages, levels might be only a number or two apart. Such as Level 1 0 Level 2 2 Level 3 4 But then as the level increases, the number also goes up. Level 98 960 Level 99 980 Level 100 1000 Can someone help me figure this out? |
4 | Bartle taxonomy formula Anyone knows the formula inside the Bartle Test of players taxonomy? I need to do the test, but I need the weight of each question to make something more accurate and trustworthy to the real test... Some links to the online test http matthewbarr.co.uk bartle http 4you2learn.com bartle |
4 | Have any video game designs used non uniform random numbers in interesting ways? A variety of video games use uniformly distributed numbers to decide the outcome of an event, such as a "50 chance to hit" almost always means to check if a random floating point number from 0 1 is greater than 0.5. Many games will layer a few of these uniform percentages on top of each other, for instance a D amp D hit roll is a uniformly distributed number from 1 20, except that 1 and 20 have special outcomes. To my mind it seems like things like critical hits are added by designers to try and emulate the fact that in reality hitting missing or winning losing is not actually a binary outcome. In many cases the real life amount of "damage" done by an attack would likely be closer to a gaussian bell curve distribution, which many results in the middle but the occasional very exciting outlier and smooth curve connecting them. Dice games like Settlers of Catan emulate gaussian distributions by adding together multiple independent rolls, but I feel like I've almost never seen this mechanic in video games. It seems like games like Civilization (Sid Meier talked extensively at GDC about player perception not matching the actual math used in the game) would benefit from results that matched how things work in the real world. Have any video games used a gaussian or otherwise non uniform distribution of random numbers in interesting ways? |
4 | Coming up with manageable game ideas as a hobbyist game developer I'm trying to come up with ideas for games to develop as per the advice on this question I've started jotting down and brainstorming my ideas as I get them, and it has worked relatively well I now have a growing collection of ideas that I think are relatively original. The trouble is that I'm a solo hobbyist developer so my time is limited (and I have short attention span!) I've decided to set myself a limit of 1 working week (i.e. 35 40 hours) to develop prototype my game, but all of the ideas that really spark my imagination are far too complex to be achievable in that sort of time (e.g. RTS or RPG style gameplay), and none of my simpler ideas really strike me as being that good (and whenever I get a flash of inspiration I invariably end up making things more complicated!) Am I being too picky should I just take one of my simpler ideas and have a go? |
4 | Does the protagonist's age matter in a 3rd person shooter? There have been very young characters in modern games that wield weapons including firearms before. Two good examples include Ellie from The Last of Us, and Clementine from The Walking Dead. Whilst I don't support the idea of having gun wielding children as characters, I do understand the context of use in the above two examples and the points being made. I am designing the concepts of a 3rd person action game. The protagonist is a modern male adolescent (about 13 years old) and their age is important because the game's design is centred around the idea of growth and having the protagonist learn and achieve milestones through the game's progression. Being an action game there is combat and weapons including firearms. What I would like to know is, is there particular considerations I need to take with the issue of having firearms and a very young protagonist? At the moment the gameplay progression has the protagonist starting of as completely unarmed, having to initially rely solely on hand to hand combat and other stealth and platformer based skills to progress and learn new abilities. I would like to make more weapons and eventually firearms available to the protagonist, but have their use be completely up to the player and not a necessity for game progression. Most importantly I would like to make sure that the finished game does not come across as promoting the underage use of guns. So is the protagonist age an important consideration in this type of game genre, or not? For example would I need to make sure I include a tutorial scene where the protagonist is taught how to fire a gun by an adult? |
4 | Game Map Implementation I want to know how I can create a virtual town or city (like skyrim towns or gta4 liberty city) Should I create something on paper and copy coordinates? (Building1 floor corner coordinates are these, ceiling coordinates are these, 2nd floor coordinates are these etc, and then road1 coordinates are these...) And then apply texture on these things? Start with just 1 building and extend it in time? But this seems like a ton of work. For simplicity if we assume that there are 5 buildings on a road, this is like 90 vertices. And if I decide to make a house wider, then many things will be affected and I have to find new coordinates for every house corners. How did the developers of GTA 4 do it for example? I would like to know an appropiate method to create a static virtual map where the player can move into houses and interacts with objects in it. Please note that these buildings are not cosmetic only. I should be able to place objects in houses such as tables and the player should be able to jump on it etc. Thank you, I will vote when I have the reputation. |
4 | Scaling web game to suit any screen size I've made a simple multiplayer game, and now trying to make it fit on any screen size. I've tried stretching it out to fit the browser size, but it just appears weird and distorted. I'm also trying to avoid having borders around the edges as it doesn't look particularly nice. Is there a way to solve this that is fair to all players? |
4 | Tower Defence game scoring system I am in the process of developing my first game on android mobile platform, it s a tower defence game and I am currently busy designing the scoring system. At the end of the stage when the user has defeated all the waves of enemies I want to take his score and somehow calculate a rating out of 3 Stars. What will the best way be to calculate a score? When should I increment the score during gameplay for example when an enemy dies? And how do I calculate if the score is worth 1 3 Stars at the end of the stage? Basically I want help or any ideas on how the formula should look like and how to calculate if the user scored a 1.. 2... or 3 Stars. My variables in game Every enemy has a value Example 5 The stage has a number of life s before you are defeated Example 20 Each stage starts with money that you buy your towers with Example 120 Each towers costs money Example 30 A stage can consist of 1 or more waves of enemies. Any help or ideas would be appreciated as I am new to game development . |
4 | Programming the combat sequence in a role playing game I'm trying to write a short "game" where a player goes around and fights monsters but I have no idea how to handle the combat. For example, say I have a "Warrior" and a "Troll". How do the two fight each other? I know I can do something like Conan Warrior.new() CaveTroll Troll.new() Conan.attack(CaveTroll) CaveTroll.attack(Conan) But what part of the game controls the monster? Do I just stick the above sequence in a loop until one of them dies? Or does the game "engine" need to have a part that deals specifically with combat? Or is this an aspect of the Troll's artificial intelligence that needs to take care of it's actions? Also, who what determines the actions that the monster takes? Maybe a Troll can bash, kick, bite, cast spells, drink potions, use a magical item. Does the game engine determine what action the Troll takes or is that something the Troll class manages? Sorry I can't be more specific but I need some guidance on which direction to go with this. |
4 | Calculating the flavour of a dish in a cooking game I'm currently working on a game that sees players cook dishes and are scored on their performance. To determine whether a dish is good or not, I will be looking to see if these elements are balanced Salt Fat Acid A dish is made up of multiple ingredients and each ingredient will have its own salt, fat and acid levels. Adding too much or too little of an element (e.g. over salting) results in a weaker score for the player. There are also a few other factors that affect the salt, fat and acid balance The number of ingredients (adding more ingredients should reduce saltiness, fattiness and acidity) Acid can reduce the saltiness and fattiness of a dish. Salt can reduce the acidity of a dish. This idea comes from Samin Nosrat's book Salt, Fat, Acid Heat. Below is an image from her book where she breaks down 4 popular salads and shows how each of the ingredients affects each element. If the player was to recreate quot The Caesar quot salad, they should get a perfect score for balancing all those ingredients but if they created a salad with just bacon and anchovies it should be considered too salty. Texture is another element that the player needs to balance but this won't need to be calculated in the same way as the other elements. My plan here is to check if the player is making a salad it should have some crunch to it, whereas if they are making a roast the meat should be tender. Given a set of ingredients, I would like to calculate whether the dish is balanced or not. The game will probably have 100s of ingredients and I would like some advice on how to best calculate these elements, score the player and balance the many ingredient combinations a player can come up with. |
4 | android game development dilemma I'm doing a android game project that has a character that can do basic movements like step, turn left, turn right, raise left arm etc. When combining those moves together, the character can do some complicated movements like a dance routine or so. I'm banging my head to figure out what to do about the graphics. I can do a 3D model with animation then export it to the format of Bones library that displays the character movements. Like shows in this video. I wish to have different characters with different characteristics like height, clothes colour and such. However, that means I have to stock pile more 3D models that have different settings. Alternatively, I can attempt to code from scratch that have bones system, meshes, skinning, animation. More control and flexibility but the appearance won't be as good as 3D model and it takes alot more afford (as it appears to me). The character will be in 2D if I go down this route. I will use Android OpenGL library for this. I thought of 2D but then I realize that it's pretty similar to 3D option. My question is that what can I do here? What else I can do to make the best of this situation? Edit thanks for the comments and answer but I have sorted my "dilemma" now. Im using jpct ae and bones library for my project. The downside is that I need to use a 3D model to make use of those library. They are actually very good and suitable for my need when working with a 3D model. Cheers. |
4 | Term for coordinating design elements to produce larger possibility spaces? The concept is when content elements work together in such a way to produce more possibilities, playable content, or engagement than the relative amount of added content. Mathematically A content gives you x units of gameplay B content gives you y units of gameplay (units of gameplay are however you'd like to measure them, hours of play, total items, actions discussion branches, etc.) A x B y A B x y ? So that when the game includes both A B The gameplay unit increase could be x y (x y) c x y This concept of expressing it mathematically leads me to want to call this Content Multiplication. But I haven't been able to find much on a specific term for this (most of my attempts have lead me to math games). Example In a game like Minecraft, there's a mechanics and dynamics that define crafting. By themselves they produce a set of craftable items. Once a player crafts them there's less or no desire need to craft them again. Then a relatively small mechanic is added that causes loss, perhaps on death or through durability. The impact on player motivation and time played is much larger. Forcing players to either recraft items, or to craft extras preemptively. No new items have to be added to the crafting system, and having players lose items isn't a big change (not a lot of work). Specifically if we look at just these two mechanics, and the expected impact they have together. Perhaps we're talking about Minecraft 0.1, and only crafting exists, and a decision needs to be made on what next feature to add, that provides us with the most benefit in gameplay content for development effort. Conclusion Is there a term to describe the intentional design of coordinated mechanics and system to produce larger sets of content with minimal effort? Edit Emergence Emergence typically refers to unforeseen and unintended results rising from a rise in complexity. Emergent results are frequently hard to quantify, or to ascribe cause to specific elements. What I'm looking for is an explicit, deliberate, and predictable outcome from the addition of a single element to an existing system. Contrasting Example An example of emergence can be found in the original Deus Ex. Being able to place mines on walls and jump off of them. This effect was (likely) unintended, caused by the interaction of complex systems, and in cases where it could be used to skip content, actually reduced the amount of gameplay. Emergent Gameplay While designing for emergence can be intended, the outcome is less certain or planned. |
4 | Game timings and formats There are more or less standardized TV show movie formats and recommended timings 1. By the early 1960s, television companies commonly presented half hour long "comedy" series, or one hour long "dramas." Half hour series were mostly restricted to situation comedy or family comedy, and were usually aired with either a live or artificial laugh track. One hour dramas included genre series such as police and detective series, westerns, science fiction, and, later, serialized prime time soap operas. Programs today still overwhelmingly conform to these half hour and one hour guidelines. Source 2. In the United States, most medical dramas are one hour long. Source 3. Traditionally serials were broadcast as fifteen minute installments each weekday in daytime slots. In 1956 As the World Turns debuted as the first half hour soap opera. All soap operas broadcast half hour episodes by the end of the 1960s. With increased popularity in the 1970s most soap operas expanded to an hour (Another World even expanded to ninety minutes for a short time). More than half of the serials had expanded to one hour episodes by 1980. As of 2010, six of the seven US serials air one hour episodes each weekday. Source Interesting. Are there any standards of timing in game development? Well, 5 20 minutes casual games, of course. There is even a "5 minutes game" site. And 1 hour gamer site. Are there 1 week, 1 year, 1 eternity game formats? Chess and Go deep games that you can study all your life but they are played in hour or several days (pro games). Addictive long term online role playing games (without win condition) are played in monthes and, possibly, years. Replayability is an important factor to consider. It's good when game design document contains a line "A game is designed for solving in X hours". How can it be measured before there is any prototype or demo? When you know your game format, you know your audience (and vice versa). It is practical question. Are there psychological researches about dynamic of gaming interest and involvement? And is there a correlation between game format and game genre? |
4 | Should developers make their games easier with new versions? It seems that the game Angry Birds is becoming gradually easier with new versions. Maybe so people get the illusion of progress and satisfaction of breaking new records? I would like to know if gradual small modifications of games to enhance the sense of improvement and learning by users is known common standard practice in game developing. (I don't mean to say that there is anything wrong with such a practice.) |
4 | How to control the list of items on the screen? I am an experienced app developer (c ) however I am just looking at starting 2d game development. I have read some articles and understand the concept of the gaming loop controlling the application flow. However there seems few articles explaining general concepts for an existing developer. From these I assuming that each on screen item becomes it's own object and handles it's own location, drawing, collision detection etc. (though correct me if I am wrong) My question is how to control the list of items on the screen? Are these stored in a simple collection and then removed as they fall out of play and is this collection held by the game engine or individual components? An example would be bullets from a gun? |
4 | Is flowchart correct way to visualize gameplay? I made the following flowchart in draw.io. it's just a simple arcade shooter. cardboard zombie pops up, bang, or not. I don't have any official education in game production. So, are there other chart styles, or UML diagrams that would be better suited for drafting this type of simple game play? |
4 | Can i put the main Love2D functions inside a table? Instead of having a file with load, update,and draw can i say have a table called player, then put love.update and love.draw in that table to handle the drawing and updating of that particular player? |
4 | Prototyping a puzzle game for solvability of levels I am in the prototyping phase of making a puzzle game for iOS. The basic premise of what the player has to do is get from point A to point B by navigating through a maze like setup, while moving blocks out of the way, and avoiding enemies. This is my first approach to a game like this so I am wondering how others have made sure that the levels they create are solvable. For example take the classic Unblock game where you have to move the red block off the game board by moving the other non red block pieces out of the way. It gets difficult because they are all in a tight space with not much movement to be had. Has does the creator know that the arrangement of puzzle pieces are placed in a way that makes it possible to solve the puzzle? Do they start with paper prototypes and work from a solvable end state backwards to make the initial game board layouts? |
4 | Authoritative Server Movement and Collision I am attempting to write a proof of concept in preparation to do my first networked game. I have decided to do an authoritative server with client side prediction. I am trying to implement my architecture like this diagram from an excellent article on the subject In the article, the data that is synchronized is the player's position. This works great for turn based games, but what about real time games? In my game, each entity has a position and a velocity vector. It is the server's job to detect collisions. I have attempted to send the server velocity changes, but I am having an issue where the server's position and the client's position begins to diverge because their clocks are not perfectly synchronized. So my question is, is it standard practice to send positions as the synchronized state between a client and server instead of a velocity vector? Will changing to synchronizing positions instead of velocities open my game up to cheating? Is there a better way to synchronize the players' states with the server? Also, if I use positions, doesn't that mean that the other players are going to be seen in a past state? Will that mean that the server might send a player killed message before the collision is visible to the player in the present? |
4 | What makes a computer opponent feel alive? Are there any recommended blogs or whitepapers that talk about making the AI in an RPG game feel more real? (Specifically in turn based combat.) I know something must be out there, but I am only finding papers that talk about algorithms behind the AI. I am looking more along the lines of "this is what makes a computer opponent feel alive". Taking risks, going easy, retreating, etc.... So many awesome answers, and I wish I could accept several of them. Thanks everyone! |
4 | Puzzle design in Adventure games Creating interesting, original, logical, thoughtful puzzles is an art. What techniques and methods do you use to create good puzzles? Do you write storyline before designing puzzles or combine these 2 processes? |
4 | Qix diagonally adjacent movement I'm implementing a Qix clone game and I do not have any problems with implementation but rather with possible scenario. Is this a valid scenario for this game and if yes how exactly should gameplay go in this case? Black Filled, Red Current Player's Path, Blue Player If this is a possible scenario, then after completing the path player will end up with two diagonally adjacent rectangles. After that player can start moving from the bottom of the top rectangle to the right. In this case it should be immediately considered as a complete path and fill 1x1 square or player can create a path adjacent to the top of the bottom rectangle? |
4 | how to devise a scoring algorithm based on elapsed time and number of moves I want to devise an score algo for my game. I want to award high scores to players who achieve the goal in minimum time and least number of moves. I did this but its not going correctly var score ((finishSeconds moveCount).toFixed(2) 100).toFixed(0) |
4 | How to implement "identify item" feature in RPG In many games there is an approach that you can't use item that hasn't been identified. And usualy you can't identify it by just using it. While this approach simplifies a lot of things it just doesn't feel right to me. It doesn't make sense that I can't equip an armor or sword because I don't know if it has any magical features. I was thinking about some kind of "identification by use" system but I can't figure out a natural way to do it. What if I drink a potion that boosts my "Speech" skill for a period of time? Should my character instantaneously know that its skill have increased? Should it know the exact value? Or should I increase the skill behind the scenes but leave the displayed value intact and just give some subtle hint ("You suddenly (...)")? What about weapons and armors? It wouldn't make sense to know anything about it just by equipping it. One approach would be that attacking a target could update weapon's min and max damage basing on damage dealt but then it greatly depends on target's defense and resistances (I'm not sure if that's a bad thing though). Of course there are conventional ways like identification scrolls and I do have them but I was hoping for some alternative (not a replacement though, you probably can't know everything about every object only by using it). Has anyone ever thought about it and can share some insight? |
4 | Armor VS Weapon types I have these armor types LEATHER MAIL PLATE which are, basically, light, medium and heavy, and these weapon types BLADE PIERCE BLUNT I need a sensible 3x3 table which tells what armor type is succeptible to (and, possibly, good against, though it's not necessary) which damage type. In other words, how good the mail armour actually is against pikes arrows, etc... Any ideas? P.S. Wikipedia search and personal gameplay experience didn't help me too much, as both are mostly concluding the heavier, the better. |
4 | Tweaking incentives for lottery with a twist I have been developing a game which is a lottery where your chance of winning is proportional to the square of your bet. To prevent people from overbetting the pot (optimal strategy shouldn't just be to bet as much as possible, I think), and to make subsequent jackpots appealing, I've made it so the winner gets (current round bets past round leftovers) 2. 48 of the jackpot goes forward, and 2 of the jackpot goes to the house. This is generally working, but when there are not many people on the site, one person will sit there and drain the pot every round with the minimum bet. Though I think the concept is pretty cool, I have the feeling that some small tweaks could make a big difference. Any ideas how to get the pot to grow as big as possible? Apologies if this is not the right place to post. |
4 | Is there a site where people discuss game concepts and questions in general? I like making game concepts for fun, as a hobby. I don't think that all my game concepts are amazingly awesome and have to be created and would revolutionize the industry. I just want some people to talk to that have the same hobbies as I do. To be able to discuss ideas and point out the pros and cons. |
4 | How do I summarize a game idea into a short document? I have a lot of game ideas, but never the time to work on them. I don't want to lose these ideas, so I want to 'store' them somewhere to come back to in the future. Sometimes an idea isn't really that good, and coming back would help me decide whether a game idea is worth pursuing. I plan to keep these in some kind of catalog form. I would like to be able to capture the 'feel' of a game in as few words as possible. Even if looking back at the design a few years later, the feel and atmosphere of the game should be recoverable very quickly. This isn't really a full design document, but something like a 'one page' summary. |
4 | Is a Stamina Bar (ala Dark Souls) a good idea for a casual player target group? We all know the "Stamina Bar". For those who dont Its a "Bar" (usually right below your life bar) which prevents spamming the attacks as much as you want. Attacking will also reduce your stamina and you need a certain amount of stamina to use Attacks. Usually blocking , rolling and other things also require and reduce your stamina. Its a great way to balance the a real time action battle system. You can upgrade your stamina which is cool too because gives you a feeling of progress and add a little bit of fun there. Anyway The Question here is Is this "okay" for "Casuals"? I have a game which is open world ish and you can walk around and fight enemies and fight bosses too. But the game seems "too easy" now. You can basically just spam your attack button and every enemy is easy. Even the bosses. A way the fix this is the stamina bar. But wouldnt that overwhelm the casual players ? |
4 | How to deal with Character body parts from Design to Cocos2d I'm trying to figure out the pattern the game developers use together with game designers See the picture below with the independent parts Questions 1) Should I create different image parts from different body parts or keep frame by frame animaton? (I know both can be used, but I'm trying to figure what is commonly used in the industry) 2) If I'm going to generate different image parts from different body parts (which is I thing is more logical) how would I export that to Cocos2d (Vector or Bitmap)? |
4 | Anyone know of other unique playable archetypes? Well I like to play games that give me a wide breath of options. For most part I see games implementing certain archetypes like the usual RPG trinity (tank, DPS and healer). So far the most archetypes I've seen are in fighting, card and strategy games. Fighting games archetypes I've seen are Rush down (GG Accent Core Venom, Kof 2k1 heidern) Grappler (SF Zangief) Zoning (SF Dhalsim, KoF Billy Kane) Ranged(GG Dizzy) Trapper (GG testament) Well rounded (SF Ryu) Status effects (GG Baiken) Chance (GG Faust) Counter (GG Baiken) Time (Arcana Heart Anutpada, Psychic force Wong, Jojo's Bizarre adventure Dio) Positions control (Arcana Heart Dieu Mort). Card Games Burn, milling, OTK, counter, graveyard based, trapping (Yu gi oh), remove from play, restrict. Strategy games League of legends have a number of them so I'll just link to their wiki. Note not all are archetypes though, add to that builders as well. So any other that you guys might know that is worth mentioning? |
4 | Simultaneous game states I think I understand the basic idea behind a Finite State Machine based game loop. But I'm trying to write a little game in which the same object can simultaneously be in multiple, independent states. At least that's what I want to do. To give you an idea Robot may be in FleeState and FireLaserState at the same time, besides in each of them individually at any time. Would something like this be possible using the FSM pattern? Or ought I to look elsewhere? After all, does the whole idea make sense? Pasted from my comment below A little clarification of why I'd like states to be kept separate I want the player to have the ability to program simple state changes before a game... say "if (health is way too low) flee". But then I want multiple such rules to be active simultaneously in order to keep the game interesting, and cannot know beforehand which other states may be active. |
4 | Do players like holiday events? I remember back when I played runescape, they always had these really interactive holiday events. And players would be squirming all around trying to find where it was. After you would complete it (it was like a mini quest), you would be rewarded with some kind of item. I thought it was really cool, but if you missed the event you'd be pooped out. And now days, I play simpler games, such as parallel kingdom, and they just have boring items that you can buy for holidays. Is it worth making holiday events, or could you get by without them? |
4 | How can I handle the difficulty level between co op and single player? I'm working on an action adventure game, and I was considering adding a co op option. What I'm trying to decide is if when another player joins the game, if the game should get harder. On the one hand, I don't want the game to just get easier. On the other hand, I don't want to break continuity by making enemies suddenly stronger, eg I was able to take this down it two hits before, why does it take four all of the sudden. I do not want there to be an "AI co op" that comes with you in single player, I think that would make the game worse since it would detract from player agency. How can I handle this? How can I keep the game challenging when a second player joins in? |
4 | How can I know how big my game "world" should be? here is the world map (randomly generated) for a game I'm making The green rectangle corresponds to the size of one screen. Each pixel represents 3x3 tiles in my game, this makes the whole map be roughly 7,9 km (2,3 x 2,3). How can I assess if the game is too big or too small? |
4 | Factors to consider when building an algorithm for gun recoil What would be a good algorithm for calculating the recoil of a shooting guns cross hairs? What I've got now, is something like this Define min max recoil based on weapon size Generate random number of "delta" movement Apply random value to X, Y, or both of cross hairs (only "up" on the Y axis) Multiply new delta based on time from the previous shot (more recoil for full auto) What I'm worried about is that this feels rather predicable, what other factors should one take into account when building recoil? While I'd like it to be somewhat predictable, I'd also like to keep players on their toes. I'm thinking about increasing the min max recoil values by a large amount (relatively) and adding a weighting, so large recoils will be more rare it seems like a lot of effort to go into something I felt would be simple. Maybe this is just something that needs to be fine tuned with additional playtesting, and more playtesters? I think that it's important to note, that the recoil will be a large part of the game, and is a key factor in the game being fun challenging or not. |
4 | How can I discourage camping while still supporting a "sniper" style of play? I am trying to add features into a third person shooter that suit a sniper style of play, in addition to the current rush deathmatch style it was designed for. The current gameplay is similar in style to Gears of War and Battlefield, perhaps similar to Call of Duty in terms of combat ranges but a little slower paced. The levels are similar in size to large COD maps, or medium Battlefield maps. Two things which I was planning to add includes some long sight lines and also some "sniper nests". I am concerned though because these two features can open the door to a lot of camping. Sniping and camping are not the same things in my opinion, but it can be easy for campers to abuse such features for easy gain, when they were intended to promote tactical sniper use. That said, I don't believe in blaming the flaws of a game on a player's choice of play style. Sniper Uses long range rifles, may stay in a specific spot that is tactically advantageous at the time, but knows how to move to other locations good for sniping. Provides spotting and suppression for more offensive rush style team members. Camper May use any weapon, always stays in the one spot and waits for players to pass by, leading to easy low risk kills. Follows the same strategy regardless of what is happening in the game match. Is more focussed on own performance as opposed to supporting team members. So, I am trying to think of some ways in which to try to discourage camping while still allowing legitimate sniper play and preserving the original rush gameplay. |
5 | Procedural generation of semi correct planetary systems So there are lots of resources you can find via Google or using the search here on how to procedural generate a whole galaxy. But I couldn't find any good resource on how to generate planetary systems that follow these criteria The systems don't have to be accurate simulations of orbits but should be close to plausible orbits. I don't care about any simulation that cares about how the system might look in 200k years, the orbits could be rock solid. The main problem I'm facing is how to randomly generate a system that could be seen as plausible. This becomes especially interesting when you have a system with a binary star. Just randomly creating orbits won't make up a plausible system, you'll end up with obviously non working orbits. Yes, I'm aware of the N body problem ) but this doesn't help me, at least I think so, to solve the problem of generating a plausible system procedural? I think you could just randomly spawn planets on their orbit and give them a mass and then use the N body mathematics to calculate if they're more or less valid, if not start over and randomly generate new orbits until you get something that matches, but this would be very inefficient. |
5 | Transitioning Heightmaps Using Voronoi Cells I'm partitioning a procedurally generated world into regions using voronoi noise. The goal is to create individual regions in a world each unique from each other. Each region has a distinct set of properties, one of which is having a procedurally generated heightmap. The issue I am having is transitioning from one region's heightmap to another. Each region's heightmap is composed of multiple 'layers' of simplex fractal noise. Because the regions are using voronoi cells, and each region has its own distinct heightmap, they do not smoothly transition into each other. Any guidance on how to solve this issue would be greatly appreciated! |
5 | How can I create hemisphere worlds (floating islands?) with 3d (or 2d)? Noise (Perlin OpenSimplex) I've been experimenting with noise for a while and I've gotten some terrain up It looks like this What I'd like instead is to have planets like this (currently mine is in a cube shape) My generation code actually skews the values so the top is not solid and the bottom is. I tried to reverse this but I got a giant mess, with the top being completely solid up to the worldheight and the bottom having holes caved into it. Here is my generation code float value noise.GetPerlinFractal(worldLoc.x, worldLoc.y, worldLoc.z) if (y lt waterHeight) for (int i y i lt waterHeight i ) chunk.addBlock(x, i 1, z, BlocksConfig.getInstance().getBlockRegistry().get(BlockIds.WATER)) if (value ((y 128) 0.01) gt 0) if ((y gt waterHeight amp amp y lt waterHeight 2)) chunk.addBlock(x, y, z, BlocksConfig.getInstance().getBlockRegistry().get(BlockIds.SAND)) else chunk.addBlock(x, y, z, BlocksConfig.getInstance().getBlockRegistry().get(BlockIds.GRASS)) if (y lt 105) if ((Math.pow(noise2.GetNoise(worldLoc.x, worldLoc.y, worldLoc.z), 2) Math.pow(noise3.GetNoise(worldLoc.x, worldLoc.y, worldLoc.z), 2)) lt 0.02) if (!(chunk.getBlock(x, y 1, z) (BlocksConfig.getInstance().getBlockRegistry().get(BlockIds.WATER)))) chunk.addBlock(x, y, z, null) This is done for every block in every chunk. I'm a bit confused here and saw other ancient posts about this. However, I don't exactly understand and was wondering if someone could explain such for me. Thanks so much in advance! |
5 | Linear Gradient with angle forumla EDIT Ok so the question here is how to you generate a linear gradient along a vector. Here is the function i'm looking for function CreateGradient(x,y, x1,y1,x2,y2) x and y are the point in our image we are looking to create the color for in grayscale x1,y1,x2,y2 is the vector in which the linear gradient should run Can be in any language What I have so far (that doesn't work) var width 2.0 var offset 0 var convX ((x RES) width width 2) offset var convY ((y RES) width width 2) offset var angle Math.atan(y1 y2, x1 x2) var rx Math.cos(angle) var ry Math.sin(angle) var here convX rx convY ry var start x1 rx y1 ry var end x2 rx y2 ry var lerpValue (start here) (start end) var val lerp(0,255,clamp(lerpValue,0.0,1.0)) RES is the total resolution of the picture. val in the value (0 255) which represents the R G and B values of the pixel Final Edit I have it now thanks code for the future var x1 0 var y1 0 var x2 255 var y2 255 var dx x2 x1 var dy y2 y1 var rx x x1 var ry y y1 var t ((rx dx) (ry dy)) ((dx dx) (dy dy)) return lerp(0,255,t) |
5 | How is a 3d perlin noise function used to generate terrain? I can wrap my head around using a 2d perlin noise function to generate the height value but I don't understand why a 3d perlin noise function would be used. In Notch's blog, http notch.tumblr.com post 3746989361 terrain generation part 1, he mentioned using a 3d perlin noise function for the terrain generation on Minecraft. Does anyone know how that would be done and why it would be useful? If you are passing x,y, and z values doesn't that imply you already have the height? |
5 | how to generate road in racing game I'm making a racing game in python and I kind of wrote myself into a corner. This for loop for i in objects if i.name "road" if i.y 0 road Road(road x, 20,road width,20) objects.append(road) is how I generate new road tiles as the old ones move down the screen. When a block spawns 20 pixels offscreen, it falls down until its top left corner hits 0 and then a new block spawns above it. if you run this code https github.com hailfire006 economy game blob master racing 20game you can see that it works great, right up until the player accelerates by pressing up or "w", at which point the road stops spawning. What I think is happening is that the road is skipping the 0 mark and that's why no new road is spawning, but increasing the acceleration in the code doesn't seem to mess it up, it's only when it's changed dynamically in game. Can soneone explain what's happening here because nothing I try is working and I've been stuck on this for days... |
5 | How do Minecraft know where village's buildings are if the village is not generated yet? I'm trying to understand how chunk generation works in a deep level and all the information I found does not explain how the villages are generated properly without visual glitches during generation. I mean, if you are in an area where you should see some buildings from a village, how does Minecraft know that they must be rendered? Minecraft generates villages from a main "structure" that probably it is not generated yet. This video explains the village's generation properly. So with that in main what should happen is that you could see builds appear from time to time when the "village center" of a village is generated in a new generated chunk. Here you have a visual representation of the circumstances I'm describing. The buildings inside the loaded area shouldn't be shown if the village is not generated yet The only explanation I can think about is that Minecraft generates way more chunks than the ones that are visually loaded to avoid this problem. If this what happens, what is the generation area compared to the visual loaded area? |
5 | Working with 3D Noise I am using a simplex 2D noise to generate my worlds so far. This however was never the plan and has the downside that I basically can only generate a heightmap. Instead I want to aim for floating islands scattered in the sky, but I fail to see how I can utilize 3D noise properly for this. Based on a simplex 3D noise function I am currently generating noise like this float sc perlin noise3 ex(const sc perlin t perlin, float x, float y, float z, int octaves, float persistence, float base frequency, float base amp, float lacunarity) int i float freq base frequency float amp base amp float max 1.0f float total 1.0f for (i 0 i lt octaves i ) total sc perlin noise3(perlin, x freq, y freq, z freq) amp max amp freq lacunarity amp persistence return total max Problems start there first of all I think I got octaves wrong, at least the outcome is very unpredictable. Persistence would be a value smaller 1 that removes the effect of the higher octaves. Secondly however I have a general problem understanding how 3D noise works. From my understanding a value lt 1 could mean air, a value 1 would be solid and 0 is the thin line between them (the surface). First of all however I get a lot more values below zero than above zero, so I had to flip those two around. That seems odd, do I have the math wrong? The actual problem however is that I cannot locate "islands" properly. Say I have a container of 256 3 in size and I want to have one large island in there with maybe up to three smaller islands in there I have to ensure that no island is cut off at the edges that I only get two even sized islands in my block I have some better control of the actual appearance of my island. For instance it would be nice if it had an actual flat ish surface where I can put a heighmap on top of that for mountains etc. Based on that I have the feeling I am on the completely wrong track here. Can anyone give me some pointers on where to head now? Generally speaking I would like to have something that looks like this floating island |
5 | How can you procedurally place objects in a non gridded game? This is a follow up question to this question. I mistakenly worded the question, but got a good answer before I could correct myself, so I didn't want to delete it. Sorry! Now that I know that it is possible, I'd like to implement procedural world generation, but I don't want it to look gridded or blocky, where everything is obviously placed on an integer grid. I know that you can do this in gridded worlds by inputting a square's x and y into a noise function, or similar, but how can I generate a more natural looking object placement using procedural methods? This is in the context of an adventure game, if it matters. |
5 | How to do Marching Cubes Meshing in unity 3D I'm getting very peculiar results from my marching cubes based surface generator within unity and figured this must be a pretty common problem that has been solved already, so I thought I would extract this out as a tiny example project that only includes the broken generation code ... http ccoder.co.uk files mc.zip ... if you download and run the example you should get something like this ... ... so my question is How can I resolve the logic in the marching cubes meshing code to generate a complete mesh with consistent uv mappings all the way around? If someone can solve this I will edit the sample in this question with the solution so others can download this solution in the future. UPDATE So I figured out what was causing the vertex generation issue, it looks like paul burkes lookup tables however result in some cases returning the vertex data in different orders to others which appears to be the cause of this uv issue (see image, updated) I have updated the sample project too, anyone fancy debugging the marching cubes tri table?, something tells me this will be a long winded task! |
5 | How to form a sphere from Voxels I want to form a Sphere given radius from blocks given size. And can't figure out the code algorithm. Any help appreciated. Edit I dont wan't the Sphere to be filled, just the outer shell Edit I tried this function ds(r) for tx r, r do for ty r, r do for tz r, r do if math.sqrt(math.pow(tx, 2) math.pow(ty, 2) math.pow(tz, 2)) lt r 2 then Terrain FillBlock(Vector3.new(tx, ty, tz), Vector3.new(1,1,1), material) end end end end end But it's very much iterations and so slow and odes the filling that is extra calls. |
5 | Create vertices indices for cylinder with triangle strips I'm trying to create vertex and index buffer for a cylinder (in OpenGL, but it shouldn't matter). I think my vertex buffer is fine (I checked drawing with GL POINTS). Here's the code that builds it int sides 10, slices 40 float radius 3.5 10.0 numVertices sides slices Vertices malloc(sizeof(Vertex) numVertices) int angleincs 2 M PI sides int cs angleincs 2 M PI slices float zval float zstep height (float)sides float i for(int m 0 m lt slices m ) int index (m sides) for (int n 0 n lt sides n ) Vertices index n .Position.x cosf(i) Vertices index n .Position.y sinf(i) Vertices index n .Position.z zval i angleincs zval zstep I'm stuck at the index buffer generation. Any help on how to build it? I tried to adapt some code from a torus generator, and I get something that apparently resembles a cylinder but it's a bit weird and has a few extra weird triangles. numIndices (2 (sides 1) slices slices) Indices malloc(sizeof(GLushort) numIndices) int n 0 for (int i 0 i lt slices i ) for (int j 0 j lt sides j ) Indices n i sides j Indices n ((i 1) slices) sides j Indices n i sides Indices n ((i 1) slices) sides Indices n ((i 1) slices) sides Thanks in advance. |
5 | How can bays and straits be determined in a procedurally generated map? I've got a procedurally generated map using Voronoi cells, with a defined sea level and a believable height map. So far, I've been successful in labelling certain geographic features land, ocean, lakes, rivers, estuaries, confluences, mountains, and biomes. Biomes include tundra, boreal forest, grassland, and temperate forest. There are also a couple other biomes there but for my purposes they aren't important right now. I'd like to label bays, and straits next, but I'm at a loss on how to do this properly. A bay is a recessed, coastal body of water that directly connects to the ocean. A strait is a naturally formed, narrow waterway that connects two parts of the ocean. Basically, where two pieces of land almost touch and there's ocean on both sides. Also called a "channel". For determining features, I can loop through any feature by type like this for each (var feature Object in geography.getFeaturesByType(Geography.LAND)) loop through lands for each (var cell Cell in feature.cells) loop through cells for each (var neighbor Cell in cell.neighbors) loop through a cell's neighbors trace(neighbor.hasFeatureType(Geography.LAND)) |
5 | Procedual terrain generation and biomes predetermined variation So I already have some (currently 2D possibly 3D later) simplex noise generation going, and with some experimenting I can make a map for plains, hills, mountains, etc The problem now is I want to combine those together to create a larger more interesting map. For each "pixel" in the height map I provide generate a biome type which has a bunch of parameters to define how the height value is calculated etc. i.e. I want to be able to say mountains here, river through there, flood plains next to it, etc and have them blend together. The problem is this leaves nasty borders since between them even the simplex input values change suddenly (due to the x z scaling being different, perhaps not the best way?). I considered just doing like a post process to smooth out the height values along the borders, but this would still leave often steep (and uninteresting near constant gradient) slopes since I could have a valley one side and a mountain peek the other side. I am sure there must be a better fairly standard way to do this, but have not found much searching around, at least for this sort of noise function (midpoint displacement can be seeded with initial values at a low resolution, but doesn't seem viable if not generating the entire map at once) double getHeight(int x, int z, Biome biome) double nx x double nz z nx biome.xzNoiseScale() e.g. 1 64 ny biome.xzNoiseScale() double noise fbm(nx, nz, biome.noiseOctaves(), biome.noiseLacunarity(), biome.noiseGain()) return biome.baseHeight() noise biome.heightVariation() double fbm(double x, double z, int octaves, double lacunarity, double gain) double amp 1 double freq 1 double sum 0 for (int i 0 i lt octaves i) sum amp noise(x freq, y freq) amp gain freq lacunarity return sum |
5 | Procedural generation of heightmap for non rectangular surface I'm working on procedural generation of terrain for a continent, meaning I need a wide range of hills, mountains and valleys generated around the continent. For mountains I've adopted Amit's algorithm for island generation, which produces quite good looking mountain with very clear ridges, slopes and everything else mountain tend to have. Now my problems is with some smoother hilly terrain. Due to a hexagonic nature of my continent, the mesh is subdivided into triangles. Also due to needing multiple mountains hills valleys I also split my continent into sectors, which are then stitched together easily due to the fact the edges of the sectors always have zero elevation. So the constraints are the following The surface is hexagonal, this actually is less of a problem, since I can still generate elevation for "square" grid and use bilinear interpolation on "real" hexagon verts. The surface is not a square, this I have absolutely no idea how to deal with. Now most of the terrain generating algorithms always generate the terrain on a square surface, midpoint displacement, noise, you name it. Also they don't generate zero values on the edges, which is a strict requirement for me. Now I would really like to adopt the double simplex noise approach, but once again, I need a way to force it to always generate zeroes outside of the bounds of my polygonal sector (which obviously varies), and smooth values inside the bounds, which would form nice hilly terrain. Question is... is it even possible, or should I be looking for a diferent approach? |
5 | Procedural Turn Based Puzzle Generation? Alright, we have a large set of possible moves (what the player is allowed to do). We also have a well defined state of success that defines the desired goal. We want to generate a configuration where for the purpose of this question, only 1 set of moves leads to a victory within k steps. We also have a solver that can find all possible solutions for a given configuration problem. For example let's take Chess, how would you place a set of chess pieces on a board such that only a specific set of moves by White will result in Check Mate? |
5 | How to create polygons from tilemap areas? I'm currently working on a project which needs simple AI's to walk around using pathfinding. I'm trying to find a way to generate a polygon based on the connected tiles (explained below), an i'm wondering how to do this. I know about the flood fill algorithm, but have never used it before. This is what a map (could) look like (maps are created by the players) Basically, i wan't the yellow outline as one polygon (vector2 array) and the red outline area as another polygon (vector2 array) |
5 | Calculating distance in procedurally generated mesh LOD system I'm creating a procedurally generated planet mesh based on quadtree splitting to support LOD system. I cannot find any relevant info how can I calculate distance between the camera and LOD chunks. I have a surface view in my game where the camera is near at the planet surface and can move around the planet, it has also some zoom levels (elevation of the camera) but camera always looks in the direction to the surface like in strategy games. A Should I use simple distance calculation between the camera and the center of the chunk mesh or edge vertices of the mesh? B Is it better when I use Great circle distance? C How should I modify the calculation when camera's elevation can be changed? D How can I determine the distance limits for each LOD level? Does it depend on the project or does it have some basics? Update 1 Here is a sample when I use simple distance calculation between the center vertex of the meshes and the camera object the camera is right above the point A point A is the center of the level 0 mesh (it is not visible because it is already divided) when the camera reaches the distance limit of B (which is a level 1 mesh and it is already divided in the sample) then it will be divided into four meshes where the centers are C, D, E, F at this time the mesh where the center point is F will be also divided because the distance of the previously generated F point is under the current LOD level minimum distance So the base problem this after dividing a mesh the new submeshes can be also divided because the distance is under the current LOD level minimum distance. And I think it does not work like a normal LOD system because there is a level 1 neighbour next to level 3 mesh. Update 2 I tried some approaches to get the right distance calculation minimum distance between the corner edges (4) and the camera minimum distance between the edge center vertices (4) and the camera minimum distance between the corner and edge center vertices (8) and the camera Important thing I use great circle distance calculation. I got wrong results using these until I created a new algorithm to define transition distance limits. Maybe it is not a very well algorithm but currently this is the most acceptable result. Here is the algorithm Note ignore the heightmap (noise) during the calculation, only a simple sphere with radius R is used calculate the width of each meshes (arc length) decrease the distance limit in each LOD level float meshSphericalWidth 2 Mathf.PI shapeGenerator.Radius (90 (float)(CurrentLevelOfDetail 1) 360f) float currentTransitionLimit meshSphericalWidth Mathf.Pow(0.90f, CurrentLevelOfDetail 1) After this distance calculation change I didn't notice any significant difference when I use the corner or the edge vertices to get the minimum distance. And I got this. Green is LOD1, yellow is LOD2 and red is LOD3. It seems a good progress but we can see sometimes between two chunks the LOD level difference is 2. Can I fix it with another distance calculation adjustments or is it a different story? I want to solve the cracks between meshes. |
5 | Using QuadTree for Procedural Generation so I've been trying to start a new project that focuses on procedural room generation similar to what is seen in Binding of Isaac. I plan to have the code use a QuadTree to help determine where rooms should be placed. Each node in the quad tree represents any of the possible 4 directions the next room can be placed. The problem is this. I'm not sure where to start when trying to implement the QTree and haven't found good resources on the topic. Most implementations of QuadTrees in a procedural generation context use them for partitioning spaces and placing rooms within the partitioned spaces. Not sure if that's what I want to achieve. I'm also unsure of weather I should be going in this direction or if there's a more optimal solution? |
5 | What does the "random element" do in Cellular Automata I'm reading this post on TutsPlus regarding procedural level generation using cellular automata. My question arises in this code snippet float chanceToStartAlive 0.45f public boolean initialiseMap(boolean map) for(int x 0 x lt width x ) for(int y 0 y lt height y ) if(random() lt chanceToStartAlive) map x y true return map In the first line, the author declares a float that represents 45 . This makes sense. However, the role of this is unclear to me. In this line if(random() lt chanceToStartAlive) A random number is being generated, and being tested if it's less than 0.45f. Since it is an inequality, this expression can either return true or false correct? How exactly is this percentage affecting this loop? Thank you! |
5 | How does one generate mountains out of a Fourier transform? I am watching this IGN video of No Man's Sky in which the founder programmer of this game talks about how different is his game from other games. Here he talks about how mathematical equations instead of art is used to render graphic of planets and animals and even their behavior. Then he says that instead of seeing mountains he sees only equation like Fourier transform. I have no knowledge about game development and its intricacies, but I'm curious how one might use a Fourier transform or similar mathematical operation to generate terrain without art? |
5 | How are voxel terrain engines made? A few days ago I found something called voxel terrains and I think that they're pretty cool. But I don't know anything generating them. Do you model it in your modeling software or use something like a heightmap? I read on wikipedia that voxels are like 3d pixels or volumetric pixels. After I make the voxel terrain, how can I take these voxels and make them destroyable diggable? I will pick the best answer based on code and algorithms. preferably based in C explanations. I am a beginner with algorithms but I'm very familiar with object oriented programming step by step demonstrations. Not only concept but direction. diagrams illustrations. No, not screenshots of other engines. I know that this is a complicating subject. But, thanks for any help! No, I'm not trying to make a minecraft clone. Edit Thanks to everyone for your great help (especially Nick Wiggill)! This is what I managed to make (Work in progress). |
5 | Perlin Noise for generating terrain in a 2D side scrolling game. Is there a way to make variations in noise's amplitude? For example if my generated levels look roughly like this But once in a while I would like to have the "amplitude" rise say 10 times than the rest of the level, so that it would look something like That is, once in a while there are deep "trenches" in the level. Now I know that my terrain's Y values are always between for example 200 and 1000 pixels. I there a way for them to mostly be in that range, but once in a while there is a drop to for example 10000 pixels? |
5 | Dynamically Generated Mesh Not Visible Unless In Wireframe Mode I'm trying to create a dynamic mesh using ArrayMesh but my mesh isn't visible unless I turn on wireframe debug mode. Here is a minimal example of a plane mesh consisting of 2 triangles (this script is currently placed on a Spatial node) func ready() With these two lines added I can see the wireframe of the mesh (picture below) otherwise I see nothing. VisualServer.set debug generate wireframes(true) get viewport().set debug draw(Viewport.DEBUG DRAW WIREFRAME) var ve PoolVector3Array PoolVector3Array() ve.push back(Vector3(0, 0, 0)) ve.push back(Vector3(10, 0, 0)) ve.push back(Vector3(0, 0, 10)) ve.push back(Vector3(10, 0, 10)) var uv PoolVector2Array PoolVector2Array() uv.push back(Vector2(0, 0)) uv.push back(Vector2(1, 0)) uv.push back(Vector2(0, 1)) uv.push back(Vector2(1, 1)) var co PoolColorArray PoolColorArray() co.push back(Color(1, 1, 1)) co.push back(Color(1, 1, 1)) co.push back(Color(1, 1, 1)) co.push back(Color(1, 1, 1)) var id PoolIntArray PoolIntArray() id.push back(0) id.push back(2) id.push back(1) id.push back(1) id.push back(2) id.push back(3) var no PoolVector3Array PoolVector3Array() no.push back(Vector3(0, 1, 0)) no.push back(Vector3(0, 1, 0)) no.push back(Vector3(0, 1, 0)) no.push back(Vector3(0, 1, 0)) var array mesh ArrayMesh.new() var arrays arrays.resize(ArrayMesh.ARRAY MAX) arrays ArrayMesh.ARRAY VERTEX ve arrays ArrayMesh.ARRAY COLOR co arrays ArrayMesh.ARRAY INDEX id arrays ArrayMesh.ARRAY NORMAL no arrays ArrayMesh.ARRAY TEX UV uv var m i MeshInstance.new() array mesh.add surface from arrays(Mesh.PRIMITIVE TRIANGLES, arrays) m i.mesh array mesh add child(m i) Now with wireframe debug mode on I see the following Otherwise, I can't see anything. If I add an albedo color to the material override then the lines will change to be that color. I'm pretty new into procedural generation but I've found that a similar thing will work in Unity so I'm not sure what I'm missing here. |
5 | Basic Random Tile Map Generation Currently I've got a map like this It's pretty simple but what I want is that area of tiles to be random, with the number of tiles present being random (Within a minimum and maximum amount of tiles of course) and the positions of the tiles being random (but still all connected to each other), but I'm not exactly sure how I should go about implementing that. I'm sort of looking for a system that will generate random sections of tiles, a bunch of tiles within a group at random positions around the screen with all these sections being connected to each other via a larger section of tiles. Like the example shown in this perfect drawing I've quickly done Each square would be a group of tiles, they're all of different shapes and sizes but all connected together via another large (or small) group of tiles in the middle. I have looked into grid map generation before making this post but all the information I found would tend to go over more advanced map generation methods that have multiple layers which is not really what I need for my game so I was wondering if someone would possibly be able to advice me on what the best method would be to do this? I'd very much appreciate it. |
5 | Zooming into generated map I have generated a 1024 X 1024 heightmap using Open simplex noise. Now i want to zoom into a 64X64 area. Every pixel in the 64X64 is not 16X16 on the larger scale. I tried just generating the area, but problem is, that I want to also calculate normals from it, and the normals are different for the zoomed in area from the big map. The difference comes from the fact that on the big map the height difference between 2 pixels can be quite large, but when zoomed in, new pixels are place between the original 2 so if now normals are calculated, they are totally different. How can I zoom into an area of a generated heightmap but retain the normals? On the left is the large scale map and on the right is the zoomed in area. Zoomed in area is the upper left corner of the large scale map. As you can see the normals are completely different. Both of these images are textures. There are no meshes or anything only textures, and there will not be any meshes in future either. This is how I calculate normals from heightMap. u noiseValues x (y 1) width r noiseValues x 1 y width Vector3 up new Vector3(0, 1, (noiseValues index u) 100) Vector3 across new Vector3(1, 0, (r noiseValues index ) 100) normal across.Cross(up).Normalized() normal (normal new Vector3(1, 1, 1)) 2.0f After updating these lines in normal calculation Vector3 up new Vector3(0, 1 zoomFactor, (noiseValues index u) 100) Vector3 across new Vector3(1 zoomFactor, 0, (r noiseValues index ) 100) This is the result after adjusting normal calculation |
5 | Godot Procedural map, Need help to avoid overlapping areas I have piece of code that using a tile set, i can draw an area of what is going to be a small town city. The code seed cities, make an X number of cities randomly on the map, whereas draw city just paints the city over the screen. My problem is that from time to time, 2 or more citites overlap in the map. func seed cities(num cities) var initial point var final point for i in range(0, num cities) initial point Vector2(int (rand range(0, screen size.x 10)), int (rand range(0, screen size.y 10)) ) range x randi() 10 5 5 being minium longitude range y randi() 10 5 5 being minium longitude final point Vector2(range x, range y) var city position initial point initial point, final point final point cities.append(city position) TODO check if there is another city before draw city(final point,final point) now, i tried to use the function line intersects line 2d , but the appears an error saying that line intersects line 2d is not declared on the current class, so i have another method of checking if the cities overlap. i was thinking of using that or creating an area2D with code to check if there is a collision. func draw city(initial point, final point) for x in range(0,final point.x) Objects.set cell(initial point.x x , initial point.y,4) Objects.set cell(initial point.x x, initial point.y final point.y,4) for y in range(0,final point.y 1) Objects.set cell(initial point.x, initial point.y y,4) Objects.set cell(initial point.x final point.x, initial point.y y,4) Any ideas on what i need to import to use line intersects line 2d? What other way i can check if 2 cities overlap before saving it's position and draw them on the map? |
5 | Procedural Breakout level generation I am currently developing a Breakout game for a school project, and I've decided to use it as an opportunity to get started with procedural content generation. I took a quick look at some of the basic procedural stuff, but I wanted to know if there is a known good method to generate levels for this kind of game (block patterns, "power up" distribution, etc). Any articles or ideas are greatly appreciated. |
5 | How to make non standard sized zones for a procedurally generated 2d map? I am making a procedurally generated map with different zones (plains, forest, village, etc) and am currently just designing each one as a square zone. However, I think it'd be neat if the zones were more randomly distributed so that they could be irregular sizes. I'm not sure how to do that in a good way. (Any given tile needs to know what zone it belongs to quickly and deterministically based on its x, y, and random seed for the world) Are there existing algorithms for this? |
5 | How to round points to an arbitrary grid on the surface of a cube? I'm making a PCG game where I have points scattered or projected onto the surface of a cube, which is centered on origin with a "radius" of 1. That surface is a grid and I want to associate each point to the center of each proper cell's grid. After detecting which face the point is by taking max(x,y,z) I used that formula halfTileSize floor (3dpositions gridDivision) gridDivision EDIT everything above work, everything below is useless, the problem was outside influence from obsolete code But it doesn't round the point to the correct grid cell on the surface. There is a problem where front and back don't return the same result, or it skips a row with some condition, and it also rounds to the wrong nearby cells. I tried to replace the floor with 3dpositions.xyz lt 0 ? ceil(3dpositions gridDivision) floor(3dpositions gridDivision) That didn't work either. It seems to work fine on a 2d planes, which I used to conceptualize the formula, but in 3D I'm at loss as to why it wouldn't work, since I basically reduce the problem to 2D anyway... Any help to create a formula that would round the points properly into the right cell? |
5 | How do you go about distributing resources procedurally in a game? What I mean by resource distribution is the placement of items in the game. More specifically "minable" items in builder resource gathering games like Factorio, Oxygen not included or and RimWorld. The games all place clumps of the same items around each other. For example in Factorio there will be fields of resources like coal, iron, copper, etc. which will spawn together in little clusters rather than there being single resource tiles being sprinkled around the map. See screenshot This is a similar behaviour in Oxygen not included, similar resources are more likely to be next to each other but depending on the rarity they can also be found alone as a single block. In the game there are also zones which denote what resources can spawn which appear to be preset locations and shapes as they are the same each game (with the types mixed up), but resources themselves are position procedurally. I grabbed a screenshot online and highlighted some of the resource types to make the distribution more obvious. The ideal answer will show what methods would work well to reproduce "clustered resource distribution", with advantages and disadvantages of a given method. It will not necessarily have code examples but rather the rough steps pseudocode that would have to be taken. |
5 | Perlin Noise Variations Currently I'm making a voxel survival game. About a month ago I embarked on procedurally generating terrain using Perlin noise. I understand how to use and apply it for the most part. However I do not understand how to vary terrain structure. Let me say that in a way you probably can understand because "me no grammar good". By changing frequency and amplitude I know I can change the resulting terrain, varying it from rolling hills to jagged peaks. However the end result will always be the same either never ending hills or never ending mountains. I don't understand really how I would mix those two "terrain structures" together to get area's of hills and area's of mountains. |
5 | Generate cave like Terrain in 2D I want to create 2D Terrain randomly. It should look like a connected Cave (Shown below). What is the best method or Algorithm to get similar results? The important part is the open area(green) and that it is fully surrounded by walls(brown). 4 Examples |
5 | Procedural dungeon algorithms for a more open dungeon I'm working on a game that I want dungeon generating in, but I plan on having ranged weapons in it, so I want it a bit more open. I'd like to avoid corridors and I don't want to use a grid of custom rooms. I don't want to use perlin noise and make it like random blotches, so that's not an option. All I need is a summary of how the ideal algorithm for this works. EDIT Something that gives a result like this It doesn't need to be so rounded. The point is that there aren't really corridors. I'm also fine with a modular approach where the areas are hand made as long as it's still not on a grid. The issue is that if it's not on a grid, the areas are normally connected by corridors. EDIT2 I made this a while ago, which works when it comes to shape, but it works with a modular system and it looks like this because I intentionally put rooms on top of other rooms. This causes problems if I start decorating the rooms and filling them with interesting stuff. |
5 | Huge procedurally generated subway transit map How could I generate a single transit map image , which is not based on any real map, on a massive scale? Are there algorithms or tools which could do something like this already? Unlike conventional maps, transit maps are usually not geographically accurate instead they use straight lines and fixed angles, and often illustrate a fixed distance between stations, compressing those in the outer area of the system and expanding those close to the center. The scale I'm looking for is earth like. If a line ran horizontally across it could have 40,075 stations kind of map. Ideally, It should also wrap around, like on a sphere. I want it to look just like any local transit map (I'm basing myself on the Montreal metro map) which means I don't care about what a metro system of this scale should look like or how useless this would be. So far, the research Nathan Hellinga's Processing.py subway map generator resembles what I'm looking for and looks great but the algorithm wouldn't scale well to a very large grid. Jannis Redmann's generating transit map theory is really interesting but bases itself on real world data. Maybe it could be used with generated data but how do you generate that data then? Fractal generators! But how do I make it look like a transit map? With Graphviz, I would still need an algorithm to generate data. Slime is a really interesting idea! But how do you procedurally generate that? Wave function collapse algorithm!! Generating a random heightmap, making a graph out of it, and then making it pretty My idea, a random walker. You all know what this is, I just don't think that's the best option there is. |
5 | How would you generate details like trees, water or caves in a 2D terrain? Yesterday I made a post about generating a 2D planet, which resulted in this I did it by subtracting a radial gradient from simplex noise (explained in my other post). Now of course thats a bit boring, what technique should I use to add details like trees, lakes or caves? Would be able to do something like this (but of course across the whole planet) I know doing it on a planet would make it a bit harder, because you would have to know if f.E. the tree is on the north of the planet or the south. To make it easier, if you want, just assume a flat 2D surface like this |
5 | Dungeon Generation with no corridors and room dependencies I'm making a game with a procedurally generated world created at the beginning of the game, consisting of several areas represented by grids (say, 8x8, 9x6, the sizes would ideally be arbitrary). These areas are supposed to be connected to each other through a dependency list. A connection exists when at least 3 spaces of that grid are exposed between those two areas. In the middle cell of that 3 space connection area is the doorway between areas I've been trying to figure out a way to connect them, but it becomes increasingly complex the more areas you need to consider at the same time. I've tried some paper prototyping and while it's a very simple process when doing it visually, I haven't found out a good set of mathematical expressions that allows me to place rooms with the same efficiency by code. Here's a "simple" example I'm struggling with right now Area 'a' needs to be connected to 'b' and 'c' Area 'b' needs to be connected to 'a' and 'd' Area 'c' needs to be connected to 'a' and 'd' Area 'd' needs to be connected to 'b' and 'c' Consider, for simplicity, we're placing the rooms by their order of appearance on the list (I've tried others). So I'm approaching this as your standard procedural Dungeon Generation algorithm. We place 'a' anywhere on the board, since it's the first area. Next, we pick a wall at random and, since nothing is connected to that wall, we can place 'b' there Now we need to place 'c', but 'a' is already on the board, and has an occupied wall, so we decide to put it on another wall. But not every placement will do, because 'd' is coming up and it needs to be connected to 'b' and 'c' too I tried a possible limitation that 2 rooms that have the same set of dependencies cannot be on opposite walls, but even that doesn't guarantee success And in other cases, where the areas have different sizes, being on opposite walls can work Also, not considering a used wall is a flawed assumption since it rules out valid solutions I've tried looking up research on other Procedural Generation algorithms or similar, such as Optimal Rectangle Packing and Graph Layout algorithms, but usually those algorithms don't take into account every constraint of this problem and are hard to mix together. I thought about a bunch of approaches, including placing an area and backtrack until a suitable placement is found, but they seem very dependent on trial and error and costly in terms of computation. But, given the extensive research on the last two problems I mentioned, it might be the only best solution? I just wanted to see if someone has had similar problems in the past or is willing to help me figure this out and give me a few pointers on where I should start with the algorithm. Or, failing that, I'll have to look into loosening the constraints I've set. |
5 | How irregularly shaped rooms should be placed in a dungeon I have made a procedurally generated dungeon that places every room successfully so it is accessible via at least one other room. A 'successfully' placed room is a room who's wall cells are right net to another room's wall cells. This is because there are no corridors in my dungeon, but doorways, 2 cells thick ......... Where ' ' is the Doorway. ......... ..... ......... ..... ..... However I have now moved on to procedurally generate irregular shaped rooms, such as 'L' shaped rooms, 'T' shaped rooms, and so on. I am wondering how I can place, for example, a square room next to an 'L' shaped room, without wasting any space i.e. ........ ........ ... ........ ... ... ... ......... ......... This is not possible with my previous algorithm because it only took into account the room's bounds, where as now an 'L' shaped room's bounds contains empty space that a square room could possibly fit. |
5 | Combining Minecraft and Dwarf Fortress Simulating autoplay in a pseudo infinite procedurally generated world? One of the interesting things about Dwarf Fortress (and other procedurally generated games like Civilization) is that the game simulates multiple AI factions interacting with each other over time (what might be termed "autoplay") to generate an evolving world which changes over time, even whilst the player is playing the game. On the other hand, simulating all the factions simultaneously is surely going to become a bottleneck as the map grows. With a bigger map and more factions, the performance requirements become exorbitant. Minecraft gets around this problem by simply storing the inactive chunk in memory as is as soon as the player leaves the area. The minecraft world is a static, never changing place. When a player comes back from a trip, the chunk is exactly as he left it. No world evolution occurs. Everything is always the same. The most straightforward approach to this, which is to just to make chunks remain loaded in memory even after the player is no longer in them, has the same performance issues as mentioned earlier as the player moves across thousands of blocks, you will sooner or later run into computation limits. Moreover, this does not solve the general problem of faction simulation factions can expand or contract through many chunks, whereas keeping one chunk loaded in memory would not affect its neighboring chunks, so that doesn't quite achieve the same effect as autoplay. The "solution" that I thought of is to come up with a closed form formula that simulates autoplay somehow. That is, a function f(time,coordinates), such that given the time and and coordinates of a block, will tell you what state that block should be in. The problem with this is that this assumes a truly predeterministic world evolution, in which players have control over only their local chunk and no others. In other words, no butterfly effect. Furthermore, when a player leaves a chunk, he has made some changes to it, but the function cannot take those changes into account when computing the state of the block the next time the player enters it, in other words all changes that the player made to the block are lost as soon as he leaves. This is obviously not ideal. Am I asking for something impossible? |
5 | Filling a room with random furniture This is a rather complex question and I'm more hoping for general algorithms anyone might have heard of. I wish to generate randomly sized rooms. Each of these rooms has a type and a corresponding list of furniture to be placed inside it (ie kitchens can have fridges, both kitchens and living rooms can have TVs, etc). Each piece of furniture has it's own collider (cylinder, cube, mesh...). Are there any good algorithms to randomly lay them out? The best idea I've managed so far is to subdivide the room into a grid the size of the smallest piece available. Then I would randomly place the furniture until every grid square is at least partially filled. However, this is hardly ideal and the rooms would more or less look like warehouses. Optional How do I randomly place the furniture in such a way as to make it at least look slightly realistic? |
5 | Non Perfect maze generation with objectives I need an algorithm that can generate mazes with these requirements Allows for random structures to be made (Ex a center spawn area, objective points and 'Caverns (corridors with 2 or more entrances and a width gt 1)' ) Generates paths from structures to required connections Can be implemented in Python with relatively little difficulty No extra modules (unless supports Python 3.5.5) As an example, the objectives would look like this in game (I use integers to store the walls in the ray caster) 2 2 2 2 2 0 0 2 2 0 0 2 2 2 2 2 I also tried looking on wikipedia and I found this semi helpful link but none have helped me achieve this so far. |
5 | Do 2 state cellular automata exist? I'm trying to implement a zone system into my game that randomly sets chunks (the cells) to a certain value from a list and that would effect nearby chunks. It's basically a cellular automaton in which instead of the cells being on off, they would have multiple options, like red green blue yellow brown or such. Do this kind of cellular automata exist? |
5 | How to change chance of spawn based on distance? I am trying to make a cellular automate cave but want to keep the middle empty. How should I change the chance based on the distance from the middle? I don't want to completely deny it just want a small enough chance to keep it almost empty. |
5 | 1D Perlin Noise Game in Unity I'm working on a 2D side scrolling game in the Unity engine. I am using the 1 Dimensional Perlin Noise function and using pseudo code. I can't use two links so I'll provide a link to imgur with the images and the links in numerical order. First link in imgur links to the pseudo code implementation of perlin noise I am using. My implementation so far is showing good results. Here is a picture This image uses the values Persistance 0.7 Octaves 4 From the first article I linked, it states Now, you'll want several different random number generators, so I suggest making several copies of the above code, but use slightly different numbers. Those big scarey looking numbers are all prime numbers, so you could just use some other prime numbers of a similar size. This block of text is referring to this part of code which is an Integer noise function float Noise (int x) x (x lt lt 13) x return (float)(1.0 ((x (x x 15731 789221) 1376312589) amp 0x7fffffff) 1073741824.0) Another site I found the author adjusts the Integer noise function from discrete to continuous (allowing the range not to be limited). I've made this change although I am not sure if my implementation of both links I've provided is entirely correct. The results are promising but when you change these variables values to Persistence 1 Octaves 8 the terrain starts to have little gaps at the bottom like so I am not quite sure how to fix this, I know lowering the persistence provides smoother results resolving this issue but that makes the terrain's amplitude rather low for a side scrolling platformer. Here is the complete code void Start () objectArray new GameObject width, height for (int i 0 i lt width i ) float x PerlinNoise 1D (i, persistances, octaves) for (int j 0 j lt height j ) objectArray i,j (GameObject)Instantiate (gameobject, new Vector3 (i, j x, 0), Quaternion.identity) float Noise(int x) x (x lt lt 13) x return (float)(1.0 ((x (x x 15731 789221) 1376312589) amp 0x7fffffff) 1073741824.0) float CoherentNoise (int x) int intX (int)(Mathf.Floor(x)) float n0 Noise (intX) float n1 Noise (intX 1) float weight x Mathf.Floor (x) float noise Mathf.Lerp (n0, n1, weight) return noise float SmoothedNoise (int x) return CoherentNoise (x) 2 CoherentNoise (x 1) 4 CoherentNoise (x 1) 4 float InterpolatedNoise (float x) int integer X (int)x float fractional X x integer X float v1 SmoothedNoise (integer X) float v2 SmoothedNoise (integer X 1) return Cosine Interpolate (v1, v2, fractional X) float Cosine Interpolate (float a, float b, float x) float ft x (float)Mathf.PI float f (float) ((1 Mathf.Cos ((ft))) .5) return a (1 f) b f float PerlinNoise 1D (float x, float persistance, int octaves) float total 0 float p persistance int n octaves 1 for (int i 0 i lt n i ) float frequency (float)Mathf.Pow (2, i) float amplitude Mathf.Pow (p, i) total InterpolatedNoise (x frequency) amplitude return total Thank you for your help and time. |
5 | Procedual terrain generation and biomes predetermined variation So I already have some (currently 2D possibly 3D later) simplex noise generation going, and with some experimenting I can make a map for plains, hills, mountains, etc The problem now is I want to combine those together to create a larger more interesting map. For each "pixel" in the height map I provide generate a biome type which has a bunch of parameters to define how the height value is calculated etc. i.e. I want to be able to say mountains here, river through there, flood plains next to it, etc and have them blend together. The problem is this leaves nasty borders since between them even the simplex input values change suddenly (due to the x z scaling being different, perhaps not the best way?). I considered just doing like a post process to smooth out the height values along the borders, but this would still leave often steep (and uninteresting near constant gradient) slopes since I could have a valley one side and a mountain peek the other side. I am sure there must be a better fairly standard way to do this, but have not found much searching around, at least for this sort of noise function (midpoint displacement can be seeded with initial values at a low resolution, but doesn't seem viable if not generating the entire map at once) double getHeight(int x, int z, Biome biome) double nx x double nz z nx biome.xzNoiseScale() e.g. 1 64 ny biome.xzNoiseScale() double noise fbm(nx, nz, biome.noiseOctaves(), biome.noiseLacunarity(), biome.noiseGain()) return biome.baseHeight() noise biome.heightVariation() double fbm(double x, double z, int octaves, double lacunarity, double gain) double amp 1 double freq 1 double sum 0 for (int i 0 i lt octaves i) sum amp noise(x freq, y freq) amp gain freq lacunarity return sum |
5 | What methods are there for representing 3D terrain? I'm making a terrain system which needs to be procedurally generated and would like to know my options. So far I know of Height field terrain, Vector field terrain, and Voxel terrain. Is there anything missing from that list? |
5 | Do I need multiple perlin noise generators for different features in terrain generation? I have a simple perlin noise algorithm in my 2d game, I feed it x and y location of a tile and get some value between 0 and 1. I then use a bunch of if else statements to break these numbers into terrain types 0 is water 0.5 and less is plain 0.6 and less is hill Then there's features like forests, but in the current system a hill cannot have forest on it. I'm using only 1 perlin generator here, and my question is whether I need to have multiple perlin generators with random seeds to control elevation, vegetation and other terrain features? |
5 | Smooth Biome transitions with tile map? I'm using a simplex noise system to generate height maps for an "infinite" 2d world map. It works perfectly I can define which tile belongs at which height value, etc. However, I'm trying to add in biomes I want different areas of the map to use tiles exclusive to that "biome". I've tried generating a second noise value divided by a larger number so that I can generate very large areas. That noise value determines the biome, and the noise value for tiles determines the tile inside that biome. This works ok but when the same noise value means different tiles in each biome, then you wind up with very ugly cut off lines between biomes. I tried adding the biome noise and tile noise together and only selecting the tile based on those. The edges were smoother, but there really was no actual use of the biome code just tiles locked to unique noise values, never overriding each other. What's a better way to do this, so that biome boundaries follow "features" of the terrain? I want them to be fairly large, but not cut through a "mountain" the boundary should follow the natural curvature of the height map values. |
5 | How can I add biomes to my generated world? I need a way to generate a world realistically. I want to generate worlds similar to dwarf fortress. My current code for world generation is this worldTiles ' ',',','.','.' def generateWorld(self, x 40, y 20) world for i in range(y) row for z in range(x) row.append(random.choice(self.worldTiles)) world.append(row) return world with the worlds it generates being this The world is ok, however what I want is biomes, not just completly random generation. In case it helps, heres how the current generation works A variable called worldTiles has alls the tiles the world can have. This is used by the function. The function, creates an array, and appends a row to it. The row is then added to the world, as another array. A example world might be ' ', ',', ' ' , ' ', ',', '.' , ' ', ''., '.' |
5 | How do I make a natural looking map from some Voronoi regions? I'm using Voronoi regions to create a map for my game, much like this. However, the lines are too straight and perfect. How do I make the borders more natural looking? As in, less like US state borders and more like international borders in Europe or Asia. |
5 | Town generation algorithms In this RPG.SE post a long lost page with several online generators is mentioned. I'm particularly curious about the way towns were generated. Take this image for example Although a lot of things could be improved graphics wise, it was very good considering the tools available at the time (mid to late 90s) The road layout seems fairly organic (even considering all roads are placed in an orthogonal manner). Not all roads are necessarily connected, but it feels right. Buildings are placed in believable spots. Even trees seem to be placed in logical spots. I think it would be fun to give it a shot and try it myself. Especially since my previous attempts have been too quot blocky quot You'll notice that I'm describing many of the qualities with not quite measurable adjectives (seems, feels, believable, etc) so I'm having a hard time translating them to instructions and ultimately to an algorithm. Are there any tried and true algorithms for town generation? I understand this seems to be too broad, so consider this If I asked for an algorithm for generating maps of continental land masses, I'd get references to Perlin and other noise algorithms right away closely followed by Voronoi. I've seen questions like this one but they seem to have a more concrete idea already in mind (ie 2x2 houses, fixed number of houses, canal and road placement restrictions). What I'd like to have is something less constrained. Except maybe for the grid layout, which should be a lot easier for a first attempt than, say, L system. |
5 | Filling a room with random furniture This is a rather complex question and I'm more hoping for general algorithms anyone might have heard of. I wish to generate randomly sized rooms. Each of these rooms has a type and a corresponding list of furniture to be placed inside it (ie kitchens can have fridges, both kitchens and living rooms can have TVs, etc). Each piece of furniture has it's own collider (cylinder, cube, mesh...). Are there any good algorithms to randomly lay them out? The best idea I've managed so far is to subdivide the room into a grid the size of the smallest piece available. Then I would randomly place the furniture until every grid square is at least partially filled. However, this is hardly ideal and the rooms would more or less look like warehouses. Optional How do I randomly place the furniture in such a way as to make it at least look slightly realistic? |
5 | How to orient a surface normal to a cubic surface The immediate question is in HLSL, how can I orient a surface normal generated in UV space so that I can apply it to a cube face? The overall project is that I'm trying to build a procedural planet generator. I'm using a cube projected to a sphere where each face is a quad tree. The intermediate project is that I want to generate a normal map for the terrain. I think the best way for me to do this (and understand what I'm doing) is to generate the normals for the cube version first, then work out the transformations to warp those normals to the sphere. Ideally the method would not involve branching code based on which face I'm working on (i.e., if we're on the top side of the cube, then U X and V Y). In other words, what I'm hoping for is some math magic like "Oh, just cross multiply the terrain normal by the dot product of the cube face normal and blah blah blah". 9 20 10 ETA I know how to calculate normals for a flat surface. My subsequent problem is two fold How do I rotate the normal map so it is oriented correctly on each of the cube faces? how do I warp the flat normal map so that it wraps the sphere? I've found one solution that uses a Jacobian matrix, but I can't get it to work. Even when all of the normals are pointing straight up (i.e. a flat surface), the HLSL code involving the Jacobian totally messes up the lighting so it makes me not trust my implementation of the solution. |
5 | Translating conditions ("If A has B, then true") into objects that satisfy them ("A has B") I have a system where I'm sifting through a large number and variety of objects in my game, looking for objects that match an arbitrary search criteria that can be simple or complex. For example, suppose a Foo has three integer properties, A, B, and C. I might search the list of Foo objects three times. First, I want to find a Foo where A gt 5. Second, I might want to find a Foo where A lt B or B 8. Third, I might want to find a Foo where A 2, B 6, C gt A, and C lt B. The point is that I could arbitrarily pass any of a very wide set of conditions into the search. Now here's my problem. In all cases, if I can't find an item that matches these criteria, I want to create a new Foo that does match, and add it to the list of Foo objects. The thing I'm wrestling with is figuring out an underlying system of representing conditions that allows me to then create an item that directly matches those conditions. So far I've got two ideas, neither of which I'm a fan of Repeatedly generate random Foo objects across the span of possible properties, until applying the criteria to one of them results in true. Given the possible permutations involved, this feels like an absolute performance nightmare, and would probably require a ton of caching logic to track what possibility spaces have already been tried. Establish a list of individual conditions with isolated variables (such as a GreaterThan condition with the referenced property that indicates whether the property is A, B, or C and the target value) and create a corresponding declaration (Make property a random value between targetValue and propertyMax ). Not only is this incredibly tedious, but I'm also not really confident I understand how it would work, particularly in C but more generally also. This feels like self reading code and that's something I have no experience with. My question is, basically, what designs and techniques can I use to address this sort of issue the need to create objects that match criteria, when those criteria could be arbitrary? Surely this has come up in other projects. What kinds of constraints or frameworks are applied to make this doable? |
5 | How would you generate details like trees, water or caves in a 2D terrain? Yesterday I made a post about generating a 2D planet, which resulted in this I did it by subtracting a radial gradient from simplex noise (explained in my other post). Now of course thats a bit boring, what technique should I use to add details like trees, lakes or caves? Would be able to do something like this (but of course across the whole planet) I know doing it on a planet would make it a bit harder, because you would have to know if f.E. the tree is on the north of the planet or the south. To make it easier, if you want, just assume a flat 2D surface like this |
5 | Huge procedurally generated 'wilderness' worlds I'm sure you all know of games like Dwarf Fortress massive, procedural generated wilderness and land. Something like this, taken from this very useful article. However, I was wondering how I could apply this to a much larger scale the scale of Minecraft comes to mind (isn't that something like 8x the size of the Earth's surface?). Pseudo infinite, I think the best term would be. The article talks about fractal perlin noise. I am no way an expert on it, but I get the general idea (it's some kind of randomly generated noise which is semi coherent, so not just random pixel values). I could just define regions X by X in size, add some region loading type stuff, and have one bit of noise generating a region. But this would result in just huge amounts of islands. On the other extreme, I don't think I can really generate a supermassive sheet of perlin noise. And it would just be one big island, I think. I am pretty sure Perlin noise, or some noise, would be the answer in some way. I mean, the map is really nice looking. And you could replace the ascii with tiles, and get something very nice looking. |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.