0
votes
0answers
5 views

simplest way to detect collision with two bitmpas on android surface view

as title said. I have looked all over and havent found standard way to detect collision between two bitmaps on surface view. I tried intersect method with two rectangles, but didnt work. `practiseA ...
0
votes
0answers
4 views

What is the best way to manage 'state' in Phaser?

I have heard that this is not the best way to manage state in phaser var game = new Phaser.Game(800, 600, Phaser.CANVAS,'YourGameName'); game.state.add("Boot", Boot); game.state.add("Preload", ...
0
votes
1answer
8 views

glm Z coordinates are flipped

I am trying to render a 3D model using OpenGL. And for the projection and transformation matrices, I am using glm. I've got my model on the screen and it works just like I intended it to; except one ...
0
votes
0answers
6 views

OnMouseOver() alternative for iPhone (Unity3D/Unity2D)

I am currently developing a game that uses the OnMouseOver() function of a MonoBehaviour object. Is there a true alternative for iPhone? Would I be better of coding my own? Thanks in advance
-1
votes
0answers
9 views

Right-side weapon rotate to face the mouse target

I have a 3D game looking from top to bottom where I move the mouse to aim at targets. I have a simple box (the player) with a sphere on its middle-front (that is the pistol) and a cylinder on its ...
-1
votes
0answers
18 views

How do I clear the previous frames of a canvas animation?

I am trying to rotate an object, but all the previous frames still show up on the canvas. Here is my code. This didn't work: this.ctx.clearRect(0, 0, this.canvas.canvasWidth, ...
1
vote
1answer
34 views

How to target moving object in 2D game

I am working on targeting system for 2D game. Two objects move in space. Each one have Position and Velocity vector. Ship object shoots moving objects in space. Ship can shoot in any direction, but ...
0
votes
1answer
9 views

LibGDX buttons bounds are wrong

I am making a simple gui in libgdx and run into this problem ; when you click on the button it's bounds (?) are wrong since if I click under it, the game registers it as a click. On the other end, ...
0
votes
1answer
11 views

Camera (pole cam) implementation problem

In my project I have simple scene graph to render whole scene and Bullet physics SDK to provide physics simulation. Each rendered object is represented as scene node. Camera always has target and ...
1
vote
1answer
27 views

How to find the “up” direction of the view matrix, with GLM

Using OpenGL and the GLM matrix library, I want to translate my camera relative to the world coordinate system. This requires me to compute the necessary view matrix. To initialise the view matrix, I ...
0
votes
0answers
26 views

OpenGL c++ terrain generation [on hold]

Im trying to use a grid of vertices ,a blendMap and a heightMap to generate a terain.And i got an error which i simply dont understand. Model.h struct coordinate{ float x,y,z; }; struct face{ ...
0
votes
1answer
46 views

Best way to manage weapons as GameObject on a script in Unity with C#

I have a player game-object with a script Player. In the Player script I have a public properties weapons. I want to have to just drag in this properties a script/prefabs. And the Player script must ...
1
vote
1answer
35 views

Personal Custom Card Game [duplicate]

I had the idea, to make a custom card game based off an Anime i like. I was wondering if it would be legal to have such printed out (using a custom card/board game service) for personal use. I would ...
-1
votes
0answers
20 views

Design the game Stage in libgdx

Let's assume my Stage has this structure: A Table with cells (like a matrix) centered in the screen Each cell of this Table has an Actor associated to it I have to add actors also in the remaining ...
0
votes
1answer
17 views

Rotating the view around the origin of the world coordinate system

In OpenGL (using shaders), I want to implement a system that will take the user's mouse as input, and then rotate the view about the origin of the rendered scene. So, I need to compute the view matrix ...
-5
votes
0answers
23 views

Quest about game performance [on hold]

I'm Nam, I've got a problem about game performance. I creat a class BaseObject and then AnimationObject derived from BaseObject. When I position 10 AnimationObjects in scene, fps is very low, ~ ...
0
votes
0answers
14 views

Opengl Create FBO- fatal signal 11 error

in my android game, i want to render My scene in the FBO and a texture attached to it, and use that texture later, But When i use glGenFramebuffers i get this error: 07-30 06:17:27.839: A/libc(1338): ...
2
votes
0answers
12 views

MoCap data files applied to avatars using Mecanim

I am applying some animations (e.g. running) from this free MoCap package that I got off the Unity Assets Store, and as far as I can see from running the animation previews, they seem fine (i.e. ...
1
vote
1answer
31 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
103 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 ...
0
votes
0answers
25 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
71 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
14 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
19 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
21 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
17 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) ...
0
votes
0answers
23 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
37 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
45 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
41 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
21 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
2answers
38 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
16 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
22 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
38 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
63 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
56 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
51 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
44 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
58 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
80 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
1answer
64 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, ...
0
votes
0answers
27 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
33 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
140 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++ [on hold]

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
56 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?

15 30 50 per page