Tag Info

New answers tagged

0

Conceptually, games can adjust to screen resolutions by scaling UI elements. If you want to take the easy route and use Unity's UI, this can be done pretty easily with a Canvas Scaler. I don't think that SFML has a canvas scaler and a well-made one can get pretty involved. A simpler canvas scaler has a reference resolution which is used to build your UI ...


5

Indeed, the values stored in the z-buffer are not linear to the actual z coordinates of your objects, but to their reciprocal, in order to give more resolution to what's near the eye than to what's closer to the back plane. What you do is that you map your zNear to 0 and your zFar to 1. For zNear=1 and zFar=2, it should look like this The way to ...


0

1000/65536 == 0.0152587890625. Just use increments of 0.015 or maybe 0.015625, because it has accurate binary representation (2**(-6)). With the latter you'll get 1000/(2**(-6)) == 64000 unique positions.


0

Apparently Unity only render one face of the quad with the default shader (you can test it by moving your camera around). By setting another shader (in your case "Sprite/Default" should do the stuff), it will render both faces. At least it solved the problem for me. The reason it work with negative z is that a negative scale will flip the quad (thus ...


0

Maybe you should change You'r approach to something simpler. What I would do; Keep your Z depth thing, but keep a list of what you render. Order that list based on the z Depth value, and render objects in the order of the list. Hope this can help. People always tell me to keep things simple.


0

You will get all needed informations in the official documentation: see Manual: 2D Textures. Basically you can control the "quality" of textures by tweaking the compression format and filtering mode.


1

If you need good image quality you can use Format: Truecolor or ARGB 32 with an high Max Size and avoid compression: You can try playing with Filter Mode and Aniso Level too in the advanced settings:


1

I use MRT rendering for this; I render everything into both a diffuse map and a glow map. I then blur the glow map into a bloom-like effect, and add it back on top of the diffuse map as a post-processing effect. This way I can make objects that glow (by drawing their diffuse color into both the diffuse and the glow map), objects that don't glow (by ...


2

Usually bloom is done with HDR rendering where you use a floating point (usually 16 bits per channel) texture for rendering to. Things that are brighter than 1.0 get bloom applied. Things that are 1.0 or less don't get any bloom. You render everything to the same texture, and remove anything that's not bright enough to bloom when you start processing the ...


4

Yes, generally, games are a single main loop. Games in Java may have a separate main loop for each menu/screen/mode due to Java's idioms, but that of course does not solve your animation wait problem. For things like the problem you are running into, consider using events. e.g., when your animation system finishes playing an animation, it can send out an ...


0

You can also combine approaches from other answers (esp. splitting work into chunks, and finding bottlenecks in code) with implementing the most CPU-intensive tasks in asm.js - it's (a subset of) JavaScript, and it's fast on Fx and Chrome (and IE support is coming later).


3

which means I can only see half the model You can never see the "back" half of the model :P The following is a high-level overview listing some of the LOD considerations for this type of game. 100% of it may not apply to your game and/or KSP. Also, I haven't specified any implementation details for Unity, since I don't know them yet; rather than define ...


1

The issue is that you need a LOD algorithm. LOD stands for level of detail and it means essentially your sphere is only as big as it needs to be in each situation. When you are far away it uses fewer polygons. When you are zoomed in close, maybe only part of the sphere is in memory, and that visible section has a lot more detail than usual. There's lots ...



Top 50 recent answers are included