A set of rules that govern an in-game experience. Game design is an effort to come up with game mechanics that allow for players to have a fun and engaging experience.

learn more… | top users | synonyms

0
votes
0answers
1 view

How can i call a thing a lot of times

Hey I am new to coding and i want to know how to get the same thing to hapen until i "say" stop. The game is that you need to dodge stuff that is falling, i was thinking that i could use a while loop ...
12
votes
4answers
2k views

Games where the story continues via progeny [closed]

In Phantasy Star III: Generations of Doom for the Sega Genesis you periodically marry and then the story carries on through your sons/daughters. In Rogue Legacy when you die you again play on through ...
1
vote
0answers
29 views

“following” Object not Interacting with the game world correctly

So I finally have my object detecting the distance between itself and the player. If within range, the following enemy will chase the player down and touch it. (This will kill the player) However, ...
0
votes
1answer
31 views

“Following” Object is acting Strangely?

So I recently designed an enemy that will follow the player when he comes within a certain distance of the object. However, there are times when the player comes in range, only for the "follower" ...
4
votes
2answers
101 views

Decoupling input from game states / entity behavior

I'm looking for a way or general best practice advices for decoupling the architecture of my game, in the example below the input from the current game state workflow / entity behavior. While I'm all ...
2
votes
1answer
107 views

Is flowchart correct way to visualize gameplay?

I made the following flowchart in draw.io. it's just a simple arcade shooter. cardboard zombie pops up, bang, or not. I don't have any official education in game production. So, are there other ...
5
votes
2answers
141 views

RPG Factions - Friendly/Hostile check

I'm having some trouble checking if one faction is hostile to another faction in my RPG. I'm using enums for my factions and relations but I feel like there's a better way to approach this. Currently ...
1
vote
0answers
65 views

Should I compute impact damage with energy or momentum?

My game uses physics (Box2D in particular). Just about every object in the game can be destroyed, and the primary method of combat is by slamming objects into one another at high speed. It makes ...
1
vote
1answer
198 views

How Can I Find a Shape on 2D Array?

For the code in my test project, I want to find 2D[,] array shape on the char[][] list. I created an actual map with 'char[][]' array. So, how can I find a tileChar's shape on the worldChar array? ...
-1
votes
1answer
41 views

How are pocket dimensions created in multiplayer games? (programming aspect) [closed]

How do multiplayer games deal with multiple instances/dungeons/regions? I'm familiar with server clustering which is what larger games use such as Eve and World of Warcraft. How do games such as ...
24
votes
8answers
4k views

What makes a good jump scare?

I am working on a game and would like to include a few jump scares. So here is a rather simple question — What makes a good jump scare and when and how should they happen?
2
votes
2answers
54 views

Should I be returning weak/shared_ptrs or unique_ptr's to my resources?

A friend of mine told me instead of normal pointers, I should use unique_ptr, i asked him why unique_ptr's if some resources are going to be shares, like multiple grass tiles, or enemies. I currently ...
0
votes
1answer
50 views

How to Implement a Timer for my Prefab for Roll-a-Ball Game (C# in Unity)

I am trying to create a public float timer that senses when the particular prefab has not been there for a certain amount of time. Then, it will replace that particular object. The goal is to ...
6
votes
1answer
163 views

Orbital mechanics: orbit as a function of time. Universal variable formulation?

I am trying to model a two dimensional orbit for a two body Kepler problem but have gotten stuck when introducing the time variable. For a satellite with known semi major axis (a), eccentricity (e), ...
1
vote
1answer
45 views

Click counting and actions based off count

So I have a button that is the 'mine' for my incremental game. I would like to track the number of times that it is clicked and be able to do two things: Have events happen say every 5 clicks. ...
-1
votes
2answers
92 views

How to model an Attack( ) action? How to model combat? In general, how objects communicate?

I never understood how would you elegantly describe two people talking in OO. I think this question extends to how similar objects communicate in general. I am designing a game now and Units have to ...
1
vote
0answers
43 views

How can I detect sprite collisions out of screen?

I am creating an Android game using andEngine library. I have enemies coming from out of the screen into the screen. I already know how to detect collisions, but is there any method I can use to ...
1
vote
2answers
84 views

How can I exclude my enemies from spawning in certain zones generated at random?

I have a code where I randomly generate enemy spawn position, but I want to exclude some areas since it's colliding with some sprites it shouldn't collide with. This is the code where I generate the ...
2
votes
0answers
70 views

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 ...
2
votes
0answers
115 views

More realistic currency for spaceship battle game [closed]

This is slightly related to real development but as you know hardest thing to do for developer is naming things. So now I can't figure out what specific currency to use in my spaceship battle game. ...
3
votes
1answer
58 views

Setting 4 different enemy spawn zones off screen

This is my first game, so I really appreciate all the help. I want to create four enemy spawn zones for enemies and this areas are off screen. The enemies are coming from left, right, up and down, ...
2
votes
2answers
91 views

Algorithm for spending x points on y things divided by n people

I'm trying to devise an algorithm to spend a given amount of points on a randomly generated list of items each with their own cost in a way that results in having a number of items that is divisible ...
3
votes
2answers
592 views

Implementing a 4x4 Game Board

I struggle with efficiency in code, and I want to start my game off on the right foot. I have a game that I'm making a 4 x 4 map of 'tiles' that a user can build their 'town' on. To keep track of ...
0
votes
2answers
184 views

Why do FPS games often automatically reload? [closed]

Was pointed here by Arqade's Meta On every first-person-shooter game I've played I've noticed that the 'automatically reload when empty' game mechanic is always used: I've always found it ...
0
votes
2answers
119 views

Game Mechanics Suitable for a Game about Issues of Immigrations [closed]

So, I'm working on a video game design concept, dealing with the problems of an immigrant family and how they will try to blend in the society. The universe is a fictional universe. I was wondering ...
1
vote
1answer
55 views

Calculating ln (natural logarithm) in games

I am developing a game for tablets using the Marmalade SDK and Cocos 2dX. In my game I have implemented a separation steering behavior in order to keep some of my characters separated from eachother. ...
0
votes
1answer
67 views

How do I create a playing field of collapsing bubbles, as in Tsum Tsum?

Tsum Tsum App is a pretty interesting game and I am wondering how the main play area's data structure is, erm, structured? Characters are stacked, disappear as the player swipes over matching ones, ...
4
votes
2answers
280 views

What would a good hacking gameplay look/feel like?

In real life, 'hacking' (that is, using brute-force attacks to guess a password) is not very interactive. In fact, it works pretty much independent of any user from the moment you press Return until ...
4
votes
3answers
146 views

Game Design - Challenging a player in an RPG-like game without removing easy cards

I'm designing a card game that I'm implementing on the computer that mirrors some gameplay aspects of dungeon crawlers and RPGs. The player's object is to survive as long as possible from the ...
17
votes
2answers
2k views

How to design context menus based on whatever the object is?

I'm looking for a solution for a "Right Click Options" behaviour. Basically any and every item in a game, when right clicked, can display a set of options based on whatever the object is. Right ...
0
votes
1answer
15 views

libgdx: 2nd var of myClass()'s values saving to/overriding 1st var of myClass()

I'm using libgdx with Eclipse. PROBLEM: In the class inputHandler I have a list of buttons, menuButtons, composed of 2 buttons: playButton and retryButton. They both belong to the class ...
-1
votes
2answers
38 views

Before I change position I want to check if the gameobjects are collinding

For starters I'm new to Unity3d. So my question is when I click on an object I want to change its position but without collinding with the other objects and I need a function to check that. I already ...
0
votes
0answers
55 views

Goal keeper AI with animation

I'm working on football simulation game. I am trying to implement Goal keeper AI. I did calculated ball trajectory and intersect point. I wanted to Goal keeper to dive to the interaction point and ...
6
votes
2answers
610 views

How to create rope?

I'd like to re-create this game, but I have no idea how to create the rope, or its influences on the ball. Basically, there is a rope, "attached", at one end, to the mouse pointer, and at the other ...
4
votes
1answer
172 views

How can I show slow motion?

In my very, very simple 2D game I'm working on, I'd like there to be moments of slo-mo. What is the best method of showing the player that the game is currently in slow-motion? As in, what is the ...
4
votes
1answer
129 views

Dialog/event system in Java/libGDX

I hope that I'm posting this correctly as I'm new to the site, feel free to correct me if I'm in the wrong spot. As for my issue: I'm working on an 2D side-scrolling platformer game in libGDX, and ...
0
votes
1answer
30 views

Using Similar Mechanic Names For Attributes

I am working on a pen and paper game and I am wanting to use three core attributes that everything else is based off of. These three attributes being Physique, Skill and Will. However, if you're ...
2
votes
1answer
63 views

Approximating strength and hardness of alloys

I do not have any formal education in metallurgy, but I am trying to make a game mechanic based on it. I need to be able to alloy together different metals and alloyable materials such as carbon in ...
1
vote
0answers
81 views

How to add 3D Sprite on tmx file background using Cocos-2dx?

We have been working on sample game, wherein we want to show 3D sprite on .tmx file(background). But 3D sprite is never shown up, though we tried setting tileMap->setGlobalZOrder(-1). Following is ...
0
votes
0answers
34 views

Implement Special Effects triggered at certain moments in game

In my turn based RPG/Puzzle game I planned to have different Special effects, which enemies, weapons and armory can have. So for example an enemy can have a "poison" effect, which has a certain ...
2
votes
1answer
45 views

Detecting possible moves in a swap-match game

I've been coming up with ideas for how I would go about programming a Bejeweled-like minigame. After some deep thought, I've managed to figure out how to detect matches (including special bonus cases ...
0
votes
1answer
90 views

is there a formula to know how many enemies i can place before jumping character?

My game is very similar to the hidden game in chromes web browser. I have a character that needs to jump over incoming enemies. Is there any way i can know when to send an incoming enemy? Some of the ...
0
votes
1answer
80 views

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", ...
1
vote
2answers
106 views

How can i handle collision response in a voxel game?

I'm making a voxel game with cubes - like in minecraft - and I have figured out how to check wether the player is colliding with a voxel, I have just done it by checking wether the player is within a ...
0
votes
1answer
90 views

MMO - Boss Action Distribution

I was considering how MMO mechanics work and especially how NPC/mob decisions are calculated and distributed among players. Say for example that you have a team of 5 fighting a boss. The boss's ...
0
votes
3answers
173 views

Procedural generation of stars in the background with given random seed

I want to generate stars (actually a 2d vector) in the background. The player is moving left and right endlessly. When the player moves the stars, which aren't in sight anymore, should be deleted from ...
2
votes
2answers
166 views

Daily quest system

I am creating a game for Android/iOS. The game has a server that communicates with my appengine database. I want to implement daily quests as motivation for the players to return every day, but I need ...
0
votes
1answer
115 views

Diagonal Movement with Pygame Rect Class

I have been using pygame and have been struggling to understand how to implement vectors and the pygame rect class to make an image move diagonally on the screen at the correct speed.I know it must be ...
-1
votes
1answer
169 views

How to use custom font in Phaser ?

I am trying to load webfont in Phaser, I have seen the Phaser example but I cant understand, what asset do I need,what function I have to call....,what exactly look like the javascript file?. I am new ...
1
vote
2answers
139 views

Why does player still leave map?

I'm making a simple HTML5 RPG in pure JavaScript likened after Nox, Diablo or Titan Quest, with the character centered on the screen and the map moving around it. TL;DR: My character, when colliding ...