Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [patterns]

The tag has no usage guidance.

0
votes
0answers
96 views

Separate Gizmos from Play functionality on MonoBehaviour scripts

I have a question regarding logic separation from visual debug (Gizmos) on Editor: I like to make use of Gizmos utilities to debug stuff on the Editor scene, such as waypoints and curves, such things ...
1
vote
1answer
80 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
1answer
134 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
2answers
188 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
2answers
69 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
1answer
639 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
1answer
1k 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
1answer
884 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 ...
6
votes
1answer
3k 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
1answer
403 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
2answers
512 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
1answer
414 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
1answer
297 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
2answers
3k 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 ...
-4
votes
1answer
679 views

The most popular pattern for game-related programming in C++ [closed]

As the title says, what are the most popular design solutions when creating a new game or a new game engine?
54
votes
5answers
5k views

How could I implement something like Minecraft's crafting grid?

The crafting system in Minecraft uses a 2x2 or 3x3 grid. You place ingredients on the grid, and if you put the right ingredients in the right pattern, it will activate the recipe. Some interesting ...
10
votes
4answers
6k views

Per-Frame Function Calls versus Event Driven Messaging in Game Design

The traditional game design, as I know it, uses polymorphism and virtual functions to update game objects states. In other words, the same set of virtual functions are called in regular(ex: per-frame) ...
13
votes
1answer
2k views

Unit Testing a C#/XNA Game Project

I have been dabling in game development since I started programming, but never very seriously. I work as a business app developer, but I'm working on some games in my spare time. In the business ...
12
votes
5answers
1k views

API agnostic bridges (ie. OpenGL/D3D/Whatever). Do you use them, how you make them. Pro's and Con's [closed]

You are making a 3d engine. You want best of multiplatform worlds. Suddenly you realize that if you want to use Direct3D on Windows machines and OpenGL on OSX/Linux, you'll have to sacrifice supported ...