A game object is any object in a game that the player can see and/or interact with. The player object, power ups, enemies, platforms, walls, weapons (if collision detection is considered) and projectiles are all game objects.
1
vote
0answers
74 views
How do I avoid circular dependencies with game events in C++? [closed]
My question concerns three objects in my game: EnemyConfig (a derived class of Event - it's an event that concerns throwing enemies at the player and making her deal with them) and Enemy. The ...
0
votes
2answers
94 views
Best way to store a large amount of game objects and update the ones onscreen
Good afternoon guys! I'm a young beginner game developer working on my first large scale game project and I've run into a situation where I'm not quite sure what the best solution may be (if there is ...
0
votes
2answers
119 views
How do I connect my objects to my meshes?
I am creating a simple 3D engine and I've run into a problem.
I have an array of objects
[Camera, Player, Player, MonsterA, MonsterB, MonsterA]
and a number of mesh files that I need to associate ...
2
votes
2answers
91 views
Do I have to use new keyword for unity single game object?
I'm using Unity4.
Do I have to use new keyword for single game object? look at the following code.
1.
GameObject obj = new GameObject();
obj = Resources.Load("Prefabs/Ball", typeof(GameObject)) as ...
1
vote
0answers
54 views
Structure gameobjects and call events
I'm working on a 2D tile based game in which the player interacts with other game objects (chests, AI, Doors, Houses etc...). The entire map will be stored in a file which I can read. When loading the ...
1
vote
2answers
73 views
Unity3d - Monitoring which script is bound to which gameobject
How can we see the bounded scripts to gameobjects ? In a large project, it's hard to keep up monitoring by clicking each game object to see bounded scripts
3
votes
2answers
226 views
How can I create an array of GameObjects?
I need to add one 2d assest multiple times in my scene and I was wondering what is the best way to do this because adding each asset individually and setting there locations doesent seem like the best ...
2
votes
1answer
129 views
At same positioned game objects collision detection
In my game, I am creating two game objects at same position using Instantiate statement. Each generated object has box collider attached.
So I want to detect collision between them so I write ...
0
votes
2answers
154 views
How can I handle merging and splitting lots in a city block? [closed]
I am currently working on a SimCity-style game in C# using SharpDX. I'm having trouble handling the growing and shrinking the game entities that represent zones within a region. For example:
...
1
vote
1answer
148 views
Making specific Enemy Classes
So I was just looking through an old game I had made for android, and was second guessing how I was sub-classing enemy for each particular enemy in my game. My enemy class had all kinds of ...
8
votes
8answers
1k views
I am looking for a word to classify Game Objects (Trees, Rocks, even Bridges) but NOT include Items/Characters [closed]
I am looking for a SPECIFIC definition that includes environmental game objects but NOT other game objects. Trees, Rocks, or even Bridges. NOT items, NOT weapons, NOT Characters, NOT tiles. I'm ...
0
votes
1answer
98 views
How to save a character to be used in all Game States?
I am using C# and SFML.
I am having a problem understanding how to save a character in memory, so I can use the character in any game state.
Right now, the character is a class, and the player ...
1
vote
3answers
575 views
How to deal with characters picking up and dropping objects in a 2D game [duplicate]
I'm quite new to game development, so would like to get a consensus on methods of doing this.
My game features a 2D character that is able to pick up and drop objects, for example, a stick. My ...
2
votes
2answers
180 views
How do I make an equipped item affect the equipper?
I'm making a small text-based adventure in Objective-C. I have a Player class with four properties which represent the player's attributes (strength, agility, stamina, and intelligence). I also have a ...
3
votes
2answers
597 views
Unity 4 - Some Rigidbodies Won't Fall Asleep
I'm having this problem in the free edition of Unity 4.1 where rigidbodies aren't falling asleep (and yes, I've tried playing with the sleepVelocity and sleepAngularVelocity values!). I've read the ...
4
votes
2answers
258 views
Open World Object Management
I'm currently creating a system that essentially creates a world at run-time based on a seed I choose. In this system, I made it so that there are certain "chunks" that divide up different sections of ...
0
votes
0answers
123 views
Game Model/Objects structure
I'm trying to come up with my Model/Object structure and I'm having a hard time figuring it out.
I have a ResourceModule which is responsible for managing resources, and it has a vector of Meshes. ...
1
vote
1answer
502 views
How can I create an extending chain like the hookshot in Zelda in Unity?
In the Zelda games, there is an item called the hookshot. It is a small mechanical apparatus held in one hand that acts similar to, but not the same as the gun. When it is triggered, the hook at the ...
1
vote
1answer
186 views
When to use an Array vs When to use a Vector, when dealing with GameObjects?
I understand that from other answers, Arrays and Vectors are the best choices. Many on SE claim that Linked Lists and Maps are bad for video game programming.
I understand that for the most part, I ...
3
votes
2answers
420 views
Best way to keep track of game objects
I'm not exactly sure how I should ask this question, and so the title may be misleading - I am not asking if I should use a list or a stack or a vector or a queue - but how I should go about keeping ...
0
votes
1answer
102 views
Why does this LUA code not render any objects on the screen? [closed]
Did I mess up something somewhere? If i put a putsxy in the same box, it renders a string just fine, but for some reason this code hates objects. What this code is supposed to do is render a set of ...
0
votes
0answers
136 views
How to manage multiple objects for a tile based game for collision?
So I'm making the tile-based 2D sandbox platformer...thing to get an idea of how to manage different elements of coding games.
Currently I'm at the point where my collision system works fine for a ...
1
vote
1answer
207 views
Spawning enemies at way points [closed]
I'm trying to have my game spawn enemies when ever the player reaches a way point.
Right now, I have this functionality working. When my player gets to the first way, the enemies spawn. He only moves ...
1
vote
1answer
398 views
Unity3d select empty gameobjects in scene
I have a pathing system that I am creating in Unity. When you add nodes to denote the path, I create a empty GameObject and render it in OnGUI as a square. The problem that I have is clicking on the ...
1
vote
1answer
418 views
Game-components and memory management
I'm stitching together the workings of a component based game engine, and as such have been deeply reading into many aspects of both game engine architecture and a fair amount of opinionated theory of ...
3
votes
1answer
366 views
Component-based object, traversal?
I'm working on a small C++ component based game engine, as such...
Object Foo might extend GameObject and x number of component interfaces, like Renderable and/or Physical. So let's assume that Foo ...
0
votes
2answers
2k views
Unity scaling instantiated GameObject at Start() doesn't “keep”
I have a very simple scenario:
A box-like Prefab which is imported from Blender automatically (I have the .blend file in the Assets folder).
A script that has two public GameObject fields. In one I ...
0
votes
4answers
234 views
Actor and Sprite, who should own these properties?
I'm writing sort of a 2D game engine for making the process of creating games easier. It has two classes, Actor and Sprite. Actor is used for interactive elements (the player, enemies, bullets, a ...
3
votes
1answer
139 views
How to make an object stay relative to another object
In the following example there is a guy and a boat. They have both a position, orientation and velocity.
The guy is standing on the shore and would like to board. He changes his position so he is ...
0
votes
1answer
57 views
Scrolling though objects then creating a new instace of this object
In my game when pressing the right mouse button you will place an object on the ground. all objects have the same super class (GameObject).
I have a field called selected and will be equal to one ...
0
votes
1answer
948 views
How to get GameElements (RigidBody) size in Unity
I've made a prefab consisting of a Cube which I've first scaled to more resemble a brick. There's also a Rigidbody added to the cube (in the prefab). Now I want to use that prefab in a c# script to ...
4
votes
4answers
439 views
Recursive or linear gameobjects update?
I have a tree of gameobjects, so every node contains a list of children.
In update function:
Is it better to do recursive or linear walking through game objects.
update() {
update self;
...