The view tag has no usage guidance.
3
votes
5answers
822 views
How and when do the model to world, world to view, et cetera multiplications happen?
I learn matrix transformations for game design and I struggle with some basic concepts. I see the actual multiplication taking place before rendering in this sequence:
MODEL into WORLD: multiply each ...
3
votes
3answers
440 views
The proper name for a state, view, screen, etc
Most of my experience is in programming in HTML, JavaScript, etc. I'm taking on a relatively large project, and while I'm the only developer, I eventually want to open source my code for other ...
1
vote
0answers
35 views
Asymetric Perspectiv View
I am building a addon component that will show synthesized 3D view of the world (kind of FLIR camera simulation). The problem I am facing is that currently I am using Symmetric Perspective View with ...
1
vote
0answers
62 views
Android Drag and drop problem
Im having major problem (all of a sudden, it worked before :-)) with drag and drop for my jig-saw puzzle app.
My layout is in 2 relative layouts 1 for the puzzle pieces and 1 for the complete image ...
0
votes
0answers
51 views
Spritekit view and scene coordinates
I have a goal sprite that I want always to be fixed in the top right corner of the scene. I use method:
[self.view convertPoint:point toScene:self];
from the scene. It still ends up differently in ...
0
votes
1answer
361 views
Put layout over Surfaceview
I have this problem: I'm trying to create new RelativeLayout over whole screen - which also contains SurfaceView in the middle - and display some things on this RelativeLayout (in my case Imageview ...
1
vote
1answer
123 views
Creating SurfaceView cause short screen blink
When I create SurfaceView for first time since app launch, the app screen blinks black for small time (about 1/4 second). It blinks over UI, so its really visible and doesn't look nice at all.
I've ...
0
votes
4answers
135 views
How to make the minimap inactive?
I have created a minimap for my top-down Shooter and it is showed on the top-left corner of the window. The problem is that if I press anywhere upon the minimap, its like pressing somewhere on the ...
4
votes
0answers
75 views
How do I align the cube in which shadows are computed with the view frustrum? (“View Space aligned frustum”)
Short and concise:
Given 8 world space positions that form a cube of arbitrary size, position and orientation and given an arbitrary light direction.
How do I compute the View and Projection matrix ...
3
votes
1answer
62 views
How can I communicate a Joystick with a SurfaceView?
I have two classes:
JoystickView (Extends View).
GameView (Extends SurfaceView): It will be updated by a Thread that call the onDraw Method.
Now, if I retrieve a direction by OnTouchEvent inside ...
1
vote
1answer
2k views
How to update UI after changing text in a view
After applying a text change to a scrolling view, how do you get the new height of the text, resize other UI elements around the changed text length, etc?
Many have posted this question. Some have ...
0
votes
1answer
463 views
0
votes
1answer
90 views
Unity why do all gameobjects not dissapear from view when I switch cameras?
I am having trouble with camera switching. I have two cameras: "Camera1" and "Camera2". A "button script" attached to Camera1 allows a switch to Camera2. It also positions the cameras.
There is a ...
3
votes
1answer
197 views
Problem to change window view dragging the mouse
I'm having a bad time trying to change the window view by dragging the mouse. I can precisely do that with the method:
void PlayScreen::MenuView(sf::RenderWindow& window)
{
while (sf::Mouse::...
3
votes
2answers
243 views
Unity Change Sceneview to camera view
On selecting camera, I get the camera preview.
In Unity, while editing the scene, I wish to switch in such a perspective view that is exactly visible by the main camera.
Is there a short cut to ...
3
votes
2answers
376 views
How to set borders in Rubik's cube using opengl GLSurfaceView
I'm developing a Rubik's cube game like seen in the picture. But I'm facing problems to set the cube face color with black border.
public void setupSides() {
int i, j, k;
// Paint back blue
i = 0;
...
0
votes
1answer
85 views
Everything black except where there's a light
I have a camera in my scene with a map created at runtime:
As you can see everything can be seen. Now I want the map to be invisible (black as the background) except where there are lights. How can ...
0
votes
1answer
478 views
How do I center the view around specific coordinates in SFML
I want to use sf::View in SFML in order to change the position of the view, such that the player sprite is always in the center of the screen. Thus I want to write a function which allows me to input ...
1
vote
2answers
482 views
Fixed background on a SurfaceView
I'm currently working on a top-down twin-stick shooter for Android. I've got my player moving around and shooting, but I'm looking to add a large Bitmap background which is larger than the device ...
0
votes
1answer
161 views
Scaling world - projection, view or separate matrix?
I am currently writing a simple 3D space visualisation program.
Things get loaded into it from a simple XML file, which contains positions and sizes of objects in space, so you can put basically any ...
0
votes
0answers
2k views
Implement Camera (former: CCCamera) v2 in cocos2d-x v3.3
we want to port camera code from cocos2d-x version 2 to version 3.3 with the goal
to imitate the behaviour of a CCCamera in cocos2d-x version 2 exactly.
You can assume that values for "eye" and "up" ...
2
votes
1answer
256 views
XNA: How do I match Spritebatch View/Projection Matrices with BasicEffect Matrices?
I'm rendering a bunch of 2D content using SpriteBatches to a default XNA viewport. A simple 2D camera is used to move around the scene, which generates a transformation matrix passed to each ...
1
vote
1answer
226 views
projection / view matrix: the object is bigger than it should and depth does not affect vertices [closed]
I'm currently trying to write a C 3D software rendering engine from scratch just for fun and to have an insight on what OpenGL does behind the scene and what 90's programmers had to do on DOS.
I have ...
1
vote
1answer
80 views
What is the correct way to seperate (react) view from state?
I would like to know the correct implementation to declare game logic and view logic:
I see 3 ways of implementing this:
1.Storing (eg writing preprocessing to store the change to a property) ...
-3
votes
1answer
276 views
GLSL does weird things to my view matrix [closed]
uniform mat4 model;
uniform mat4 view;
varying vec4 vColor;
void main(){
gl_TexCoord[0] = gl_MultiTexCoord0;
gl_Position = view * model * gl_Vertex;
vColor = gl_Color;
if(view * ...
13
votes
4answers
550 views
What would a “2nd person” viewpoint consist of?
Traditional narratives have one of three viewpoints:
First person (I fought the monster)
Second person (You fought the monster)
Third person (He/She/It fought the monster)
First and Third person ...
1
vote
1answer
785 views
HLSL What you get when you subtract world position from InvertViewProjection.Translation?
In one of NVIDIA's Vertex shaders (the metal one) I found the following code:
// transform object normals, tangents, & binormals to world-space:
float4x4 WorldITXf : WorldInverseTranspose < ...
0
votes
1answer
1k views
View Matrix from Camera in Unity Script
I am looking to get a Camera component's "view" matrix in a script. I see that I can get the projection matrix using Camera.projectionMatrix, but I don't see a Camera.viewMatrix property...
I want ...
3
votes
1answer
787 views
Shear transformation in the projection matrix?
I am trying to understand what the shear transformation (l+r/r-l & b+t/t-b) is actually doing in the projection matrix? The only thing I got till now is headache :) Can you please help?
0
votes
2answers
22k views
onTouchEvent only working for one view within activity
I have a parent Activity which contains 2 views. One view is a custom view class, where I am overriding the onDraw method. This view contains an onTouchEvent function, which is checking for user ...
1
vote
1answer
5k views
Show view over existing view in same activity
I am newbie Android developer, and I am starting out with a simple Sudoku game. The problem I am facing right now is that I have my game showing on a dedicated Activity, which is displaying a custom ...
1
vote
2answers
937 views
Top Down bounds of vision
Obviously in a first person view point the player sees only what's in front of them (with the exception of radars and rearview mirrors, etc). My game has a top down perspective, but I still want to ...
2
votes
1answer
142 views
Model View Controller linking dynamic model to view
I currently an implementing a game roughly using a model-view-controller setup. A single game controller instantiates a model and view. The model and view then instantiate child models and views, ...
2
votes
0answers
407 views
Camera - View matrix in Android + openGLES 2
I am trying to use the touch screen on the tablet to control my camera movements and generate the view matrix accordingly.
I get the x and y coordinates of the screen and after doing some sanity ...
16
votes
4answers
7k views
Why is Y up in many Games?
I learned at school that the z-axis is up. It is the same in modeling software like Blender. However in many games the y-axis is up.
What is reason?
0
votes
1answer
735 views
Y Axis inverted on vertex output
I've got my project running and somehow it seems my vertex y components are inverted. 10 in the positive on Y goes down and 10 negative on the Y axis goes up.
I can't find anything with the ...
76
votes
9answers
41k views
Why do we move the world instead of the camera?
I heard that in an OpenGL game what we do to let the player move is not to move the camera but to move the whole world around.
For example here is an extract of this tutorial: OpenGL View matrix
...
1
vote
1answer
3k views
How to switch between views in android?
I've tried several methods to switch between two views in my program. I've tried creating a new thread then have the view run for 5 seconds before creating intent to start my main activity. This is ...
1
vote
2answers
329 views
Matrix camera, movement concept
Someone told me that the movement concept in my 2D game is bad. When left or right arrow is pressed I'm scrolling the background which makes you feel that player avatar is moving (the avatar's X-...
1
vote
1answer
463 views
UIView with IrrlichtScene - iOS
i have a UIViewController in a Storyboard and want to draw a IrrlichtScene in this View Controller.
My Code:
WWSViewController.h
#import <UIKit/UIKit.h>
@interface WWSViewController : ...
2
votes
1answer
339 views
Implementing Circular Sprite Masks
So I've been scouring the interwebs for a couple of days with regards to how to implement sprite masking in XNA 4 and C#. Coming from a pet project I did in Flash, this was pretty easy as masks are ...
12
votes
1answer
2k views
How to Simulate Height in a Tiled Top-Down Game
How can I simulate height in a top-down tiled 2D game? One way I thought was to make tiles which are supposed to be higher brighter, but I was wondering if there was a standard or better ...
1
vote
1answer
2k views
Android-Handling screen clicks for dynamically moving objects in a view
I have a kind of broad question to ask but I have to start some where so.....What is the best way to handle onscreen clicks for moving objects being drawn on a canvas in a view. Im registering the ...
1
vote
1answer
524 views
Strange 3D game engine camera with X,Y,Zoom instead of X,Y,Z
I'm using a 3D game engine, that uses a 4x4 matrix to modify the camera projection, in this format:
r r r x
r r r y
r r r z
- - - zoom
Strangely though, the camera does not respond to the Z ...
4
votes
1answer
864 views
How can I achieve a zoom-like camera effect?
I have a top down 3D camera:
view = Matrix.CreateLookAt(new Vector3(0,0,20), Vector3.Zero, Vector3.Up);
Now I want to achieve the effect like when I zoom in the scene and only show a section at the ...
5
votes
3answers
717 views
How can I calculate where my camera can be to avoid showing something outside a region?
I have a landscape model, which goes from the coordinate -45, -45 to 90, 90.
The edge of the model just cuts off and i would like to somehow stop the screen from ever passing these points. Basically ...
3
votes
1answer
2k views
Can a 4x4 matrix describe a camera's perspective?
I'm working with a closed-source 3D engine, and it only allows you to set the view projection via a 4x4 matrix. Can this matrix describe the camera's translation, rotation & perspective?
I turned ...