Questions tagged [game-component]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0
votes
0answers
34 views

Can’t find component Unity

so, I want to add a Cloth component. I click on a gameobjects, press “Add Component” in the Inspector search “Cloth” And nothing comes up. From my searches in google, nobody had such a problem ever, ...
0
votes
1answer
33 views

Unity “Text Mesh Pro UGUI” component rewrites my text! Make it stop?

I'm having this terribly annoying problem where my text is being overwritten by Unity. This Happens regardless of whether I am using tags or not. Here is what I want to appear (more or less, I don't ...
1
vote
1answer
190 views

Dealing with more complex entities in an ECS architecture

Preamble: I'm working on a level editor for my engine, which uses an ECS architecture. I have around a dozen component types so far, mostly dealing with graphics, like lighting components, model, and ...
1
vote
1answer
3k views

Enable/ Disable Line Renderer points

I have a Line Renderer component with 4 points, I would like to disable and enable the last 2 points at a certain time. My question is, how would I in code (C#) enable and disable individual Line ...
1
vote
1answer
4k views

How deep does the GameObject.GetComponentsInChildren() , Go?

So I have a GameObject which my scene will be it's children. I wanted to get the BoxCollider of all the objects and their sub-...
-3
votes
1answer
157 views

Does Unity support hair?

As we know, Unity has a cloth component, but is there something to simulate human hair?
3
votes
2answers
680 views

In Unity, is there a way to Set a new MeshRenderer?

Here is what I want to do in Unity for a given GameObject go = new GameObject(). I want to create a MeshRenderer, change its ...
3
votes
1answer
673 views

Check if GameComponent is ready in Unity?

I am trying to create a MessageBox in Unity, but I'm having some troubles in C#.. This is my code (I'll explain my problem later): MsgBox.cs ...
0
votes
1answer
184 views

How to make my components only contain raw data?

I'm reading that Components in ECS are just only data and have no logic. I'm trying to follow this and I got that working: ...
1
vote
1answer
2k views

How to move objects in any direction by swiping with libgdx android game development

first of, I'm new to android game development so I don't know all the classes and dictionaries within android and libgdx. I'm actually following a game development tutorial for the first time (...
1
vote
1answer
828 views

Why does GameComponent have an Initialize() method?

I'm not sure if this exact question has been asked before, but all I could find were questions about how to work with GameComponent, or why something wasn't working. I understand that you overload ...
4
votes
1answer
190 views

Odd Behaviour XNA Game Component

Inside of my main class file I am initializing a number of game components which are used to represent game scenes i.e. main menu and game. I am initilizing each component inside of XNAs LoadContent ...
1
vote
0answers
85 views

Can I switch off scenery elements on a 3D model?

I am using a 3D asset that has flat scenery elements (3D island with 2D bushes). [1] Having encountered a number of problems with this scenery [2] I want to deactive it (not visible, not collidable, ...
1
vote
1answer
198 views

How can I resolve component types in a way that supports adding new types relatively easily?

I am trying to build an Entity Component System for an interactive application developed using C++ and OpenGL. My question is quite simple. In my GameObject class I have a collection of Components. I ...
1
vote
1answer
3k views

When to use GameComponents?

I know what it is and I'm using it as a frame counter for example. But when should I use it? Does it make sense to say "I make all the input handling happen in a gamecomponent"? Is it flexible enough ...
1
vote
1answer
1k views

component Initialization in component-based game architectures

I'm develping a 2d game (in XNA) and i've gone slightly towards a component-based approach, where i have a main game object (container) that holds different components. When implementing the needed ...
1
vote
4answers
1k views

Which is the way to pass parameters in a drawableGameComponent in XNA 4.0?

I have a small demo and I want to create a class that draws messages in screen like fps rate. I am reading a XNA book and they comment about GameComponents. I have created a class that inherits ...
1
vote
1answer
533 views

What's the recommended way of doing a HUD for an android game?

Basically the question is in the title. I'm creating a RTS game and I will need buttons like attack move / attack ground, etc. I am not using any engine. When people do games in OpenGL for android (...
6
votes
1answer
2k views

Designing generic render/graphics component in C++?

I'm trying to learn more about Component Entity systems. So I decided to write a Tetris clone. I'm using the "style" of component-entity system where the Entity is just a bag of Components, the ...
1
vote
1answer
237 views

How to add several GameComponents of the same type?

in order to load 3D-meshes to my project i created a BasicModel class. I made it a DrawableGameComponent so I can override methods like Draw & LoadContent. Plus I have access to the GraphicsDevice ...
2
votes
3answers
495 views

Need some advice on designing components

So after reading about components for a bit I want to make a very simple spaceshooter game that uses components and systems. However, I'm a bit confused on how much scope each component should have. ...
9
votes
4answers
3k views

What technique should I use to facilitate communication between XNA GameComponents (or between components of any type in a game)?

I'm starting out on my first 'proper' game project, and I've inevitably hit a block trying to decide how game components in XNA should communicate. From previous (Java) GUI programming events, ...
3
votes
2answers
3k views

How do I get access to the SpriteBatch service in my Sprite class using XNA?

I have the following Sprite class (leaving out everything that doesn't pertain to my question): ...
19
votes
2answers
5k views

How are physics or graphics components typically built in a component-oriented system?

I have spent the last 48 hours reading up on Object Component systems, and feel I am ready enough to start implementing it. I got the base Object and Component classes created, but now that I need to ...
6
votes
3answers
5k views

When should a bullet texture be loaded in XNA?

I'm making a SpaceWar!-esque game using XNA. I want to limit my ships to 5 active bullets at any time. I have a Bullet DrawableGameComponent and a Ship ...
25
votes
5answers
17k views

What are the cons of using DrawableGameComponent for every instance of a game object?

I've read in many places that DrawableGameComponents should be saved for things like "levels" or some kind of managers instead of using them, for example, for characters or tiles (Like this guy says ...
7
votes
1answer
1k views

In XNA, should I use the built-in game component classes?

I'm just getting started on an XNA game for Window Phone 7. For my Flash games I have my own framework that I was just going to port from AS3, but I have just found the built-in game component stuff ...