1
vote
1answer
38 views

Move a sprite in a sine wave along different angles

I understand this piece of code Enemy.position.Y = StartPosition.Y + (-(float)Math.Cos(position.X / 100) * 100); However it only works along the X axis. What I want to be able to do is move it along ...
2
votes
2answers
120 views

Make camera follow and rotate with player without childing it

I want to have a camera, that follow the player, without childing it to the player object. So far I have this one line, that follows the player, but does not rotate with it (meaning the camera should ...
2
votes
2answers
52 views

Problem with coroutines unity 3d

I cannot understand why the coroutines are not waiting the designated number of seconds before executing the code below it. At the moment, the animation bleeds into the next state. I could get around ...
2
votes
2answers
86 views

why is my enemy AI is on air while moving?

In Unity3D I have created an enemy AI and applied a script for it to move and chase the player. But when moving, the enemy hovers in the air. My character also does not have rigidbody and he just has ...
0
votes
0answers
22 views

How should browser based muiltiplayer game state be syncronized using WebSockets and a Node.js backend?

I'm in the process of learning how to create browser based html5 games. I'd like to eventually be able to achieve a game with mechanics very similar to that of the game agar.io. I've been observing ...
0
votes
0answers
23 views

glsl specular not working

ok, i'm a complete noob regarding shaders and all this, so i must be doing something really stupid, but i cannot get specular lighting to work. I've read a whole lot of different shaders on the ...
0
votes
0answers
22 views

Build custom editor to UI elements

I want to add some extra functions to editor inspector for UI.Button but, I can't setup my script in this way :-/ How can I write custom inspector for UI Objects ? This is what I wrote: using ...
0
votes
0answers
28 views

Slick2D doesn't render hexagonal TiledMap from Tiled Map Editor properly

I'm new to Slick2D and Tiled so I might be missing something crucial although I've done my research and came up with nothing. I'm trying to create a hexagonal grid using Tiled Map Editor (v. 0.12.3) ...
1
vote
0answers
32 views

Unity - Vector3.Reflect not reflecting correctly

I resolved the question on how to draw a line, so here is the result: https://www.dropbox.com/s/hvc9yr3jjbqdv7r/dc.jpg?dl=0 So, now I want to create a line that shows the possible bounce off the ...
1
vote
2answers
41 views

Character controller passes through mesh collider

I need a little help figuring out what's going on with an NPC's character controller. Here are the character controller settings for the NPC. The problem I'm running into is that the NPC isn't ...
1
vote
1answer
49 views

Ray tracing - soft shadow

I'm implementing my own ray tracer as an iPad app for a school project. At the moment this is the result: I need to add the last requirement, soft shadows, but I can't find a complete reference ...
-4
votes
1answer
44 views

Jedi Academy - ID Tech 3 - Strafe Jump Code [on hold]

Firstly, sorry if this is a bad question. Situation: I'm aware that the ID Tech 3 engine contains the infamous 'strafe jumping' mechanic. For this question though, I'm not referring to the strafe ...
0
votes
0answers
23 views

Ray tracing - skybox

I'm implementing my own ray tracer as an iPad app. I just finished to implement a skybox (cube mapping) using this tutorial (page 21): http://www.ics.uci.edu/~gopi/CS211B/RayTracing%20tutorial.pdf ...
1
vote
3answers
46 views

Need help with physics 2D Unity

I'm making a 2D game in Unity. Basically there's just a rocket that goes where ever the user touches. With the code that i have right now, the rocket instantly rotates towards the point and moves ...
1
vote
1answer
27 views

What are the units when reading depth using glReadPixels()?

Suppose I use glReadPixels() to read the depth of a pixel from the depth buffer. What are the units of this? Is it the distance from the camera? Or the distance from the near clip plane? And is the ...
0
votes
1answer
21 views

Increasing friction or Adding force relative to transform position in Unity 2D?

Back again with a quick question! I have a few basic platforming mechanics going on in this scene. I have a prefab platform with an animation that loops back and forth between two different x ...
-3
votes
2answers
23 views

What's the difference between an .nbt and an .mca file?

What do I have to do if I want to save a .nbt file as .mca file? I've got an byte array and all the data is ok. If I save the content as a .nbt file I can open and view it with NBTExplorer. If I save ...
-4
votes
1answer
42 views

When and how often does Epic charge me royalties on my game?

I want to know about that 5% royalties that Epic charges for the Unreal Engine if I sell games above $3000. What about if my game just made $300? Do I still need to pay 5% royalties to them? And how ...
1
vote
2answers
70 views

How to make sprite move in any direction?

I have an arrow sprite that rotates based on where my cursor is pointed, I can only make it move up,down,left and right.How about in a diagonal way? //this is the rotation nt x=Gdx.input.getX(); ...
0
votes
1answer
60 views

2D Infinite Runner: how to manage the generation of dynamic terrain?

I'm creating a infinite runner game with Unity3d, i've been using math to generate the terrain by calculating the size/pos of the terrain and place the new one next to it, and it's working correctly, ...
0
votes
1answer
59 views

How to manage a vector of “Component” base class?

I'm trying to implement a component based design for a game i'm making. I decided to write it in c++ but i'm not very good at it. Coming from a java background I encountered a problem when trying to ...
1
vote
2answers
49 views

Unity 3D - Confine a gun rotation within certain degrees

I am having troubles making my gun rotate up and down, and have limits, for example, I want the down limit to be 0 degrees, and the up limit to be 90 degrees. Currently I can't figure out how to ...
2
votes
0answers
23 views

How to increase the number of available chapters for an HL2: EP2 mod?

I created a mod for Half-Life 2: Episode 2 that has 39 chapters (or maps, here it is the same). The problem is that the game seems to see only 32: when clicking "new game", and clicking next, I count ...
2
votes
1answer
66 views

How animated block in voxel engine?

In my voxel engine (XNA 4.0) I'm use a vertex buffer for the entire chunk and update it after the set block, changing block metadata or light level. This is not too frequent operation compared with ...
0
votes
1answer
21 views

Viewport and debug session

I define and set viewport using this piece of code: D3D11_VIEWPORT viewport; viewport.Width = (FLOAT)pBspWindow->GetWidth(); viewport.Height = (FLOAT)pBspWindow->GetHeight(); viewport.TopLeftX ...
2
votes
2answers
82 views

How to draw a line in 3d space?

I have a top down billiard game. And on click / tap the ball moves in the clicked direction like in the image below: Now, I want a line to be drawn in the direction where the mouse is hovers or the ...
2
votes
2answers
92 views

2D - Smooth lighting with shadows for a tile-based game

for the last week or so I have been completely stuck on trying to implement efficient lighting. I've been researching and experimenting and I've looked everywhere that I have been capable of finding, ...
1
vote
1answer
48 views

How should asset bundles be divided?

The only way to load an asset from an asset bundle into memory is to load the entire thing, decompress and pull out the asset you want, then unload the entire thing, except the assets you want. This ...
1
vote
2answers
38 views

Vision Cone for Enemy AI in Unity 2d

I am trying to develop an Enemy AI with vision cone in unity 2d top down game, can you please suggest me some approach or sample script, so I can get an idea.
1
vote
2answers
145 views

Render sprites onto a virtual 640x480 “screen”

I'm making a game, and in part of it, the player uses a computer terminal. I want to draw to a virtual 640x480 screen with pixel precision, and then draw that "virtual screen" to the player's real ...
1
vote
0answers
32 views

trying to figure out how to output all the user moves to a file in c++ [closed]

Hi I am creating an escape the room type game where you input the direction you want to move to go that way (i.e. 'forward', 'backward', 'left', 'right'). I have an idea to use a dynamic array to ...
0
votes
1answer
62 views

2d character generator for android games

I am a developer, and not an artist. is there a 2d character generator that i can feed one picture and it will generate the proper files to be displayed for a running animation?
0
votes
0answers
13 views

D3D11CreateDevice Failed. [closed]

I am trying to begin learning how to use DirectX11, I am currently working through Frank Luna's 3D Game Programming with DX11. To make sure that my hardware is compatible I went through the Demo code ...
0
votes
1answer
38 views

Rotation in 3D space using Quaternion

System Configuration I have two simulation systems (which I am going to call Sim-A and Sim-B) where I am going to spawn an entity created in Sim-A inside Sim-B. Expected outcome The entity created ...
0
votes
0answers
16 views

How to make a clone of Brave Frontier or Hero Buster? [closed]

A quick question for those experienced enough to answer this. I've been meaning to make a game like "Brave Frontier", "Hero Buster" and "One Piece Treasure Cruise" to give examples. I know C# and ...
-1
votes
0answers
31 views

Water gets really dark when camera is far away

I'm trying to create an over view map of a whole world, but I'm having lighting/color issues with the water. When the camera is high up, it's really dark: When it's lower: My workspace:
0
votes
0answers
26 views

Fixing memory leak in Opengl texture class [closed]

I recently run my 3D game engine under Valgrin and discovered that everything's almost fine, except that I leak 7,862 bytes in my opengl texture class... I think that I'm not calling a specific opengl ...
-1
votes
1answer
11 views

Error SDK facebook and Unity3d 5

I've tried everything anyone has seen this error? Clicking the invite: I get the message "App Request dialog is not implemented in the Unity editor." public void InviteFriends() { ...
0
votes
0answers
15 views

Perspective divide: Why use the w component? [duplicate]

In OpenGL, I have read that a vertex should be represented by (x,y,z,w), where w = z. This is to enable perspective divide, whereby (x,y,z) are divided by w in order to determine their screen position ...
0
votes
1answer
10 views

Passing data into a vertex shader for perspective divide

In OpenGL and GLSL, I am just learning about perspective projection and the vertex shader. However, I am a little confused about what data actually needs to be passed to the vertex shader, and what ...
0
votes
0answers
17 views

GLFW - Event Polling System

I need some help on design. I'm making an event polling system, where a window is notified of events as they happen. I handle events at a system level in my GLFW backend, by using callbacks. ...
1
vote
5answers
89 views

Advice on how to store level design info?

I'm building a 2D tile-based puzzle game in C#, using Monogame. The game board is an 8x6 grid of tiles, each of which can contain a number of objects. Conveniently, the number of possibilities for ...
-1
votes
0answers
17 views

New and could do with some help :3 [closed]

my name is Chloe and I have recently started looking into game development but im so unsure as to where I can start. I am currently in an IT apprenticeship to which I will need to leave to pursue ...
0
votes
0answers
10 views

Unit, Map Decoupling Proper OO Practice in an RTS Game

In RTS games do unit objects (movable, controllable units) contain location information? ie. would a unit class have a 'coordinates' field or something of this manner? Or is it more common to have a ...
0
votes
1answer
47 views

The more appropriate way to find GameObject in the scene

Which way is the more appropriate to find GameObject in the scene. I know that GameObject.FindGameObjectWithTag is faster than GameObject.Find but i wondering whether FindGameObjectWithTag is better ...
0
votes
0answers
15 views

3d/spatial sounds in gorilla audio

I'm using gorilla audio in my game and I would like to add spatial sound sources, so the volume and which side you hear the sound more would be based on the location you are listening from. I didn't ...
0
votes
1answer
29 views

Why does my code only work when there is a debug statement? (Unity)

I have a script that controls how the particles in a particle emitter should look. (XNA example here) Yet it doesn't seem to update correctly. With an orb that should have 50 particles only a few ...
1
vote
0answers
12 views

Unity Engine: How to change mointor/desktop resolution in 4.5.3 and higher

As of unity 4.5.3, Screen.SetResolution and the Unity Resolution Display Dialog, by default, no longer change the monitor/desktop resolution. Instead, it only changes the render target resolution for ...
0
votes
0answers
27 views

Bounding Box for 3dModel

I've tried using the code from this post How do i create bounding boxes with XNA 4.0? to create a bounding box for a 3d model, but my bounding box is way smaller than my model. My model isn't scaled ...
0
votes
1answer
42 views

Pass-through pixel shader not displaying properly

I'm new to shaders, HLSL and XNA in general. I'm trying to write a pass-through pixel shader but I'm experiencing some odd behaviour. I created a simple texture, shown below: Here's what I see when ...

15 30 50 per page