The tag has no wiki summary.

learn more… | top users | synonyms

6
votes
4answers
179 views

Keeping sprites nice and pixelated

How do I keep the sprites in my game nicely pixelated on screens of all sizes and resolutions? I use nearest-neighbor texture filtering when resizing pixels, but this works well only at really high ...
1
vote
1answer
35 views

How can I use CCClippingNode to trim the top and bottom from a CCTableView?

I'm fairly new to Cocos2d and struggling with sizing a CCTableView. How can its height be controlled so that I have space at the top and the bottom? I'm trying to visually wrap the top and bottom of ...
2
votes
1answer
44 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 ...
0
votes
1answer
83 views

Isometric View of “Voxel-Style” Terrain

Suppose you have an arrangement of data for a terrain set up like this: terrain[layer][cart-x][cart-y]. Each location (ex. terrain[0][0][0] for the top left corner of the lowest layer) in the array ...
0
votes
0answers
19 views

Crafty Bind “createView” to viewport - TiledMapBuilder

Is there any way to bind the createView function to the player entity? For Example: I am moving forward and the map is automatically loaded. I call the Map with: Crafty.e("2D, DOM, ...
4
votes
1answer
124 views

How do I letterbox a C#/Monogame viewport within a resizeable window?

I am making a 2d game with xna/monogame. I want the main view area to always show 15x15 tiles, or 480x480px. I've got something that sort of works, following this guide. It expands the view range ...
0
votes
1answer
189 views

How can I prevent the viewport from stretching/distorting?

Basically, I want to know how I can remove distortion or stretching of the rendered image when the viewport/window size changes. The following images exemplify the distortion/stretching I'm talking ...
0
votes
1answer
35 views

transformation before the perspective divide but after projecting perspectively

My problem is that I would like to confine a scene render to a (possibly rotated) rectangle without using glViewport(). I don't want to use it to save, if possible, some cycles that would otherwise be ...
1
vote
2answers
76 views

XNA graphics.PreferredBackBufferWidth's new value doesn't immediately change window size

I set the width and height of the window in my game constructor, and then pass the graphics manager to a class to check the value. In the game's initialize function, it doesn't seem to recognize the ...
0
votes
0answers
100 views

Scaling issues with Open GL viewport / scissor box (Trying to draw outside of viewport)

In my game I am currently scaling the viewport so it retains the ratio of my development device like so: width = (int) Math.min(deviceWidth, deviceHeight * 1.702127659574468); //1.702127659574468 is ...
1
vote
3answers
1k views

Confusion over GLViewport

I'm hoping someone can help me understand the GLViewport and what happens when we resize it This will illustrate my confusion.... So, here I have a quad stuck in the middle of the screen. If I ...
1
vote
2answers
147 views

Keeping ratio the same across devices on fixed screen game

My game is an Android game using OpenGL ES 2.0 (But this question could apply to any platform). I have read many questions on here regarding ratio management, and also read many tutorials outside of ...
15
votes
2answers
1k views

Camera vs Viewport

I'm don't have a clear understanding of what precisely is the difference between the camera coordinates and the viewport coordinates. Can anyone please clarify?
0
votes
2answers
673 views

Libgdx detect when player is outside of screen

Im trying to learn libGDX (coming from XNA/MonoDevelop), and I'm making a super simple test game to get to know it better. I was wondering how to detect if the player sprite is outside of the screen ...
1
vote
0answers
102 views

Create multiple viewports in minecraft?

Im new to minecraft modding, but Im curious about the possibility of creating a mod such that players could set up a 'security camera' with its own viewport so that the player could 'see what the ...
1
vote
2answers
78 views

How do you account for zoom in a top down viewport?

I've been stumped on this for days so please forgive me if this question is in bad-form. I have a generic top-down RPG structure, and I want to create a zoomable Canvas viewport for it. I've read ...
1
vote
2answers
66 views

How can I make an AI agent avoid screen edges?

I'm programming an AI agent and I want them to avoid the screen edges. I've been considering using either the obstacle avoidance or the fleeing behaviour. Do either of these make sense? How should I ...
1
vote
0answers
145 views

How can I scroll an HTML table when the player drags near the screen edge? [closed]

I'm trying to make my Word Search game mobile friendly. I want to display a grid of letters on the user's phone. The letters must be big enough that the user can touch them individually. My problem ...
26
votes
6answers
4k views

Why don't all games permit changing the field of view?

This is less of a question aimed at developing a game and more about the technology behind it. A number of gaming journalists and pro gamers (both on the tournament and the home entertainment sector) ...
1
vote
1answer
53 views

How do I render into a sub-region of a texture atlas with XNA / HLSL?

Is it possible to render into a texture atlas? I've been wondering how to reduce the number of textures required for shadow-mapping, and came across a blog post here about rendering up to sixteen ...
0
votes
1answer
95 views

Changing the maxDepth of viewport

Whenever I change the maxDepth of the viewport from 1.0 to say 300.0f (just for kicks), everything on my screen disappears. Why is that? Is there anywhere else I have to account for this change in ...
4
votes
1answer
554 views

How do I ensure that perspective and orthographic projection matricies show objects at the same size on the screen?

I am working on a 3d scene editor and would like to show the scene in orthographic projection. My current problem is that I am not sure how to calculate the orthographic projection matrix such that ...
1
vote
3answers
133 views

Can I use a translate function to implement a viewport?

I read this great question and its accompanying great answer about rendering a viewport in a top down 2D game: As for actually drawing the objects the camera can "see", you now draw all objects ...
6
votes
4answers
444 views

Is a game view “stack” really a Stack?

Given the academic definition of a Stack as "A data structure where items are added in a FILO manner and accessed in such a way that only the top item may be examined or removed to be modified." Game ...
2
votes
2answers
249 views

Orthographic Zooming with 0,0 at top/left

I'm trying to implement zooming on my 2D game. Since it's using orthographic projection, I thought it would be easy to implement zooming. After looking around the internet, I found a bunch of ...
4
votes
1answer
146 views

Can you help me solve the paradox that has confused me about the glViewport and glOrtho functions?

suppose that I have an image that I want to apply as a texture on a geometry (at time we don't consider texture mapping but this image has a certain width and height here it is a 512x512 image) I want ...
2
votes
1answer
121 views

How to obtain touch events from a GL Viewport, not the whole screen?

Background I'm implementing viewport resizing in order for my game to maintain the same display ratio on all devices. However, I've found an issue with getting touch events. Basically, if my ...
4
votes
2answers
3k views

Multiple viewpoints in Unity3D?

I'm working on a 3D game in Unity. The primary view is a top-down view, but I am also looking to do target profiles that are true animated versions that reflect the actions of the target. The ...
0
votes
1answer
330 views

Projecting world coordinates to screen coordinates issue - points disappear when origin not in view

I am trying to implement a 2d line drawing effect on a 3d mesh using Ogre. In order to do so, I perform silhouette detection on the lines of the object (this works) and then project these lines from ...
3
votes
2answers
176 views

Formula for converting ratio of current device to target device

I am designing my (Android/OpenGL ES 2.0) app on one device and want it to run all all other devices while keeping the screen ratio of the development device (so the image doesn't stretch / squash), ...
1
vote
1answer
391 views

Centering GLViewport position within physical screen

I'm developing my app on one device and want it to display at the same ratio on all other devices. Currently what I have is 'image 1' in my image below - the game fits perfectly onto my development ...
0
votes
0answers
170 views

Unexpected viewport location using monogame

I'm having an issue with viewports not appearing where they should. Two viewports appear a good 10 pixels below where they should be. I created a very simple test project that does nothing more than ...
-1
votes
1answer
319 views

View port for my canvas game

I am developing a canvas game, and im struggling to get my head around how i can make a view port so when the character moves the world moves with it. Unlike traditional 2d maps built with arrays i ...
4
votes
1answer
212 views

How can I full-screen a Facebook canvas game?

Is there any way to allow the user to click a button on a Facebook canvas app and allow the app to go full-screen? If it's possible, is it permitted by Facebook?
1
vote
1answer
407 views

Tiled map seen from an angle

I have working code to display a tiled map. It's composed of a OrthogonalTiledMapRenderer and an OrthoGraphicCamera : camera.setToOrtho(false, WORLD_WINDOW_SIZE.x, WORLD_WINDOW_SIZE.y); ...
-2
votes
1answer
332 views

Multiple viewports [closed]

[Problem solved ! I canno't answer with the response because i have less than 10 reputations. I have to wait 8 hours.] Currently, i'm trying to display 3 viewports. 1st : This viewport is the entire ...
0
votes
1answer
175 views

Camera Calculation

For my game I don't able to decide what camera resolution I have to use ? Normally I use 1024x600 landscape resolution of camera for my game and create single graphics for my game. But I found that ...
0
votes
2answers
363 views

3d vertex translated onto 2d viewport

I have a spherical world defined by simple trigonometric functions to create triangles that are relatively similar in size and shape throughout. What I want to be able to do is use mouse input to ...
4
votes
2answers
262 views

Render a 3D scene in multiple windows - extended panoramic view

Is there any resource location on how to view a 3D scene from an application or a game on multiple windows or monitors? Each window should continue drawing from where the neighbouring one left off (in ...