Questions tagged [objects]

A related set of properties (height, colour, level) and methods (pick up item, jump, attack) that are used to describe an entity in the game.

Filter by
Sorted by
Tagged with
0
votes
1answer
35 views

Ideal way to instantiate abilities in a class give a dynamic list of abilities to use?

I have a PlayerClass class that is used to set my Player's class. For instance, this will make him a warrior: PlayerClass warrior = new WarriorClass(); ...
0
votes
1answer
85 views

How to differentiate between object types and roles?

I have a base class Object, and depending on how the object must behave on the scene, I have multiple abstract "role" classes, that inherits virtually from ...
0
votes
0answers
31 views

Efficient system to reach the “parent” variable

I've been stuck doing this in a very inefficient way and really want to know if there's some design pattern that solves this because it seems like a pretty common problem to have. I have a system ...
0
votes
0answers
14 views

Scrollable Text On Object

I want to put Scrollable Text On Object / Mesh. I looked after it on YT but I did not find anything useful. How could I do this?
1
vote
1answer
69 views

Wonky perlin noise

I am quite new to the wondrous world of "Procedural Textures", and I am trying to create a double precission perlin noise algorithm. I am almost done with it except for the fact that the coordinates ...
0
votes
0answers
44 views

How to make hundreds of objects do not disturb the game?

I am playing a game where I want to display countless tickets. At the beginning of the game this object/ticket is replicated 10 times. Create Event: ...
0
votes
2answers
97 views

Querying game objects in real-time

I'm thinking about working on a game where I need to find all the objects matching certain properties. For instances I might need to look up all the objects... Producing gold. Whose level is 5 or ...
0
votes
1answer
32 views

Why has my object detached itself from the parent?

I made an two objects in blender, animated them, and saved them. Firstly, when I reloaded them, half of the animations I created had disappeared, which is annoying itself but the real annoyance is ...
0
votes
1answer
66 views

C++:Segmentation fault (core dumped) while creating gameobject

i made a small code to debug and i get this error player inherit from gameobject code ...
-1
votes
1answer
65 views

C++: passing gameobject as a parameter and then into vector

firstly iam used to java and new to c++ so maybe this will looks a noob's question i will explain this and give a pseudo code and then c++ just so you can understand me i have a player class which ...
1
vote
1answer
90 views

Can I put real monuments like white house, statue of liberty in my open world game? [duplicate]

I'm currently working on open world game. But I am confused about one thing that, is it ok if I put real monuments and sculptures like white house, statue of liberty etc. in my game? Please help if ...
0
votes
2answers
57 views

Can a character interact well with surroundings in-game?

I don't have any experience in game programming, but I am currently on programming-related degree, although on a different branch to game design. I thought about how an environment can come more ...
1
vote
1answer
34 views

How to set keys for emission on/off for a prefab?

I am making a prototype for a Mario game and am having difficulty completing a canned animation for a prefab. There is an item box asset that has 3 materials and an "ItemGet" animation. One of these ...
0
votes
1answer
40 views

Prevent Wall Clipping with Bouncing Shape

I'm currently working on a demo-type program involving bouncing objects. Currently, I have a rectangle that can bounce around the screen. When the rectangle bounces against one of the walls ...
0
votes
0answers
14 views

NullReferenceException: Object reference not set to an instance of an object [duplicate]

Hi so im displaying food, health an water on the screen in a text box by using UnityEngine.UI and making text variables. They are all defined in the update function so they will keep changing and are ...
2
votes
2answers
315 views

C++ create array of multiple types

I tried to create an array Entity[] with elements Human and Zomby. ...
1
vote
1answer
315 views

Instantiating a GameObject at my desired position not working

I'm sure I am misunderstanding something about Unity vectors or something here. I am brand, brand new to Unity so this is part of the problem. I am trying to make a simple atomic model and I am ...
0
votes
1answer
1k views

Read access violation, pointer was nullprt

Im trying to figure out how to use pointers to make a single instance of an object that in this example will just change direction on x-axis. Splav.h (eng. Paddle.h) ...
0
votes
1answer
462 views

Sprite/Object/Room limits in GameMaker 8.1?

I know about GameMaker Studio’s limitations for sprites, objects, rooms, and other assets (https://help.yoyogames.com/hc/en-us/articles/230407528-GameMaker-Studio-2-Trial-Limitations), but I can’t ...
1
vote
1answer
3k views

Unity2D: Vector3.Lerp - smooth movement

I have a script that randomly chooses a position to move a game object every 5 seconds, however instead of moving my object smoothly, my script make my object jumps, which is not desirable! How would ...
0
votes
0answers
41 views

Make a object render behind/trough another but make hide it if its behind some other object

So first of all sorry for this strange title... I know it may sounds worse and a bit complicated... But heres my problem : My player belongs to the "Player" layer. He stands somewhere on my map, ...
0
votes
2answers
51 views

Equal objects with independent variables in Game Maker?

Think of a situation with two distinct runners with different speeds. They will have to walk a circuit in a straight line with two obstacles (police). Below is an illustration of the situation: The ...
1
vote
1answer
350 views

LIBGDX - group as child of an actor?

I've looked in forums, the doc, and the code, and I'm thinking this isn't currently possible, but maybe I'm missing something, so just to be sure: is there a way to set a group as child of and actor? ...
0
votes
1answer
363 views

Difference between Object.Destroy() and GameObject.Destroy() in Unity

What is the difference between using Object.Destroy() and GameObject.Destroy() in Unity? I found the following info about that: ...
0
votes
1answer
57 views

Make character move behind object

I used Tiled Editor for making maps for my own game, I do not run any engine or anything. I have separated terrain layer and object layer in TiledEditor. However I have problem with trees I want to ...
0
votes
1answer
73 views

Evenly distribution of 2 or more shapes given their x and y points inside a bounding box

I have a set of dynamically shaped objects, How do I distribute them evenly either Horizontally or Vertically.The objects are surrounded by a bounding box and the objects are placed at x,y as shown. ...
0
votes
1answer
1k views

Cannot implicitly convert type object[] to UnityEngine.GameObject[]

So, I cannot implicitly convert type object[] to UnityEngine.GameObject[]. But why? As far I know, are all types a inheritanced types of object. So, for my logic, I could put a GameObject array in a ...
0
votes
0answers
90 views

Best strategy to track object hierarchy using groups and obj files

I am making a 3D game in OpenGL from scratch. In this game I have a ship with stuff inside it. How can I attach the stuff to the ship in the CAD program and maintain that hierarchy in my own game? ...
2
votes
0answers
288 views

How to make sure two Tiles not overlap each other?

I'm trying to make a Grid who will be easily convertible between 2D and 3D and I'm having a problem with overlapping prefabs in the case of the 3D generation. The thing is, the DataObjects (Tiles) ...
-1
votes
1answer
42 views

How to detect when object A In point B place

i have object which is moving to points in the screen each time the point ( call it B) is moving to different place and object A follow its direction . Im using Linear interpolation and simple ...
1
vote
1answer
649 views

How to prevent clicking through object in GameMaker

I've been making my first, simple game in Game Maker. You have to click a moving ball (obj_ball), each time you click it, it wil start moving faster. I wanted to add a way to lose the game: if you ...
0
votes
1answer
146 views

A logic error. canvas: balls physics, bounce

Hi I was making a program that simulate a bunch of balls bouncing, but the problem is some balls got stuck to the floor. Since it's a logic error, it is kind of difficult to find. Can someone help, I ...
0
votes
1answer
49 views

Tree of objects in 2D space - children relative to parent

Question How do we track the position of child objects, relative to a parent? Context I have a simple structure that keeps track of a point in space, along with zero or more children: ...
0
votes
1answer
82 views

Identify objects of the same type from each other, even between game restarts?

So I have a simple Character class: ...
0
votes
1answer
276 views

How to add a JSON object / model into your whitestorm world / scene?

I am loading the object from my json file. ...
0
votes
2answers
74 views

How do I pass my objects to the update method?

I've had formal education in Java for around half a year now, and as a hobby I would like to attempt game development. I've downloaded the Slick2d library to help with this. I've run into a problem ...
0
votes
1answer
4k views

How to have random and different colors on multiple objects with one material?

I want to have one material applied to multiple objects that has a random color on each object. How can I achieve this so that I don't need to use a different material for every object? This is in ...
1
vote
1answer
3k views

GameStudio : How to remove object after delay

When you pick an item in the inventory and drop it to obj_item_ground, this item is send to the ground. That's fine. I want to add a delay to this item to destroy ...
1
vote
2answers
3k views

C++ Instantiating objects as function arguments / parameters (base and derived classes)

I've noticed with some functions in C++ that accept objects (e.g. constructors), you can actually create the object within the function argument e.g. (this example uses an SDL_Point as the main ...
1
vote
2answers
101 views

Change parent object on instantiation

I'm making a game in which I have different weapons. One of them is a hand grenade. Well, the question is: I made an animation with mecanim (I don't know if is the correct way) with the grenade being ...
11
votes
1answer
955 views

How to randomly place entities that don't overlap?

I am creating a randomly-generated environment for a game I'm developing. I am using OpenGL and coding in Java. I am trying to ...
1
vote
1answer
783 views

Game asset “objects” consisting of several meshes vs continuous mesh

When building game objects in a 3D modeler like Blender I'm finding it's easier to get greater detail and still have fewer vertices if I separate certain elements. For example, I need to make cuts ...
2
votes
0answers
153 views

What is the most efficient way to determine collision path

I am trying to create a game in which I need to know if two objects will collide in the future, and when. I have both object's position, radius (they are circles) and velocity. A specific example of ...
3
votes
1answer
1k views

Creating HTML5 Canvas Objects in Javascript [closed]

I'm currently trying to learn how to make HTML5 Canvas games with JavaScript. I would like to use object oriented JavaScript to manage the elements of the game, but i'm having trouble. I've done a lot ...
-1
votes
1answer
311 views

How is the relationship between Scripts and Objects in Unity?

If I don't attach the Script to the Object, will be the code able to "see" the object? When I need to manipulate (such as enabled() or a transform()) two or more Objects, do I need to attach the ...
0
votes
1answer
657 views

LibGDX destroy object when not used

I am developing a game where objects move in the screen. My object is instantiated in Y = 0 and I want to destroy this object when it goes under the screen Height. So if (positionY >= ScreenHeight) I ...
0
votes
1answer
104 views

Design Pattern for “Default Object”

I'm making a first person dungeon crawler like Eye of the Beholder. During execution, I have a Map object. It contains Cell objects. Anc each Cell contains, at most, four Wall objects. The Wall ...
4
votes
1answer
2k views

I can't drag'n'drop UI-Elements from the Scene-hierarchy into a public field (Unity 5)

I just watched this Video https://unity3d.com/learn/tutorials/projects/survival-shooter/player-health and tried to drag'n'drop the UI-Elements on the matching script, just like they did. But this is ...
1
vote
2answers
135 views

Is it possible to control what script is active on what sprite/object in Unity?

I have 2 objects, and I have a script which makes the player change their characteristics. I applied the script to both, and as you'd expect, pressing X button does the color, size, translation change ...
0
votes
1answer
2k views

Help with understanding “transform.root.GetComponent<>” in Unity

I'm reading through a tutorial for making an RTS in Unity, and in certain scripts it wants you to make a Player field and then OnStart(){ transform.root.GetComponent}. I am not quite getting what that ...