How to avoid wagon wheel illusion of a rotating gun barrel reversing direction? I didn't know which forum to post this in, but I'm going to try here first. I am making a shotgun with 3 barrels which spin. However, I also want it to have kickback in the animation, but every time I add that recoil it breaks the animation, making a strange wagon wheel style illusion. No matter what I try, it always reappears once I add the recoil. Here is the animation Here is how the animation is supposed to be perceived, with the barrels spinning in one direction But this is what I often see when I look at it, where it seems to snap backwards one step It may be a bit hard to see, but if you look at it long enough it will flip between the two, similar to that animation of a ballerina which can be spinning in either direction. I have tried having it only spin when it is down, only spin when it is up, changing the interpolation of the spinning and of the recoil, everything I can think of, but none of it works. How do I solve this problem? Can I stop the optical illusion while keeping the recoil?


How to animate a character from a sprite sheet? I'm making an online game, and I had been using a blank square as the character until recently. Now I want to add a real, animated character. I downloaded a free sprite sheet which has 12 (3x4) character sprites. What is the general method to animate the character? I see why having all the character animations in one file can be useful, but I don't understand how it would be done. I don't want code or anything, I just want to know how you normally use the sprite sheet to animate a character so I code it afterwards.


Literature about Open World Games, Freedom to Choose I'm doing a diploma thesis about the development of games with freedom to choose or open world. Topics will be i.e. development issues in programming and the design itself, mechanics etc. For that I need literature and lot's of it. Do you have any suggestions?


Is it unethical to make a game AI that is secretly non competitive? In several games the AI is designed to give the player an easy time without their knowledge. This can be having a 0 chance to hit the first time you appear, enemy letting you sneak up on them by not turning around, or the lowering of difficulty when the player is hurt or has restarted several times. I would be offended if at the end of a board game or sport I was told that a human had not tried their hardest. Does the same ethics exist for an AI? edit As in the title, my main concern was keeping the handicap hidden from the player, for example, when playing a shooter it is reasonable to expect the player knows the AI has an artificial reaction time and poor aim but my question was about games that hide things such as enemies not using the best weapon or lowering their difficulty when the player is inured.


Why do most video game guns reload without losing unused ammo in the magazine? If I have picked up 500 spare ammo and I 73 100 bullets in my current gun, why will I end up with 473 spare ammo instead of 400 (losing the 73 unused rounds in the previous magazine)? Is this just to make it easier on the player? I want to make a challenge shooting game and it seems like timing your reloads would be interesting. Is there any reason I should stick to the norm?


Handling non automatable, repetitive, game tasks A problem I'm currently having with a project of mine is deciding how to handle repetitive, but important, in game tasks. As an example (Though there will be many other instances of this), earlier in the game, the player must smelt and shape iron without modern tools. After iron ore has been smelted, it must be shaped into tools, this requires manual labor. So how are some ways I could handle the shaping process (A repetitive, time consuming, task)? Having the player sit in a GUI until the shaping process is complete is obviously not a great idea. I don't want to make the process instant and simply rely on the speed of the smelting process to cull production, as the player could just utilize a huge number of furnaces to bypass that. For other reasons, it would be incredibly difficult and time consuming to create a short mini game for each of these situations. Is there an easy way to solve this?


How do they made Pok mon games so flawlessly balanced? I find it hard to believe how well balanced the Pok mon games are. Not just within the games, where you'll find amazing balance from the very beginning to the very end, but, surprisingly, even when things get more competitive. If you have ever played the simulators that are available, you'll know what I'm talking about www.smogon.com. There are thousands of unique Pok mon characters, moves, traits and items. Yet, if you try to find a single broken strategy, You can't. And if you do find something obscure that could give you a good advantage, you'll realize it's impossible. The emerging competitive scenario is one of the most amazing strategy games I've ever seem, and it's not even a feature of the Pok mon games!


Can a scrub design develop a strong competitive fighter? The definition of Scrub in this question comes from David Sirlin's famous article, Playing To Win I am a fan of fighters, and I am fairly well versed in design (I get my daily dose of gamasutra). However, I am also a MASSIVE Scrub. I don't like using tactics characters that I feel lessen the experience or go against the spirit of the game (for example, Street Fighter's roll cancel glitch, MVC2's infinite combos, Cable, etc). I will practice and get good at using those tactics characters, so that I can better defend against them, but I'd never use them against another player. My question is, can someone like me design develop a strong competitive title, or does my outlook prevent me being able to appreciate elements of design that are a necessity for developing a competitive scene? My question is, are such elements necessary in creating a competitive fighter? What are the "gotchas" a scrub would by hindered by when designing developing a competitive fighter?


Particle systems on multiplayer games I'm working on a 2D javascript Three.js multiplayer game, using web sockets and an authoritative server currently written in Python. The combat mechanic will be similar to Geometry Wars however i'm struggling to get my head around how to implement this in an efficient way. There are several drawbacks concerns I need to take into account Efficiency is key Three.js particle systems aren't mutable, you cannot add or remove particles once the system has been created, only move them off screen All calculations with respect to collision and damage must be done server side My game currently implements entity interpolation with fixed time step updates from the server Potentially several different weapons projectile types I can see several solutions Handle each 'bullet' particle individually Pros Most accurate way of doing thigs Cons Slow on server Lots of bandwidth Hard to batch draw objects, will have to draw each individually Use ray casting on server and have some form of network synced particle emitter Pros Much easier on the server and network Cons Network synching issues What happens when a bullet hits an object? Bullet will pass right through Use ray casting on server for collision damage and use raycasting on client for more accurate particles Pros Much easier on the server and network Will look more accurate Cons May still have some synching issues More work for the client Obviously the amount of players currently connected will have an impact on the implementation, I would ideally like to allow hundreds of players to share a game world but there may only ever by 20 or so on screen at once. The mutable particle system is an issue for all of these but I would still like to use it as it is more efficient that drawing each particle individually. In a test I could have over 10000 particles all moving and still get 60fps. Any help or comments on my though process would be greatly appreciated. Is there another approach that would be better?


Need help with making number system for idle game So, I want to create a new game. I have problems with how to store large numbers in the game and how to output them. I have written a small pseudo code that contains everything I need to play the game (Did I forget anything?). represent our number struct BigNumber double base (or mantissa) double exponent create new number function NewBigNumber(double b, double exp) return BigNumber base b exponent exp now if we have to BigNumbers we want add operation ( ) and other operations ( ), ( ), ( ) function adding(BigNumber n, BigNumber m) if numbers have same exponent part if (n.exponent m.exponent) adding base here double new base n.base m.base create new BigNumber with new base return NewBigNumber(new base, n.exponent) else ????????? function subtraction(BigNumber n, BigNumber m) function multiplication(BigNumber n, BigNumber m) function division(BigNumber n, BigNumber m) As you can see, I will use Scientific notation I have a problem with the addition operation (and other), what if the exponent part of numbers are different? Next I have this code. If we have achievement systems we need function equals of two numbers function equals(BigNumber n, BigNumber m) if (n.base m.base amp amp n.exponent m.exponent) return True else return false And finally, I need the function to output numbers nicely. suffices 'K', 'M', 'B', 'T', 'Qa', 'Qi', 'Sx', 'Sp', 'Oc', 'No', 'Dc', 'Ud', 'Dd', 'Td', 'Qad', 'Qid', 'Sxd', 'Spd', 'Od', 'Nd', 'V', 'Uv', 'Dv', 'Tv', 'Qav', 'Qiv', 'Sxv', 'Spv', 'Ov', 'Nv', 'Tt' now we need "good view numbers" function for exapmle 1000 1000 1000000 1Million function(BigNumber n) ????????


Sprites Are there any tools to scale sprites individually without using Photoshop GIMP? I am using TexturePacker as tool to pack my 2D sprites, it is good but it doesn't provide the possibility to scale individual sprites to a specific scale. I am wondering whether there is any good tool or command line to scale the files in the original folder without having to use TexturePacker. What I am trying to do is to fix some scaling errors that the illustrator that produced the files did without having to re scale fix things using Photoshop that is more time expensive.


How complex should enemy AI be in a dnd alike? I'm writing a text mode (python ncurses), turn based rpg based loosely on 3rd edition D amp D and Neverwinter Nights (the PC game) rules. It's not going to be a full implementation, but 'in the spirit' of them. I already have quite a bit of the basics in place movement, a few base classes and races, rule based encounters (shop npc monster X shows up when condition Y is true), dynamic generation of monsters, player and enemy stats and random, levelled equipment etc. It's enough to start moving around a basic world, talking to people, examining objects and location and now I'm moving on to (melee) combat. I'm interested in what people would expect of an algorithm that co ordinates the computer controlled attacks of an enemy party against the player. How smart should the computer controlled enemy be (in my implementation the player will take control of each of his own characters in turn, and they wont be AI controlled, but the enemy party will attacking, spell casting etc at will). For example if an enemy character initially chooses a random pc from the players party on round 1, should that enemy continue to attack the same target in subsequent rounds. How about if another pc then attacks that enemy? What if the enemy is unable to cause damage to that pc (ie say the pc has something crazy like damage reduction 100 5 should the programme know in advance?), should they switch to another in the players party? Has anyone implemented anything similar and would be able to provide any pointers?


How do I fairly distribute new powerful cards to players in a collectible card game? I'm writing a game in which users start with a few cards. They use those cards to play against other players. The winner can steal a card from the other player. The aim is to get more different rare higher powered cards. If everyone starts with 10 low powered cards, how would anyone ever get higher powered cards? They'd just be playing against people who have the same type of cards as them. How do you fairly distribute these more powerful cards among players?


Who has ownership of publicly developed projects? After seeing the comments on selling an idea to developer for a game, the general concencus is that without a game, or atleast a demo, it s not going to happen. So someone (yes, Noctrine, I am looking at you) suggested that it might me an interesting idea to turn it into a public project. A few people have asked if I minded if they turned some of my concepts into models, something I always have agreed on. They tell me that it would be to use as work for their portfolio or for practice. Still waiting on those, but that is another story. If I do this, set up a group to help starting modelers and programmers practice or get stuff for their portfolio, after everything is said and done, who has ownership of the project. I ask in case we end up with an actual demo and a studio get s interested. Who do they buy it from? I have no issue with paying accordingly to all participants, but in the legal aspect, who owns it before a publisher buys it?


What is the purpose of adding non gameplay elements to a game? As an example, I'll reference scientists in Jetpack Joyride. I do understand there are achievements that involve scientists, that you can kill them or you have a nerd repellent, but I am not asking about any of those. I want to understand whether there is any very important reason to have such an element in a game, since (at least initially) it seems quite insignificant. More precisely, does the presence of scientists (or any equivalent, apparently insignificant "actor" in a game) has any psychological effect or influence of any kind to the players? Or they are simply there as a small little feature of the game that barely makes any difference to the player's feelings amp attitude whilst playing the game?


In a visual novel game with optional sidequests, how to encourage the sidequests without requiring them? Context I'm working on a small visual novel style game, telling the story of a defense attorney and investigator. The story is split into chapters, with each chapter being a new case, and there are also recurring characters who develop throughout the story. It's a mini Phoenix Wright style experience, with some point and click detective work mixed in. As part of the game, you can embark on optional character based sidequests, each of which focus on a different character and showcase some development between them and the protagonist. A few of these sidequests unlock after completing each case, and are usually related to the case that just happened. For example, after finishing a case involving a video game convention, you unlock an optional sidequest where you can take one of the supporting characters (the quot tough guy who's secretly a dork on the inside quot , of course) to the convention before it leaves town. I want to make these sidequests optional, and not force the player to do all of them or make them feel like they have to say quot yes quot to all of them that is, I want to establish that they're free to decline an invitation if they don't like a particular character as much as the others and would rather not take them out for ice cream. However, I still want to make sure the player does some of them, because I feel many of them, if missed, would cause the player to miss out on really neat parts of the game. (If it helps, the game doesn't have a quot completion percentage quot or anything, just small achievements for doing certain things.) My question Given this design, I have a conundrum. I want the player to do at least some of the optional sidequests, but I don't want to force it or make them feel like it's necessary to see every single one of them. I don't want to place an arbitrary quot you must do 3 sidequests to proceed quot roadblock, but I also don't want the player to skip all of them and do the entire story without developing any of the characters. That obviously defeats the point of a heavily character based visual novel! So, this is my dilemma What game mechanics in a visual novel are best to encourage optional sidequesting, but not require it for story progression or completion? I have a couple ideas for this, since a lot of games have offered solid solutions for this problem already Making the sidequests optional, but having rewards for doing them. This is the approach that most games take nowadays. You don't have to do the sidequests, but maybe if you do one, it unlocks a palette swap, an item, or a hint coin. Affinity mechanics. Maybe if you do enough sidequests for your prosecutor buddy, he gets closer to you and gives important hints in a later cases. This would work similarly to quot friendship quot in other games, where there's a number that keeps track of how good your relationships with different characters are and doing quests increases that number. At the same time, I think this encourages too much of a quot metagame quot approach, where players will just do every sidequest for a character all at once to unlock their bonus. It also makes the difficulty curve of the game wonky, since I want the cases to start easy and get progressively harder, and giving substantial bonuses in the late game might mess with that design. Requiring the player to do at least X of them. This is the roadblock approach blocking the progression of the story until the player does at least 1, 2, or 3 of the available sidequests. I dislike this because it feels like I'm being arbitrary and might frustrate the player if they don't like the current sidequest options and really want to do the next case. Ideas and other suggestions are welcome!


Collision with User Input and Object I am curious on how to handle collision detection involving a moving target and user input. Basing myself in the mobile space, I get events from a set framework, but I do wonder about the amount of lag involved. Say the object moves faster and faster, then position of the input and the object is very important. What I want to know is what is the best design for handling user input and then also the best way to make sure to accurately work out when the input point collides with the object, keeping threads in mind?


How do I make players believe they're doing something wrong even when they're not? You're doing it right. right? In the game Cart Life, you are led to consider this, even though you are doing fine. This effect is created by making you do mundane jobs, earn little money, and have and things happen that feel like your fault. Is there a better way than life like mundane and unfortunate encounters to make you feel like you're failing at the game? I want to use this to mess with how my players play the game. Overwhelm them. Make a little success feel huge. Make them feel depth. Any ideas?


Separating game logic and rendering I know this has been asked before but I would like some things cleared up. I understand that game logic and rendering should be separated but my problem is more or less how? For instance, should the renderer get ALL info from the sprite object and use that to draw? Also should the renderer be a seperate class or member function. If it's a separate class should it be able to get the necessary info via public functions or should it be a friend of the class to draw it? Also some clarification as to what the main object should contain, e.g, is it okay for the main class to have other sprites, shapes, fonts, and effect data? Or, should the renderer somehow contain or produce that data? I'm asking this because I'm making a menu list class in SFML. And, although it technically works, I'm confused because it's implemented in a way that is considered by many to be bad. Thus, I would like to know as to how to implement it and fix it correctly because I have currently blended both the logic and rendering together. class MenuList private bool m visibility true std vector lt std pair lt MenuItem, sf Text gt gt m items sf RenderWindow amp m window SEL EventManager amp m manager sf Font m font sf RectangleShape m highlighter sf Color m highlightColor sf RectangleShape m box size t m size 0 size t m rowSpacing static const uint16 t indent public MenuList(sf RenderWindow amp window, SEL EventManager amp manager) MenuList() get a certain option, no range checking MenuItem amp operator (size t index) get a certain option, with range checking will report an error to the console if range is out of bounds MenuItem amp getOption(size t index) update the menu void Update() set the visibility of the menu void setVisibility(bool value) get the visibility of the menu bool getVisibility() const add another option void addOption(const MenuItem amp item) add multiple options via a list void addOption(std initializer list lt MenuItem gt items) remove an options index void removeOption(size t index) remove an option by name void removeOption(const sf String amp name) resize the amount of submenus void resize(size t size) get the local position of the menubox sf FloatRect getLocalBounds() set the amount of spacing between each menu in pixels void setRowSpacing(size t rowSpacing) get the amount of spacing is in between each menu in pixels size t getRowSpacing() const void addSeperator(size t index, sf PrimitiveType Type sf PrimitiveType LinesStrip) get the amount of sub menus size t getMenuCount() const noexcept get the position of the menu, the top left const sf Vector2f amp getPosition() const noexcept move the menu to a completely new position, overides the previous position void setPosition(float x, float y) move the menu to a completely new position, overides the previous position void setPosition(const sf Vector2f amp pos) void setOutlineThickness(size t thickness) size t getOutlineThickness() const reset the menu such as the size, menus, and box void reset()


Why are most characters all the same height in games? In the majority of video games I play, I notice that NPC's are the same height. What's up with that? It kinda takes me out of the experience, when I see ten people in a row that are 5 foot 8. Anyone else notice this, or am I crazy?


How to measure skill in a pinball game? I am trying to come up with a system to measure or estimate the skill of a player at a single player game (so no head to head rating system help here). Specifically, it is a pinball game, but I do believe it is similar to most point based single player games. I have thought of 3 approaches total points scored with a threshold for each skill level average points scored over all time average points scored over last X games All of them use points, which I think is probably the right metric anything a player does in pinball grant points, with the most difficult objectives worth more points. Points also take into account all of the rare combination of objectives (like score multiplier multiball) that would be hard to track manually. However, I am not sure which approach to use and I bet other games have implemented similar skill measuring system that I can use as a guide, so I'd appreciate any and all help on this.


How do Action RPGs make different weapon types feel unique? I'm getting feedback on my game which has Action RPG elements (think Diablo, Torchlight, etc.) but you control a team of heroes. When you kill enemies sometimes new weapons will drop. In my game the DPS of the weapon will be randomized but stronger the further you get. Each weapon type has a hard coded range and rate of attack, but it differs between types. As an example, every Pistol will attack once per second and every Machine Gun will attack 5 times per second. A common complaint I'm getting is The weapons needs more variety, there's not really many reasons to change weapons because they all have the same speed and small damage differences. I'm struggling to achieve this. I can vary speed and range for each type, and this seems like an "ok" solution but it's not good enough. This just feels like a sliding scale that looks like this range lt gt rate of attack dps 10 Here you can change the range and the rate of attack, but the DPS is still going to be based on the level of the enemies. In the end, it's still not going to matter which weapon you choose because they'll all have about the same DPS. If I make it so they don't have the same DPS, then yeah, there will be reasons to change weapons, but it'll be because some weapons suck and some weapons are good. I don't think this puts me in a better place. I want the player to feel like weapon type X has pros and cons over weapon type Y. How can I achieve this?


What is the term for the level progression paradigm in Bejeweled? Looking at the various level progression paradigms for my puzzle game, I decided to rule out the common ones such as 3 star per level, linear campaign like story, etc. I like the idea of Bejeweled's classic mode where the player simply keeps on going. What exactly is this paradigm called? I can't find any write ups on it so I can't quite tell what its structure is like. Is it infinite? Does the difficultly increase with each level in some shape, way or form (more likely to get "No moves")?


Hinting at Steganography I'm working on an ARG which will be implemented mostly through a standard website. I'd like to give some of the images on the site steganographic content (hidden content stored in an image, e.g. an 8 color image of the same dimensions stored as even and odd color values in the pixels). Technologically, this is fairly easy to do. However, I'm having trouble figuring out a subtle way to hint at the presence of this content. The effect itself is invisible to the naked eye, and nobody just randomly checks for this kind of thing. What can I do to draw players' forensic attention to these images, while still maintaining an amount of subtlety (i.e. something that doesn't make it glaringly obvious)?


What are examples of games with "minimalist" models art assets When teaching game development, my student's obsess about building realistic or complex art models animation. And spending wayyy to much time trying to get accurate collision detection between two 3D models despite my best efforts However I would like them to spend more time thinking about developing the game mechanics, interaction and game play. I'm looking for some games where the visuals are simple but have good game play. Things I am thinking about are Cubes' vs Spheres or Impossible Game. What are more examples of visually simple (preferably 3D) games to help inspire my students?


Characteristics, what's the inverse of (x (x 1)) 2? In my game you can spend points to upgrade characteristics. Each characteristic has a formula like A) out in for one point spent, one pont gained (you spend 1 point on Force so your force goes from 5 to 6) B) out last level (starting at 1) so the first point spent earns you 1 point, the next point spent earns you an additional 2 and so on ( 3, 4, 5...) C) The inverse of B) You need to spend 1 point to earn one, then you need to spend 2 to earn another one and so on. I have already found the formula for calculating the actual level of B when points spent x charac (x (x 1)) 2 But I'd like to know what the "reverse" version of B) (usable for C) is, ie. if I have spent x points, how many have I earned if 1 spent gives 1, 1 2 3 gives 2, 1 2 3 6 gives 3 and so on. I know I can just calculate the numbers but I'd like to have the formula because its neater and so that I can stick it in an excel sheet for example... Thanks! ps. I think I have nailed it down to something like charac sqrt( x m k) but then I'm stuck doing number guessing for k and m and I feel I might be wrong anyway as I get close but never hits the spot.


Does inflating scores make players happier? I realize that this will depend on a game to game, situation to situation basis and that this is not a very technical question, but I remember hearing in a tech podcast a few years ago that inflated numbers of points (e.g. 1000 points vs. 1 point) was preferable in games because it was either a standard or because it had been shown to produce better feedback experience from users. Either case, it seemed to make users happier than lower numbers of points. I have since been unable to find supportive evidence either way for the theory that inflating scores can keep the user engaged. Is this inflated point theory true? Where can I find more information and, particularly, some experimental data on different approaches and their effectiveness?


If I design a game that has both guns and melee weapons, how do I make them equally viable? I have a plan to make a 2D action platformer game, and I've started prototyping a bit in Godot 2D. My intention was to make the character fight with both guns and melee weapons, with gunplay like the Metal Slug series and melee mechanics akin to what's found in Dead Cells. The gun would be bound to the right mouse button as a secondary attack and the melee to the left mouse button as a primary attack , though I do plan on making it so that the player can switch their primary attack type. The gun used and the melee weapon would be different per character one would have a high caliber revolver and a greatsword, while another would have a high RoF assault rifle and a knife, for example. The basics, I get (right now I use a free game art sprite set, and I can use the frame number in the animation to fire a bullet or enable the melee attack hitbox). It's the balancing issues that got me stumped. I want to make both ranged and melee combat viable, or as close to equally viable. Though, with the existence of guns, I'm not sure anyone would want to use the characters' melee weapons. I know it's possible to make guns and melee weapons fulfill different functions, like guns only able to attack one target at a time (except shotguns) with varying fire rates, while most melee weapons are able to attack faster than guns but with a much shorter range, or able to attack multiple targets at once within its hitbox but much slower than guns. For example, make the melee weapon have a large hitbox and able to apply some non elemental Damage over Time but with low damage itself and, when charged, able to pull an enemy in front of the character , and the gun a quad barreled shotgun that delivers massive damage at close range but with long cooldown. Would that be a viable option to make both melee and guns equally viable, and are there other ways to do it?


Logarithmic spacing of FFT subbands I'm trying to do the examples within the GameDev.net Beat Detection article ( http archive.gamedev.net archive reference programming features beatdetection index.html ) I have no issue with performing a FFT and getting the frequency data and doing most of the article. I'm running into trouble though in the section 2.B, Enhancements and beat decision factors. in this section the author gives 3 equations numbered R10 R12 to be used to determine how many bins go into each subband R10 Linear increase of the width of the subband with its index R11 We can choose for example the width of the first subband R12 The sum of all the widths must not exceed 1024 He says the following in the article "Once you have equations (R11) and (R12) it is fairly easy to extract 'a' and 'b', and thus to find the law of the 'wi'. This calculus of 'a' and 'b' must be made manually and 'a' and 'b' defined as constants in the source indeed they do not vary during the song." However, I cannot seem to understand how these values are calculated...I'm probably missing something simple, but learning fourier analysis in a couple of weeks has left me Decimated in Mind and I cannot seem to see it.


Professional game design documents Possible Duplicate How should I structure a design document? I'm planning to apply for a game designer position at a big company. But the problem is, according to my CV, I'm not fit for being a game designer. (I'm a programmer). But, I don't like this and still would like to try my chances. Even though I'm a programmer, I have lots of ideas which I can put on paper in any detail depth imaginable. (It's not like "bro, I have this cool game idea in which you fly a spaceship and you see these scary monsters just like in ....", I can really make it professional). To be able to achieve this, I want to send a game design with my application, written in proper way, that will make it easy for them to accept me. Question is, what is the proper format for game design documents? Is there a template? What is the detail level? Where can I find a final game design document for a released professional game?


How would you code an AI engine to allow communication in any programming language? I developed a two player iPhone board game. Computer players (AI) can either be local (in the game code) or remote running on a server. In the 2nd case, both client and server code are coded in Lua. On the server the actual AI code is separate from the TCP socket code and coroutine code (which spawns a separate instance of AI for each connecting client). I want to be able to further isolate the AI code so that that part can be a module coded by anyone in their language of choice. How can I do this? What tecniques technology would enable communication between the Lua TCP socket coroutine code and the AI module?


Make a place or city feel crowded in procedural generated worlds I have thought about this while thinking about a game concept, but it should be applicable to many game types. Imagine an RPG or something else with an open world. Normally you would want to populate your world to make it feel alive and allow for interaction with NPCs in any form (talk, steal from, kill.. whatever). Now, what if you don't have the option to fill it with NPCs or similar. My example would be a procedural generated RPG world where you want to enter a house filled with people or even a city. It would be strange for none of the NPCs to talk to you. Another example might be a space station your ship is docking to. There might be only one or two NPCs you are able to talk to, but the space station could be steaming with other people, but you might not acces them somehow. Sure, one possibility would be to have procedural generate NPCs with random messages as well, but depending on the size of the city and or the amount of NPCs you would need a lot of NPCs with different messages. And then it would be easily possible to have to NPCs with identical messages. The other problem would be that you would end up with to many NPCs, that make the place feel overfilled instead of just crowded. I image that a hard number or relation for space to NPCs is impossible to pinpoint, but you surely get my point. So, my question is, what other possibilities are there to make a city place feel crowded? Maybe with NPCs, or maybe even without?


How to desing an RPG system with regard to PVP When you design a RPG system focused on PVE, one usually goes "mob of level X has Y hp and Z damage". How about when we do PVP with multiple classes? Lets say we go Diablo, so we have STR DEX INT VIT, how do you balance those between classes? Do I say I want a fight to last 10 rounds on average (lets assume its turn based) barb starts with 300 hp, demon hunter 250 hp, wizard 200 hp And now try to manipulate DPS health using stats skills so it matches the "10 round on average" by giving mage a mana shield an a lil bit more damage per fireball than barbarians melee attack? How would You approach this?


How can I find the valid words in a grid of characters? I am creating a game similar to Tetris, with two main differences the screen already begins filled with tiles (like in Puzzle Quest for Nintendo DS and PC) and each individual tile has a letter in it. The player's objective is to eliminate tiles by forming valid words with them. Words are formed by placing letters next to each other, in any direction, except diagonally. The player can move an entire row of tiles to the left or to the right or an entire column of tiles up or down, for as many spaces as he desires (if the movement of a row column surpasses the limits of the board, the letter that crosses the limit will "cycle", appearing at the other end of the row column). After the player's action, the game should check the entire board to look for valid words and remove the letters that form those words from the board. The letters above those that were removed will fall down in the place of those letters that were removed and new letters will drop from the top of the screen until the board is filled up again. I have already written a linear algorithm that, given a sequence of characters, determines if it is a valid english word. The problem I am having is how can I check for valid words on the board? Is brute force the only way? Testing all possible combinations from the board to see if they are valid is very slow, even for a small (5x5) board. Any help will be very appreciated, thanks!


Using the MVC pattern in games I saw a lot oft tutorials about the mvc pattern, but always it was only a small example Situation explained. There was always only one model, one controller and one view. But what if I have a lot oft models with complex logic, I cant put all the rendering code in one view and all the logic code in one controller. How I split all in smaller pieces, because the models logic depends in each other(for example collision). Know someone a good tutorial, or example game that explains this pattern in advanced games?


Things that make a game more interesting for kids What makes a game more interesting or fun to play for children ages 8 to 14 ? Does the age of the consumer play an important role in his her interest in the game? What can I put in a game to make it more fun, educational, and interesting to play?


Multiplayer matchmaking algorithm I'm building a game in which there are tournaments. During the tournaments we want players to play against each other in an efficient way. What I'm looking for is a generic algorithm that will match players together in an optimal way in order to Have the lowest amount of games possible Be reasonably sure that after all games are played, the highest ranked player is the best Tricky part Games can have 2, 3 or 4 players in a death match depending on the tournament. Tournaments have two or more players, no other constraints. Does such an algorithm exist? Note For the ranking, I will probably be using an ELO based algorithm (unless you have a better suggestion).


Endless runner player detect player drop Starting to learn write my first game using Corona Solar2d game engine. And have a very basic question on how do people handle a such this situation which I assume should be common to any game engine. I am trying to build an endless runner game, where I have an uneven terrain player have to jump between different height platforms while moving forward. Here is the closest to what I have in mind. https youtu.be qWz0vOywFdY How do I find if the player has fallen between the the two platforms while jumping ?


Game ideas for a platformer I have created a platformer which currently has the features listed below. I would greatly appreciate any further ideas which I could implement! (I don't play a lot of games which is why I require help) Walking jumping movement player can shoot lasers enemies also walk, fly, and shoot lasers water (you can swim in this) mud (slows you down on contact, and stops you from jumping) ladders damage when falling from a large height, unless falling into water moving platforms springboards (jumping on them shoot you into the air) growing platforms (allow you to reach new places) key and door system gem and coin collection system teleporting turrets


How to make a simple score system for my game? I'm making a simple game and I can't seem to impliment a simple score system. As the object moves 10 units forward the score should increase by 10. My issue is that when I turn the object around and move backwards the score decreases.


What is the best way to manage 'state' in Phaser? I have heard that this is not the best way to manage state in phaser var game new Phaser.Game(800, 600, Phaser.CANVAS,'YourGameName') game.state.add("Boot", Boot) game.state.add("Preload", Preload) game.state.add("MainMenu", mainMenu) game.state.add("Play", Play) game.state.add("GameOver", GameOver) game.state.start("Boot") so what is the best way to do it. I am newbie in Phaser game development.


What is an alternative to scratch damage to solve combat deadlocking? Scratch damage is a game mechanic whereby any successful attack always does some minimal amount of damage. This is often used in subtractive combat systems, where the defense is subtracted directly from the damage done by an attacker. Therefore, the target will always take some minimal damage. The downside of such a system, for me at least, is that it's a hack. It takes a simple formula like Damage Attack Defense and turns it into a (slightly) more complex one Damage max(Attack Defense, 1). I also feel that it detracts from a player's skill in developing their character etc. No matter how many defense bonuses they get, every attack will do some small damage. So why get your defense so high, if it won't mean anything? Furthermore, this now encourages the use of larger numbers for Hp and damage, so that the scratch damage is truly negligable. After all, if the minimum damage is 1, and you only have 10 Hp, that's still 10 of your health. Even with 20 Hp, that's 5 . And I would rather avoid using larger numbers like that unless it's absolutely necessary. However, there is one very important upside of scratch damage it solves the deadlock problem. Deadlock happens when neither side is able to do damage to the other. If you invest all of your resources into defense, and few into attack, then your character may not take damage, but they won't be able to deal very much either. Thus, you could come upon an encounter where neither side will be able to inflict damage, so battle continues forever. This is especially if you don't have random mechanics like critical hits (which I also hate). At least with scratch damage, someone will eventually win. It may only be the one with the most Hp or highest number of attacks, but the battle will end. So I like having a combat system where there will always be an outcome. But I don't like having scratch damage. What are my alternatives? Alternatives that don't involve rolling random numbers I want combat to be 100 deterministic. If the same battle is fought, the exact same outcome must happen. If you want specifics on the gameplay, think in terms of turn based combat, where battle can be automated (you design your forces, then pit them against others).


Setting up CCMenu for Cocos2d I am very new to Cocos2d programming and was thinking to build up my first app. I learnt some basics related to CCMenu and CCMenuItems. But I was wondering whether I could provide animations in such a way that every CCMenuItem would animate first and then appear in the CCMenu. Will that be possible in Cocos2d? Can I get some tutorials or samples regarding this? Thanks.


How to implement an experience system? I'm currently writing a small game that is based on earning experience when killing enemies. As usual, each level requires more experience gain than the level before, and on higher levels, killing enemies awards more experience. But I have a problem balancing this system. Are there any prebuilt algorithms that help to calculate how the experience curve required for each level should look like? And how much experience an average enemy on a specific level should provide?


Am I allowed to use a real life celebrity in a game? In previous questions many users asked whether or not an athlete can be used in a game. Yet the answer was no due to multiple copyright their images and names had. However anyone can use a politician's name and physical appearance due to the fact that they are "public figures" (example Obama). In this case, I want to use famous game developers such as Kojima and Gabe Newell in a game. Am I allowed to use them? or should I make references to them using distinct names (I.E. Lord Gaben). How can I find out whether or not a person is a "public figure" and if their appearance name is protected?.


Progression in a Sandbox Game (to xp or not to xp) I'd like to know the strengths and weaknesses of different progression methods through a game (or a part of a game), where they're suited best, and where they should never appear. I have several subsystems a player can progress through in a project I'm working on and I'd like to be able to work out if any of them would benefit from tallying xp. Not sure why this is on hold, I'm asking about the concrete merits of things not simply asking everyone for their favourite?? At the moment the player's character becomes more powerful by equipping better and better gear as they progress through randgen levels however they like, but are given clear indication that going in a particular direction will increase difficulty and the quality of items. I'm not sure in what circumstances I would add in xp for fighting monsters, or which I'd have the monsters drop good gear, or parts to make good gear out of. On top of that I have a magic system and a crafting system that I'm considering progressing though with xp but I wouldn't want to implement it if the side effects don't suit the rest of the game. As far as I know games usually progress in the following ways, often in combination Level by Level Like in old school Mario, you go through a sequence of levels which become more difficult and require you to master the basic techniques of game play. Power by Power You gain new abilities which makes it possible to access more and more difficult content. Metroid comes to mind for this. Xp Growth Your stats increase every level so you can fight the harder mobs in further content. You may or may not be able to choose where your stats go. Xp Talent Tree You get points to put into learning new skills, often from increasingly better pools of skills. Item by Item Equipment determines what content can be accessed next, either because the item unlocks something (including methods of transportation), or it increases player abilities such that they can survive certain areas. The distinct thing about items is that they can be removed from a player at pretty much any time. A grappling hook that can't be removed is a Power, not an Item. Quest by Quest Like Level by Level, only what triggers the newer content isn't getting to the end of a stage, it's the completing the requirements of a quest (explicitly stated or not). Zelda would be an example of a game that does both LbyL and QbyQ. Each dungeon is a level and between levels you have to do a bunch of little quests to unlock the next level. Score You just rack up points like in pinball, it doesn't really have an effect on the game. If you have a clear idea of the underlying purpose of these or others, I'd like to hear it! At the moment I only know that these systems exist, but only vaguely what they're for. As an aside, I'm also interested in your thoughts on how to display progression to a player. When is it best to give them numbers, if ever? Are visual demonstrable displays preferred for certain things? What is the function of doing it one way or another?


Conceptual question regarding Belief Desire Intent agent I've been researching the Belief Desire Intent model and the way they used it in the original Black and White Game(which is the same, but they also defined decision trees as opinions). I have a question about the distinction between opinion and belief. From what I understand, beliefs are linked lists in the form of attribute value. So let's say a tree would be something like Condition Inanimate Type Plant So let's say I try to apply the command cut on it and the npc cuts down the tree in like 2 turns, by doing 50 damage each turn. So the newly formed belief is that the hp of a that tree is more than 50. From what I understand, that this is now a newly formed belief, so the new belief about the tree would be Condition Inanimate Health 50 Type Plant What about the fact that the npc now knows it takes 2 turns to cut down the tree, is that now a newly formed belief or an opinion? If it's not, what kind of opinion could be formed out of that? Help from anyone who's dealt with this would be appreciated as I'm finding it hard to find open source code examples of this.


Repetition of move in Draughts game I am having a little problem in my draughts game. Lets say my red piece (moving through AI) has arrived at the border of black pieces and now it has become a king, lets assume it is at index 2. Now when its next AI's turn, this piece moves to index 5, thats ok. But on next turn it moves to index 2 and then this transition between index 2 and 5 continues in every turn. I can't figure out whats wrong. I have revised my generate moves() and it seems ok. Any idea what can be wrong? My evaluation function is as follows public double Evaluation(int type, int aBoard ) double reds, blacks, ret 0.0 int loop for(reds blacks loop 0 loop lt 32 loop ) switch(aBoard loop ) case 2 redKingType reds 1 case 0 redType reds 1 break case 3 blackKingType blacks 1 case 1 blackType blacks 1 break default break switch(type) case 0 redType case 2 redKingType if(reds 0) return 0.0 if(blacks 0) return 24.0 ret reds blacks return ret case 1 blackType case 3 blackKingType if(reds 0) return 24.0 if(blacks 0) return 0.0 ret blacks reds return ret default break return ret Note I know this a very simple evaluation function ,but please consider the fact that I am doing this for the first time, under a hard deadline.


How can I refactor "attack cooldown" into "attack speed"? I'm building a game where the player's character can attack bad guys and vice versa. I built this with the concept of an "attack cooldown" because I don't want units to be able to attack each other every single frame. I want there to be some delay between attacks. Here's roughly how it works if unit.ticksUntilAttack lt 0 unit.attack(target) unit.ticksUntilAttack unit.attackCooldown unit.ticksUntilAttack unit.ticksUntilAttack 1 I also have a page where I show the character's stats and list this as "Attack Cooldown". I was showing my friend and he said, "Why don't you rename that to 'Attack Speed'"? I explained that it's not really the speed at which you attack because "smaller is better". We both agreed that "attack speed" is a more standard way to show this concept and that I should change things the way he suggests. The problem for me is that "attack cooldown" is a much more intuitive way for me to program the solution. I'm wondering if there's some "trick" to refactoring the current code I've got. I'm thinking something like this if unit.attackSpeedAccumulator gt SUM NEEDED TO ATTACK a constant that's the same for every unit unit.attack(target) unit.attackSpeedAccumulator 0 unit.attackSpeedAccumulator unit.attackSpeedAccumulator unit.attackSpeed Is there a smarter way to do this?


How important is music to mobile phone (smart PDA) games? Specifically iPhone iTouch, Droids, and the new Windows Phone 7? I don't know how to quantify this, or if any research has been done. I am wondering how important the music is to the gaming and what of games come with music at all, if good music at that.


For my first 3D engine, should I go for one that is already made, or minimalistic? I've been meaning to transition from 2D games to 3D games for some time, now. I have the most experience with RTS games, so I will be doing that. On one hand, there's a lightweight renderer Irrlicht. However, considering it's a renderer and not a game engine (only basic collision, etc..) , I would have to write most of the things, myself. On the other hand, there's a full blown engine like CryEngine 3, for example. Although it is mostly complete, I would first need to understand the various parts of the engine and it's implementation enough to be able to try and transform it into an RTS engine. My question is, which would be easier for me to transition to?


What is "game state?" The terminology "game state" is a bit vague to me. Could anybody clarify what is included in the game state, please? Is it a state of all the variables and objects within the game at particular moment?


Why does my world generation code perform poorly on large inputs? I'm writing some code to procedurally generate some islands in real time. The idea is to choose some points for each chunk, and for each tile calculate the distance from those points, then combine it with a Perlin Noise to decide if it will be water or land. Anyway here's the code local function number() local n math.random() if n lt .4 then return 0 elseif n lt .8 then return 1 end return 2 end Just a custom weighted random function, used to choose how many points will be in each chunk. chunks setmetatable( , index function(tab, x) local xtab setmetatable( , index function(xtab, y) local xs, ys x 32, y 32 local islands for i 1, number() do islands i x math.random(xs, xs 31), y math.random(ys, ys 31), r math.random(16, 32) end xtab y islands return islands end ) tab x xtab return xtab end ) This block just initializes the chunks table, setting its metatable so that if a non existing chunk is being called, that chunk gets initialized by choosing a number of points the chunk will contain, and for each point choose its position inside the chunk and its range. However here's the buggy code function generatechunk(x, y) local xs, ys x 32, y 32 for xm xs, xs 31 do for ym ys, ys 31 do for xc x 1, x 1 do for yc y 1, y 1 do local points chunks xc yc for p 1, points do local po points p local d math.max(0, math.min(math.sqrt((po.x xm) 2 (po.y ym) 2) po.r, 1)) end end end end end end It isn't even completed yet. Basically what it should do is choosing for each tile if it will be sea or land by combining the Perlin Noise value and the influences of the points of the chunks around its chunk. But here's the bug if I call (for testing) generatechunk(n, n) for n lt 0, it executes in little to no time. But as n increases I get results of about n seconds of execution. Why is it?


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?


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.


Realistic planetary terrain generation with weights I need terrain generation for a planet. The planet will be divided up into several hundred hexes, and I need it to be realistic and based on weights. I have dabbled in terrain generation before, but nothing like this. So I figure it would be a good idea to ask the community for answers, recommended articles or the like. By realistic, I mean not just random hexes, but continent shaped things with a few islands. More desert around the equator and more ice around the poles. I also have two weights I need to base it around ice percentage and water percentage. That means that around XX of the planet will need to be water. Does anyone have any advice or places to start? Generating arbitrary terrain is easy, but something a bit more "organic" like this seems rather difficult. It also needs to be seamless. Should be obvious since it's a planet, but no harm in pointing it out.


Procedurally generating non tile based top down 2d game worlds I ve been fascinated by procedural generation for over two years now. I have played around with many types of noise generation and even wrote some myself. I ve been looking into water erosion and procedurally generated biomes and during this time I ve managed to build some nifty little map generators. Something that has always escaped me, however was generating a procedural map that is not tile based . So far, all the procedural map generators I have built relied on one axiom the map is represented as a 2d matrix containing some sort of information about the terrain that is to be found there. This means that I, by definition, can t build anything that is not tile based. And this is why I come here asking for your help. I am curious about how one could render a procedurally generated map in a non tile based fashion. My end result is the image I posted. The solution that immediately jumped to my mind is drawing each end every pixel individually, thus making the map look essentially non tile based. This, however would require enormous memory and is unfeasible. So I am turning to the masters how can I procedurally generate (and more importantly render) such a map? How would I go about representing the sprites to be drawn? Where do I even get started? This feat is so much out of my grasp that I do not even understand where I should be looking Note I know about marching squares and wang tiles. These approaches are however not something I m fond of because of the huge workload that would go into drawing the resources. I am looking for something more in the realm of algorithms Thank you!


Letter game board creation I currently have a game concept similar to the mobile app Alphabetty where you are given a grid of letters and are tasked with spelling words. When you use a letter in a word, it disappears and new letters fall in from the top to replace the used ones. I have been playing around with ways of making the new letter spawning more "interesting" so that players can get more complex words. I tried making it so each letter spawns based on how common it is, kind of like scrabble but didn't get great results. I have also tried representing each grid tile as a Boggle die which re rolls each time its used, which was better but far from perfect. The main issues are Vowels and consonants often end up grouped together, creating unusable areas on the board. This also goes for letters of the same type (i.e. 3 s letters side by side) With Boggle dice it's very hard to spell words like "Blizzard" as only 1 or 2 dice have rare letters such as z, v, and k etc For the sake of a game mode, I need to be able to seed the grid with words of my choosing slowly (i.e. as new letters fall in) so that players have the ability to spell these special words if they are particularly careful Are there any solutions, theories or discussions out there that could help? Thanks!


2d Procedural universe generation I want to create a flat universe, where at first the whole universe is blank. That would be represented by a parallax scrolling nebula background image. What I want to do is represent the planets as disc shaped objects in the universe. They can be of various sizes. The inside of the discs will consist of a landmass, then outside that will be a body of water and after that air. what would be the best way to go about creating those tiles procedurally as for example the air would consist of various gases and the land of various minerals and resources. My first thought is to create texture images and then stamp out the circles out of those textures, but problem is that those textures would have to wrap horizontal and vertically. Is there a fully procedural way of doing this?


How can I simulate a randomly generated universe? Possible Duplicate How to generate a universe? Were would I start looking if I wanted to develop an engine to simulate space at random. Things like black holes, galaxies at distance and moving stars, asteroids and so on? I would like to know if anyone has some good tips for this, or if there is some information online?


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?


Workflow for creating spherical heightmaps I'm wondering how I can create a spherical heightmap. In my ideal workflow, you'd see a 3D sphere that you can edit using procedural terrain techniques (like World Creator) and that spherical terrain can be exported into six seamless images based on what layout you want your images to fold up into a cube in game to create your planet. Another option would be if you can at least tell the program you want specific images to tile with other images, such as the designated 'front, right, back, left' images tile with each other and the 'up, down' images seamlessly. Specifically, I'm making planets for a game that wraps six images into a cube and 'inflates' them into a planetary terrain. I've made a few basic heightmap sets in a program called Scape, and flipped them so at least four of the images mirror each other, then I edited the interior of those maps to all be different so the landscape isn't repetitive. However, manually editing the top and bottom maps is very daunting to get perfect, and I'm creating a dozen or more planets. I'd like to know how to make 'front, right, back, left' images tile with 'up and down' images and I can edit the interiors of the images in a 3D program of choice. I've been directed to this site from search queries many times, but I'm a newbie to all things code so I have no clue how to use things such as the Diamond Square method or any algorithms to achieve seamless textures (what program do you actually use, literally a python script you write in Notepad or something?).


How to make more jagged terrain I need some help with some terrain I'm working on. I'm developing a plugin for Minecraft, but these concepts will apply to any game with terrain. I am using Simplex noise to generate cavern like terrain. I am using the power of the noise to generate hills that look like this As you can probably tell, it inst looking very cavern like. What can I do to improve this terrain?


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.


What GPU culling techniques are appropriate for voxel spheres other than octrees? I'm creating a dynamic smooth voxel based world in the shape of a sphere. Right now my current approach is to spherize a cube, generate voxel terrain on each of the six patches, and then use octrees to cull the data further. Octree's are best served with cubes. Is there a better system for storing accessing data in a sphere? I've heard some talk of Octree's not being the best way to store voxel data, even for cube worlds. How can this be? What would be better? A Hash Table? Surely multidimensional arrays wouldn't be faster? Perhaps it's just more of a design decision than performance? As in, maybe someone didn't like chunks popping in so they would rather load individual rows and columns? If it matters, I'm probably going to keep relevant geometry in GPU memory and stream in the surrounding area over time as the player gets closer to it from main memory. I bring this up because I'm really not sure if GPU memory benefits from any particular structure. All I really know is that the parallel powers of the GPU are, well, unparalleled (I had to). How can I tap into that?


Which parts to draw in an infinite world? I have an infinite world (from Perlin Noise). The world is generated in sectors that are that are big cubes (each with a random colour, in the image above my sectors are 10x10x10). I'm currently putting the sectors in a hash table tagged by their top left front corner coordinate. I can loop through all the sectors I've already generated and see if they intersect the frustum. But how can I compute instead the sectors that I haven't generated but are visible and need generating on demand? Even if I have an octree or some other spatial index, I need to compute the sectors that are visible inside the frustum rather than those I've already generated.


uv tiling and offset for uvs not min max 0 1 For the purpose of the question, a unit 1 meter. So, I have a triangle strip that is 4x8 meters (for argument's sake it is procedurally generated by player). I also have a texture which is 512x512px. For normal UV mapping, I just make U 0 or 1 (depending on the side of the strip), and I make V a value normalized between 0 and 1, based on the distance "traveled" along the strip. Then I set tiling based on the distance, and the texture. In this case, the tiling would be 2 along Y, since the texture is a square. I am having trouble dealing with a scenario where I do NOT use UV 0 to 1 though. I only want to sample the "middle" of the texture,. such that the min max of the UV coords are 0.0x0.25 to 1.0x0.75. When I try to make this work, I notice that as I lay my strip (done by player in game mesh updates continually during placement), the texture moves along the strip. I figure I need to adjust the offset, but I am having difficulty figuring out the formula to use to determine what the offset should be based on the tiling (which in turn is based on the length of the strip). when the tiling is 1, there is no problem with the offset (0). A tiling of 3 is also correct with no offset. Same for tiling 5, 7, etc. Odd numbers basically. When the tiling is an even number though, or a fractional number, offset 0 no longer works. On top of that, the needed offset seems to change based on the tiling. How would one go about calculating this? In addition, if I lay two of these strips end to end, and I want the texture to be continuous how would one calculate the offset based on the tiling offset of the previous strip behind it?


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.


How to display procedurally created rooms as a schematic map? In most games, a map can be generated by essentially doing a "top down" view of the specific area. This will accurately show the size and positioning of any rooms, as well as how they connect.There might be special icons for stairs, doors, etc. In a game I am working on I am intentionally keeping some concepts rather loose. The map is not there so much to display distance between rooms or the relative size of rooms between each other, but just to most clearly show the connections between the rooms. The easiest real life example I can show is an electronic schematic. Now, I only know some of the symbols on there, but in this case you might just substitute them for various rooms. You can easily imagine then that this layout could have many actual physical representations. A connection could be a door, but it could also be stairs or even an abstract "border" between two regions. I currently generate "rooms", without size or even position. I then assign them connections. Not exactly "random" connections but I am still playing with the generation so I don't have any hard rules at this time. The task I am having a difficult time with is How do I take these rooms with connections and arrange them in such a way to maximize clarity of which rooms connect to which?


Quad sphere subdivision algorithm I like to generate some planets like Kerbal Space Program does. By some videos of the developers I know that they use a quadsphere, which consists of six entities as a minimum. These are all plane meshes, which get subdivided the closer you get. This allows a ground to orbit level of detail. However, I have some problems understanding this subdivision algorithm Since I have six separate meshes, how do I know where I have to subdivide them, if they are all separate? If I always just subdivide the quad the camera is over and I end up with something like this even though I want something like . So how can I ensure a sense full 2 1 subdivision with neighbour quads?


Derivatives usage in FBM core So I learned now about derivatives and fbm, but can not figure out the effect of this code example (credits https www.iquilezles.org www articles morenoise morenoise.htm, bottom of page) const mat2 m mat2(0.8, 0.6,0.6,0.8) float terrain( in vec2 p ) float a 0.0 float b 1.0 vec2 d vec2(0.0) for( int i 0 i lt 15 i ) vec3 n noised(p) d n.yz a b n.x (1.0 dot(d,d)) b 0.5 p m p 2.0 return a What effect does (1.0 dot(d,d))? As the slope is more it flattens the fbm sum?


Rule based procedural terrain generation How one generates procedural terrain is pretty straight forward. But once you setup your terrain you don't really have a fine level of control where which details will go. One solution I can think of is to store rules as functions, i.e. Square, circle, etc., which will override rules in the area. For example, in mountains terrain we could place a function which will make them flat or terraced. What I have trouble figuring out is how to store those functions (assuming terrains can be in principle infinite or at least planetary scale). Should they be placed within existing coordinate system, or stored locally to terrain ? I seen something like that done in Star Wars Galaxies, but it's really hard to find any details about implementation of system.


How can we generate 3D architecture in a racing game's background procedurally with respect similar to the real world? In the last few days, I jumped into searching is there a conventional convenient way to build 3D architecture quickly, most likely by some accessory software like CityEngine, BIGEMAP, or google maps' Maps SDK for Unity. However, I couldn't figure out the most suitable solution that typically suits the requirement of quot generate 3D architecture models by the racing road which is referencing the real world map quot , or just simply quot build a massive amount of 3D architecture models quot , efficiently and handily. I want to achieve buildings similar to those seen in Need For Speed and Asphalt. Their buildings in the scene are quite outstanding to me. How can I generate buildings similar to this?


Generating a town layout in a grid I want to generate a town layout in a square grid (rendered isometrically, but that doesn't matter) using the following elements 2x2 Houses Roads, 1 unit wide Canals, 1 unit wide Sample layout I always have a specific number of houses, and as many roads and canals as necessary to connect them all. The houses need to have two pieces of road in front of their front door (which is always pointing to the right) It would be nice to have fields of grass (emptiness) inbetween. Is there a ready made algorithm for this? If not, what direction should I be thinking of to implement this?


How can you use Fractals to perturb an image? I've been playing around with Procedurally Generated World. I've so far managed to create the Height Map, and a translate map, but now i'm attempting to create Caves, The main idea is to use another Noise map, with values being either 0 or 1, and multiply it with the Height Map. I've managed to achieve this This is currently described with a float Width, Height , which has value 0 for those points (x,y) such that (x,y) is black, or 1, for those which (x,y) is white. I want to apply some fractal to this to achieve this However, i have no idea how to do this! (I also apologize for any grammatical errors. I haven't slept in like 18 hours and i can't think straight)


How can I generate an infinite procedural road? I'm currently trying to make a game where the player races others along an infinite, more or less straight, road. By "more or less straight", I mean that the road goes straight ahead (the player can't turn their vehicle to face left or right), but there are bends in the road for them to pass through, as if they were switching from one lane to another on a highway. There will also be different "areas" to race through (all on the same road), for example, deserts, jungles and over water. And, finally, there will be gaps in the road for the player to jump over, as well as checkpoints every so often. Starting with a seed, how can I generate the road ahead of the player as they race? I can't generate the entire road in advance (obviously), but each player needs to see the same thing at the same places along the track. How can I do this?


Where can I find code examples of different variations of Perlin noise? I have seen the PCG wiki, and it is a great resource. But a lot of the articles are very brief and it is hard to find good links on specific things. I have been searching for ways to transform my Perlin noise height maps to make ridges, rivers, and other terrain features. I also can't find any articles on how to divide up the map into different areas for calculating texture coordinates or other values specific to the game. I have only been able to find websites detailing their software that can generate the different things, but no code or explanations. Are there any good sources of code examples explanations on how to do the above mentioned with Perlin noise? PS. This should probably be a community wiki. I don't know how to make it as one though.


Generate next chunk with perlin noise I'm actually trying to generate a level with procedural generation using perlin noise. So one chunk has a size of 30x30, it's a float 2d array and at first I'm filling it with values between 0 and 1. Next step is to calculate 7 octaves and merge them. In the end I normalize the values. All this works quiet well if I only want to create one chunk but how can I create one more chunk beside my first so that they fit together smoothly?


How can I randomly generate achievements? Novice programmer here. To challenge my self i want to create an achievement system that randomly generates achievements for me based on a set of trackable metrics within my game. To keep it as abstract as possible my game is a turn based highscore chaser. Each game has 13 turns. Each turn consists of placing 4 tiles, each tile can have an individual score which together form the turn score. There are 5 different tile types that can be individually combined to raise each tile's score differently. Each turn one of the 5 tiles gets a bonus making it worth double points. Also in each turn you can form "hands" similar to poker where for example two tiles of the same type next to each other are a pair, which nets a hand bonus for individual turns. Here's what my generated achievements should look like Get a turn score of 15 and create a pair using tile type x. Create a tile type y that has 5 points. Create 5 hands of type x and use tile type x or y. Get a total score of 50 without creating more than 3 hands of type x. Obviously this seems kind of complicated and i'm kind of asking myself how to create such "complex" achievements. Seems like i need to establish some kind of syntax that i can feed the system to produce these kinds of requirements. But i'm kind of stuck since i couldn't find any info on this issue yet. Maybe you have done something similar?


Procedural generation of jagged peaks I would like to generate random cave type backgrounds similar to the one shown below. I doubt anything I generate will look as good as the image, but something with that feel of sharp, jagged peak should be possible. I don't have any experience in procedural generation and as such have no idea where to start.... Note I am using libGdx on Android


Manipulating Perlin Noise I've been learning about Procedurally Generated Content lately (in particular, Perlin noise). Perlin noise works great for making things like landscapes, height maps, and stuff like that. But now I am trying to generate structures more like mountain ranges (in 2D, as 3D would be way over my head right now) or underground veins of ores. I can't manage to manipulate Perlin Noise to do this. Making a cut off point (i.e. using only the tops of the 'mountains' of a heightmap) wouldn't work, because I would get lumps of mountains veins. Any suggestions? Thanks, Numeri


Domain warping with Perlin noise I'm trying to achieve the effect from https www.iquilezles.org www articles warp warp.htm with no success. Here is the experiment http jsfiddle.net fro5y0jm 15 with canvas. Any ideas?


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


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?


Procedural terrain generation is very slow I've been trying to create procedural generated 2d terrain (similar to a game like Terraria) using Simplex noise. I was able to get the noise function working, and I set up a grid of 16 by 16 tiles that uses the noise to generate the height of the terrain. The problem is that the grid generation is rather slow. I often need to wait 5 10 seconds for a somewhat small grid to generate. My code looks like this var level height of the terrain generate simplex octaves2D( largestfeature, persistance, seed) generate octaves using largestfeature for (var gy 0 gy lt global. gridheight gy ) for (var gx 0 gx lt global. gridwidth gx ) level (global. gridheight div 2) (100 get noise2D(gx 100, gy 100, octaves, frequencys, amplitudes)) get noise value at point (gx 100, gy 100) if (gy gt level) if below level global. testgrid gx,gy TILE FULL set grid position to a full tile else global. testgrid gx,gy VOID set grid position to an empty tile if (global. testgrid gx,gy TILE FULL) tilemap set(global.testmap, 1, gx, gy) This creates terrain that looks fine, it's just too slow. I want to be able to generate terrain in real time to create an infinite landscape. After doing some research, I found that I could maybe use a compute shader to have the GPU help speed up the generation, but I am not sure how to implement a compute shader in my case. Would I calculate the noise in a shader, or generate a noise map using one? Or do something else to generate the terrain faster?


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))


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?


Biome Transition in a Grid Borderless World I have a universe a list of "Systems", each with their own center, type and radius. A small part of such a universe could look like this Systems Can be very close to a different system, e.g. overlap Can be inside another, much bigger system Can be very far away from any other systems Spawn system specific entities and particles inside the system radius Have some properties like background color So far so good. However, the player can fly around freely, inside and outside of systems, in real time. How do I interpolate and determine things like the background color now, depending on camera position? E.g. if you are halfway between a green and a red system you should see a background halfway between red and green, or if you are inside a lilac system near the center and at the border of a green system you should get a mostly lilac background etc.


Which parts to draw in an infinite world? I have an infinite world (from Perlin Noise). The world is generated in sectors that are that are big cubes (each with a random colour, in the image above my sectors are 10x10x10). I'm currently putting the sectors in a hash table tagged by their top left front corner coordinate. I can loop through all the sectors I've already generated and see if they intersect the frustum. But how can I compute instead the sectors that I haven't generated but are visible and need generating on demand? Even if I have an octree or some other spatial index, I need to compute the sectors that are visible inside the frustum rather than those I've already generated.


Continents with Simplex noise How do I turn Simplex noise like into something like or The noise has too many white spots and varies too much to represent things like continents. Where it's water, water, water, and then land with cut out edges.


What is the difference between dynamic generation and procedural generation ? When I think of a dynamically generated game, I think of things like Diablo with randomly generated levels. When I think of a procedurally generated game, I think of things like Flappy Bird and other infinite runners. But both of these just randomize a level. Is it that procedurally generated games are constantly being generated and dynamically generated games are all generated up front? Or are these terms interchangeable? What is the difference between a dynamically generated game and a procedurally generated game?


What are some ideal algorithms for Rogue like 2D dungeon generation? What are some good resources regarding procedural content generation in the context of dungeon generation? Closest article I could find was Algorithm for generating a 2d maze, which isn't quite what I'm looking for. Features, such as rooms and connected hallways, are ideal. Thanks!


Procedural terrain generation in cylindrical (2D) world I'm fairly new to procedural terrain generation. I know that to generate terrain you would use different calculations with the x and y axis (also z if you have one). But what if you want to generated random terrain on a 2D world that loops around itself? By that I mean a world in which you enter the right side upon leaving the left side (or the other way around). It should also be generated on the fly and not all at once. One solution I can think of is to just generate ocean along the border, but that is not what I'm looking for. I also seem to remember that Civilization generated such types of worlds, but I'm not quite sure how that worked, it's been quite some time since I played that game. So how exactly can one generate such a continuous world?


3D terrain generation with overhangs caves 3D terrain with 2D noise function as heightmap is kind of 'easy'. Make a plane and adjust height based on the noise. How would one start working on 3D terrain with overhangs caves? There are some older topics (for example related to Minecraft) on the thema, but non of them cover overhangs and in general techniques that can be applied to heightmap generated terrain.


How to decompose a rectangular shape in a Voronoi diagram, only generating convex shapes? I think this is a very straighforward question, lets say i have a building in 2D, a rectangle shape. Now i want to decompose that area in a lot of convex shapes, as seen in a voronoi diagram, or closely like it, just so I can add those shapes to the physics engine, and have a realistic destruction. Bonus Possible suggestions on how to make the effect more dynamic and interesting. Please keep in mind we re talking about realtime calculations..


What is the state of the art in procedural character animations? I'm a programmer and I'm interested in programmatic character animation walking or running, bipedal or many legged what is the state of the art today? I heard about NaturalMotion's Euphoria system and Ubisoft's IK Rig, and they look amazing. Where can I find more info about similar algorithms?


How does a game like Minecraft generate new chunks in realtime? I imagine looping through all 65,536 blocks with a noise function to set their type would be very slow. And Minecraft usually generates a ton of chunks at once. I read in one source online that Minecraft creates a column of 16x16x16 chunks, although I can't find any more information on that subject, and that doesn't really change how many blocks there are in one chunk "column". I assume there are optimizations made to make it work, although I can't find much about this subject online. Edit The way I am generating chunks in my own (2D) game is by looping through a 16x16 array using a Perlin Noise function for every chunk. With 16x16 chunks it runs fine in realtime. I want the chunks to be 3600 tiles high, and changing the size to be 16x3600 runs very slowly.


procedurally combine a main character with weapons during animations I need to find a way to programmatically place weapons for main character in right position of his body. For example if I am using UMA to procedurally create humans and then use some pre existing models of guns (10 20) of them. Now I need to find a way to place them correctly in the hand positions of the human model. I will use mixamo or IK to apply animations on the human character. But is there any way to programmatically place the objects in the right positions? Probably by marking some joints? I am looking at some efficient approach to begin with on this.


Perlin noise terrain 3 coordinates from one I am making a game with procedural terrain, like minecraft. I have a perlin noise function which takes one integer and returns a number between zero and one. However, for terrain, I need a single density value from three coordinates x, y and z. But my noise function only takes one number. Should I take the average of the noise values for x, y and z for a single density value? Or something else?


Linear interpolation reach moving destination regardless its speed I'm implementing a camera for a game and I'm using the LERP formula for smooth chasing. However, if the target moves fast enough, the camera can never reach it unless the t ((1 t) v0 t v1) value is high enough, but that is exactly the problem some targets might still move faster than the current t value. This might lead to 2 problems The camera will never reach the object if it's super fast The camera will very slowly reach the object, depending on its current speed How do I scale up my t when the delta distance (abs(v1 v0)) gets lower, so that the camera will starts at a slow chasing rate and increases as it gets closer (therefore no targets could run away)?


Setup golf ball physics I am developing a simple Golf game as shown in the below image. I am facing below issues Even if I apply small amount of force, the ball continuous move along the grass? Grass friction is not stopping the ball. Sometimes, the ball speed is increased after colliding with the walls instead the ball speed should decreased after collision with the walls. The walls are having box collider. Sometimes, the ball reverses its direction after colliding with walls. Code Physics properties of the ball ball.physicsBody.affectedByGravity true ball.physicsBody.mass 0.0450 ball.physicsBody.restitution 0.8 ball.physicsBody.friction 0.3 ball.physicsBody.allowsResting true Physics properties of the grass golf.physicsBody.friction 0.8 Physics properties of the walls leftWall.physicsBody.friction 0 leftWall.physicsBody.restitution 0.8 I have set the physics world gravity value to 9.8. I am looking for suggestions to fix the above listed issue. Thank you.


SpriteKit How to jump to specific position? I'm would like to achieve something like Object A will jump to position A in parabolic way. For example I am able to make the object jump but i do not know how to calculate to make the object jump to the precise location.


Infinite ball bouncing problem (Unity) I am trying to develop a basic Breakout game using this tutorial using Unity 5. But the ball starts to bouncing infinitely very easily. I cannot understand why this happenes. In my physics knowledge starting an infinite bounce is very hard, and even impossible. To return the ball to same position after bouncing we must send the ball with zero degrees with the vertical axis. To send the ball with zero degrees with vertical axis we must receive the ball with zero degrees with the vertical axis. To receive the ball with zero degrees with the vertical axis we must send the ball with zero degrees, and so on. We can send a ball with zero degrees only in initial ball throw. In all the other cases there must be an angle which is not equal to zero. Am I wrong? I mean the ball does not change its rotation. Ball moves between two plates which are parallel to each other infinitely (for example between paddle and upper wall) I added physics material to ball, paddle and the walls. This material has following settings Dynamic friction 0 Static friction 0 Bounceness 1 Settings of the ball Mass 0.5 Drag 0 Angular Drag 0 Is Kinematic true (I changed to false just before firing) Use Gravity false Settings of the paddle Mass 0.5 Drag 0 Angular Drag 0 Is Kinematic true Use Gravity false


How do I determine the slope of a curve? I am making a 2D game where the character rides on the curve of a graph. I need to find out whether the player is going uphill or downhill and calculate speed accordingly. The problem is that I am not sure how to determine the slope of the curve on the point that the character is at. Here is an example of what some of the curves look like


gamemaker getting a ball to bounce 90 degrees off of a 45 angle I am trying to get a circle to bounce off a 45 degree diamond shap using Gamemaker Studio. I would like the ball to bounce in straight lines so my directions would be 0, 90, 180, or 270 degrees, depending on which side of the diamond the collision takes place. Precise bouncing is giving me all sorts of results so I think I would have to do it in code. I tried saying if (direction 0 amp amp direction lt 90) direction 90 And doing this for all the angles, but this did not work. Has anyone encountered this before?