Questions tagged [patterns]
The patterns tag has no summary.
20 questions
1
vote
1
answer
213
views
How to implement NPC that reads player input and counters it?
input reading = NPC reads the input of the player and instantly reacts to counter everything the player does.
So, is it like :
...
0
votes
1
answer
129
views
Update vs events
i would like your opinion on two different coding styles to solve the same problem, namely, react to user input actions.
To do this, two solutions.
Subscribe to events (usually "when").
Real time ...
1
vote
1
answer
688
views
Single handler vs multiple handlers for the Command Pattern
I'll be soon implementing for the first time a Command pattern to catch general events about the world of the game I'm developing
Since I haven't found much info about this particular issue, I'm ...
3
votes
1
answer
339
views
Compare mouse movement to the pattern
There are some games where you need to make special movement with your mouse (spell casting or any other action).
Something like this
So basically, how can I compare mouse movement to my pattern (...
2
votes
2
answers
214
views
C++ Data structure pattern preferability?
So im looking at ways of handling large amounts of data in situations such as an entity manager or particle system.
So i have concluded to use an object pool, and there are two things that I could do ...
2
votes
2
answers
120
views
Creating a path including loops and spirals
I have a paper airplane that I would like to take a "random" path towards its destination based on the game layouts size. I want it to include spirals and loops and gliding a little back and forth.
...
2
votes
1
answer
1k
views
Finding flexible patterns in a 2D grid
I'm stumped trying to create a matching algorithm for my game.
I have a 2D grid like this for example:
0, 0, 0, 0, 0, 0
0, 1, 2, 2, 1, 0
0, 1, 1, 0, 0, 0
0, 0, 2, 0, 1, 0
0, 0, 0, 2, 1, 0
0, 0, ...
0
votes
1
answer
2k
views
Shmup Unity, create an enemy spread shot to the player
Following this lecture: http://www.shmup-dev.com/forum/viewtopic.php?f=6&t=347 , i created a bullet that shoot from the enemy directly to the player, in a straight line.
Now i want to create 3 ...
1
vote
1
answer
2k
views
How to implement a hint-system for nearby matches (in a Match-3 puzzle game)?
Taking Candy Crush as an example:
In a Match-3 game, how would you figure out which nearby tiles are 1 move away from creating a match?
Do you basically have to do it by trial-and-error on every ...
7
votes
1
answer
6k
views
Implementing Galaga Style Enemy Behavior in Unity
I've been trying to work on a space shooter with the idea of having enemies behaving like it is shown in this video : https://www.youtube.com/watch?v=3p7u8uCR6yw
In the video above, enemies fly from ...
0
votes
1
answer
744
views
Looking for XNA patterns [closed]
Hello mature game developers. Im just started with XNA, but i got solid expirence with C#.
I wonder is there any common code patterns for XNA games?
Like should i make classes wich handle draw and ...
0
votes
2
answers
668
views
Building placement in tilemaps (pattern matching)
I'm building a small RTS and in my code I've given my buildings a pattern, much like you would pieces in tetris, i.e. I want to place irregularly-shaped buildings on a map without overlaps.
The map ...
2
votes
1
answer
455
views
Level design algorithm/pattern for Linerunner etc
I am wondering: how does someone make levels for a game like Linerunner or any other game that uses similar patterns?
About Linerunner (game)
You are a stick man running, you have to jump or crawl ...
3
votes
1
answer
402
views
Comprehension question to MVC Pattern in Game Programming
So is my assumption right?
If I use MVC in Games I will have to implement a Model,Controller,View for every kind of interaction object.
For example in an Motorbike game. My Motorbike object will ...
11
votes
2
answers
4k
views
Finding shapes in 2D Array, then optimising
I've just been allowed an image...The image below from my game shows some darkened blocks, which have been recognised as being part of a "T" shape. As can be seen, the code has darkened the blocks ...