Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [scale]

Scale in relation to the geometry, in a game, whether that be 2D or 3D.

0
votes
1answer
47 views

How to scale an object in one direction without moving the opposite edge?

I am using Unity. In my game, I have an SpriteRenderer and I'd like it to increase its size I'd like it to lengthen to the right, without moving the left edge. I tried changing its scale to ...
0
votes
3answers
99 views

How can you tell if you are a large player on a large map or a small player on a small map?

If everything is scaled by a constant factor, can you tell that the world is smaller or larger? I think you could look down at the ground and see that it's "closer". But how do you know what ...
0
votes
1answer
49 views

Scaling web game to suit any screen size

I've made a simple multiplayer game, and now trying to make it fit on any screen size. I've tried stretching it out to fit the browser size, but it just appears weird and distorted. I'm also trying to ...
0
votes
1answer
77 views

Confused by scaling, units, and more

Ok, so I've already waded through a bunch of questions around this, and it's just making me even more confused. Let's say I am trying to model a card table in a 2d game. Behind (beneath) the table ...
0
votes
0answers
17 views

Parenting through code distorts object

I'm trying to learn how to make a grappling hook system and have been doing some research. The most effective tutorial I found so far was this one: https://www.youtube.com/watch?v=MR1XK-q265E So I ...
0
votes
1answer
50 views

Transforming 2D viewport coordinates after scaling the viewport (zoom in/out)

I've been getting started with personal experimentation and have been working on a project for a few days now using SDL2. It is a 2D game, and at this stage I have it rendering game objects in a fixed-...
0
votes
0answers
29 views

Relative camera movement with character in center

I'm trying to translate and scale a 2D space from world space to camera space with my character in the center. Adding in the scaling is tripping me up. Here's what I've got so far, without the ...
0
votes
0answers
19 views

pinch zoom tracking touch points?

is there an example showing a pinch zoom which tracks the position of the two touch points? That is, using pinch zoom to zoom on an object, such that the 2 points on the surface of the object that ...
0
votes
0answers
18 views

Unity 2D transform scaling with boxCollider

I made an SWF animation in Flash, which I imported into Unity with a plugin I found, however the prefab the plugin creates is enormous, therefore I scaled it way way down. I added a 2D boxCollider, ...
0
votes
0answers
33 views

How to prevent fixed-tile movement

I have a tile-based game with dimensions of 28 x 31 (I'm recreating Mrs. Pacman), and inverted y-axis. The upper-left tile is 1,1 and the lower right is 28,31. Due to the map being very small, I'm ...
1
vote
0answers
46 views

2D: Scaling a character with multiple RigidBody2Ds?

So, this example is in the Godot Engine, but other engines porbably have this kind of problem, too: I have a character with multiple RigidBody2Ds, that also has a ...
4
votes
2answers
188 views

How to do 1.5x scaling for pixel art where only one dimension has to scale?

I'm working on a point and click adventure game where the top third of the screen is a 16:3 single piece background with sprites on top. The width has to be edge to edge. It can't be cropped because ...
0
votes
1answer
60 views

Change center point and size with the help of the Matrix in Unity

Let us suppose I have an array of Vector3, it contains vertices. Now I want to scale the vertices and/or change the center point of the texture (move texture ...
2
votes
0answers
43 views

Large Mesh at a far distance

So I am trying to do something like KSP, where I have a ground to orbit Level of Detail with the planets. And from theirBuilding a new Universe Video I know they are using scaled space, and local ...
0
votes
0answers
25 views

grow heap on load several bitmap-scale bitmap to screen size [duplicate]

in my game i use surfaceview And Canvas to draw sprites on screen for achiving this in all screen size: i test two way: first: when canvase want to draw Framebuffer(final bitmap) on screen, scale ...
0
votes
1answer
415 views

Change localScale.x in Unity without creating a new Vector3

Is it possible to change localScale.x in Unity without creating a new Vector3?
1
vote
0answers
150 views

How to scale game with orthographic camera correctly? [duplicate]

During porting to android I encountered that the game does not fit on the screen in portrait mode. It uses an orthographic camera. How could I scale to game to fit the screen in portrait mode?
0
votes
0answers
166 views

Asset imported from Magica-Voxel in unity is too big for the scene view

I am new to game development, I have created a game scene in MagicaVoxel (126 x 126 x 126 i.e full dimensions). So when I import it in unity (as an Object) the size of the asset is too big. So I ...
1
vote
1answer
596 views

Scale object based on another object's position

Despite an hour or so of Googling I can't seem to figure out how to calculate the scale factor based on distance. Here's the illustration of my problem. I've tried manipulating the x values and such, ...
0
votes
1answer
1k views

Unity: How to resize a game object for a certain amount of time?

I've tried to make a coroutine like this ...
2
votes
2answers
181 views

How do I work out what resolution my backgrounds should be?

I'm working on a game that's 1200 x 800. The pixels per meter ratio is 1:20. When I add my background texture that is 400 x 225. It fits well in the zone however the lines on the image are pixelated. ...
1
vote
1answer
360 views

Android: Make game look the same on all devices

I'm trying to get my android application to look the same on all screen devices. I assume I have to do something regarding the density, I just can't figure it out. And while I have seen very similar ...
2
votes
0answers
141 views

Bullet Physics Scaling rotational part of 6DoF Spring Damper

I am currently trying to scale up my setup (consisting of two rigid bodies connected by a btGeneric6DofSpring2Constraint) to fall within the suggested dimensions for a concise simulation. In order to ...
1
vote
0answers
34 views

What is the perfect sprite size for new ipads with retina displays [closed]

The graphic designer is sending me huge sprites 3000px in width drawn by hand. And now the company is hiring a professional painter to paint huge oil paintings for the game for other levels. Nothing ...
3
votes
0answers
1k views

Phaser: Scaling to fill screen, maintain pixel ratio, but not aspect ratio

I've used libraries in other languages before that provide different types of scaling via viewport types. The best example of what I want is from a library called libgdx for Java, their ScreenViewport....
0
votes
1answer
71 views

Supporting uniform/non-uniform scale in hierarchical animation

I have worked with hierarchical blended animation systems for a number of years, but I have never been quite sure how to handle scale correctly. The introduction of non-uniform scale is additionally ...
2
votes
1answer
182 views

Make virtual joystick preserve aspect ratio Android in Unity

When I start my game on Android my virtual joysticks stops being round. Here you can see it: Here is the project on PC at the same time: Here are my UI settings for the Joystick: Please, help me ...
0
votes
1answer
407 views

LibGdx: set TextButton font to a TrueTypeFont

I am making my first LibGdx game, and having an hard time understanding font scaling on TextButtons. Here is a comparison between the rendering on my Kindle Fire 7 and an high resolution tablet: I ...
0
votes
1answer
150 views

Cocos2d-x setContentSize, setScale give poor graphic quality

I want to create sprite with size is relative to the screen size. I.e: Sprite size is equal to screen width * 0.2. I use setContentSize and ...
0
votes
1answer
148 views

Hard edges with non power of 2 images in OpenGL

When down scaling 2D images in Java2D, it does a great job at preserving hard edges while downscaling to non power of 2s. However, in OpenGL, I have been unable to find a solution to this. I have ...
0
votes
1answer
100 views

Re scaling an object from its current scale to a scale of 0

I want to have an animation which starts at a starting scale of whatever the current gameObject's scale (i.e 1, 1, 1 or 2, 3, 2) is which then end at a scale of 0, 0, 0. The problem is that Unity's ...
2
votes
3answers
481 views

Unity 5.5 Android scaling

The questions I've seen are outdated, explained, not to my liking, or just don't work. Problem: I want to be able to create a game that can scale on all mobile devices with ease and with no ...
0
votes
1answer
2k views

How can I scale/zoom to a point in canvas in the game?

I am using html5 canvas to build a MMO game. When I scale my background by default it scales to (0, 0) which is the top left corner of the background. If I have ...
1
vote
0answers
53 views

Where to put Tweening effect codes in HTML5 Canvas game?

I am building a javascript HTML5 canvas game and I need to scale the map. However whenever I scale my map the screen stutters very obviously. To scale smoothly without player noticing I add Tween ...
0
votes
1answer
121 views

Issues with 3dsmax and Unity3d scale

I changed the units in Blender so they are identical to Unity 3d. If I make a 1m^3 box in Blender, it will import into unity as exactly the same size as the standard cube. With 3ds max, I changed ...
1
vote
2answers
281 views

Unity3D position of 2D objects with size of Object

I'm making a 2D project in Unity3D. I want to place an image in the right upper corner. I've got this working, but ofcourse the image is falling of the screen for a part (and completely when I change ...
0
votes
1answer
181 views

how to correctly scale box2d in libgdx

I'm currently using 800x480 resolution and FitViewPort and I divided that by PixelPerMeter variable which is equal to 10 and that helped to move my box2d body faster. But when I tried to use fonts I ...
13
votes
2answers
6k views

Scaling my pixel art platformer from 720p to 1080p

I'm developing a pixel art 2D platformer for PC and smartphone, but I'm stuck on a technical issue. I chose to have a 32x32 tile resolution, and a 64x64 character sprite resolution. The levels are ...
12
votes
1answer
4k views

What makes scaling pixel art different than other images?

Recently I was coaching a developer who's new to making pixel art games, and realized there's some "conventional wisdom" around scaling pixel art that's not obvious to a newcomer, and might not be ...
1
vote
2answers
467 views

How to fake a 3d character displacement by sprite scaling in GameMaker?

I want my 2D sprite to become bigger when moving down the screen (closer to the camera), smaller when walking away and to maintain the same size when moving left or right. The scaling along the y ...
1
vote
2answers
491 views

GUI scaling: Viewport-based scaling or individual logic

I want to use scene2d for creating a GUI for a libGDX game. In scene2d all sizes are provided in pixel units (instead of percentages). So I wonder what is the best approach to deal with different ...
0
votes
1answer
222 views

Looking for a dirty pseudo 3D trick

To be specific I want to do bad sprite scaling like in Operation Thunderbolt. For some reason I'm getting it all wrong so far. I started over from scratch and I've literally got a sprite that follows ...
0
votes
1answer
179 views

MonoGame - scale down a sprite from the middle

I want to animate a texture's scale. First it's scaled up to 10, and then it gradually goes down to 1. However the texture is drawn at Vector2(0, 0) so it doesn't ...
2
votes
1answer
339 views

Unity2D: Scaling and Locking Image to anchor points

I have a script that uses Index to change an objects sprite using OnClick to move through the sprites, like a slideshow. I want the image to scale to the size of my anchor points, because I've notice ...
0
votes
3answers
337 views

Scaling a rotated rectangle in a given direction

I'm facing an issue when trying to scale a rotated rectangle in a given direction. In my context, the width and height of the rectangle are based on the texture size multiplied by a scale factor (...
1
vote
0answers
184 views

Resizing the map in HTML5 canvas

Say I have a big map for my HTML5 game. And it is drawn with an image repeatedly. I want my map to be able to resize and respond to player's behaviors. Now I can resize my map, I just multiply a ...
1
vote
0answers
287 views

(GameMaker) Smooth scaling and transparency while zooming

My game has a zoom function. There is a man in a spaceship, we can see the interior of the room room from side on as the outside is totally transparent. When I zoom out I want the outside of the ...
1
vote
0answers
88 views

Instanced based game with multiple node instances

I have a nginx load balancer with 4 nodejs instances behind it, and one Redis server to ...
4
votes
1answer
222 views

How to keep sprite on screen while increasing its width to screen width

I have been able to increase the width of a sprite to the width of the screen size, but the sprite exceeds the borders of the screen width to the right or left when I try expanding it when it's not at ...
0
votes
1answer
201 views

Bullet: Apply any Transformation to RigidBody?

I'm using Bullet for CollisionDetection. I load a scene from a Collada-File using Assimp. Let's say I want to give every object in the scene a RigidBody with a box as CollisionShape. Right now I first ...