Hot answers tagged

17

Generally it is true, depending on your view point and in which direction it has moved, as well as the viewing angle. Note how in the first camera view, as the Red block is perpendicular to the camera view, the object seems to be twice as large in a perfect 1:2 ratio (Note the arrow pointing that it hits the edge of the view after being moved twice as ...


13

You'll be okay to ship your game to majority of your users with a configuration like that. Even the fairly old (nearly 3 years now) old Samsung Galaxy Captivate will run with a texture resolution of that size. You won't have too many issues supporting almost any device like that (I can't think of any off the top of my head. Okay, that's a lie... maybe the ...


12

One way to choose texture sizes is to have a target texel density relative to the size of an object. For instance, if you wanted 128 texels per meter, then an object 4 meters in size should have a 512x512 texture, an object 8 meters in size should have a 1024x1024 texture, etc. The same guideline can be applied to tiling textures as well. Another thing to ...


7

Use the organization of the data to your benefit. You can always be expect the data in the same order, so you know what the next bytes belong to. For example (not specific to your data), when reading in the data, always expect two bytes for tile type, two bytes for lighting information and then two bytes for extra info. So it knows that after 6 bytes, it's ...


6

An object twice as close does appear twice as big. It is a consequence of Thales's Theorem and it is true in the real world. One could argue that Thales's Theorem is the core mathematical tool behind perspective projection and what's known in the graphics pipeline (OpenGL or DirectX) as perspective division. It a theorem you should definitely know, and ...


6

Actually that's pretty much true (if you move an object twice as far away it looks half as big) but it obscures how the visual size of objects should change as the viewers moves. Specifically, objects appear to get bigger faster the closer they are. That's because the viewer covers half the distance a lot faster when the object is close, compared to when the ...


5

It seems that Warcraft II has maps in the range 32x32 to 128x128. And given that the large maps generally feel pretty large I'd say that you don't actually need more than that. Usually going larger pretty much just means that you have to have stuff fill more on the map.


3

What Byte56 says makes sense. I'm not sure why you need 2 separate coordinates (chunk coords and xy coords). But since a map is always square, the most basic representation is a 2D array of ascii chars ..,,.....@ ..,,@@@@@@ ...,,,...@ ......,..@ So there is the specification of a 4x10 map in 40 bytes. A 10,000 x 10,000 map would take 95MB, which isn't ...


3

camera = new OrthographicCamera(); camera.setToOrtho(false,800,400); Above code will draw everything in your game on 800*400 virtual screen (in pixel) and fit, stretch, fill etc (see viewports ) on device's screen, independent of device screen size. https://github.com/libgdx/libgdx/wiki/Orthographic-camera https://github.com/libgdx/libgdx/wiki/Viewports


2

you can say on pond tiles that they are part of a multi-tile object with a reference to where the actual data is stored if there is no data then you can create a type for each sub tile of the large object and just store those, so you can find the orientation and bounds by just looking at the type in game you can have it act as one object. edit: let say ...


2

Command & Conquer - Tiberian Dawn supports up to 64 x 64. Tile size is 24px x 24px. Red Alert 1 - The Aftermath supports up to 128 x 128.


2

Yes, that's the minimum size for an empty project when deployed. Mono Runtime The Mono Runtime which allows your C#, JS, Boo code to execute - basically like the .NET Framework - not a trivial piece of machinery! Unity Platform You know wherever you are using UnityEngine? That doesn't come from nowhere. All the logic and functionality of the engine (a ...


1

GUIText is one of Unity's legacy GUI elements, pre-4.6, so this might feel outdated, but still works. Define your base resolution height. Say you're working with a base height of 500 pixels: var uiBaseScreenHeight:float = 500; Now, what happens if the Android device's screen height is, say, 1500 pixels, which is 3x larger? You'd want to increase the ...


1

If you want a smaller footprint use a spiral staircase or a ladder


1

This is one method of updating a ScrollBar (or anything) after changing the content of ScrollView Text and wanting to react to the new width/height of the text after it is rendered. Platform: Unity 4.6 / 5 (I'm using Unity 5, but I think I used all 4.6 components), C# There are a number of videos on how to create scrolling text views for fixed-content: ...


1

I had the very same question while while starting out. Do take a look at the detailed answer I later posted. How does Unity size graphics When we set camera size, there's a certain screen height. This height is fixed irrespective of the device screen. On larger devices, greater detail, on smaller devices, lesser detail. So, if I chose 760px as ...


1

The problem was inside present parameters - i forgot to set backbuffer's width and height. dx_PresParams.Windowed = TRUE; dx_PresParams.SwapEffect = D3DSWAPEFFECT_DISCARD; dx_PresParams.BackBufferFormat = D3DFMT_UNKNOWN; dx_PresParams.BackBufferWidth = 1024;//Width dx_PresParams.BackBufferHeight = 1024;//Height dx_PresParams.EnableAutoDepthStencil = TRUE; ...


1

That looks like different size tiles, and not multiple small tiles in a premade configuration. If all the tiles are the same size, storing tile sheet information is simple. All you need to know is the number of pixels from the top and left edge of the sheet image. left_x, top_y If each tile is a different size, you also need to store the width/height of ...


1

Since you're not actually working in 3D space, we can assume the sprites never rotate (rotation can be simulated with skewing, etc.) This simple constraint makes it pretty easy to get somewhat accurate numbers on what the size should be depending on distance from the camera. First, you need to understand how 3D objects are rendered. Even though a camera ...


1

As far as I know there's no way around Texture2D size limit, so my suggestion is the following: Add a reference to System.Drawing to your project. Create an instance of System.Drawing.Bitmap to store your map. I don't think there's a size limit using Bitmap, because I even tried with sizes over 15000 pixels wide and it worked. Write your data to the Bitmap....



Only top voted, non community-wiki answers of a minimum length are eligible