Tag Info

Hot answers tagged

12

This is achieved by interpolating ramps between cubes of different height. When you have a scenery like this (seen from the side) # #### ## ############ you would add polygons to make it look like this: /#\ /####\ /##\ ############ An algorithm to calculate these ramps is the marching cubes algorithm. When you want it to be even more beautiful, ...


4

It's not necessary, in the sense that you can make it work. But your approach is somewhat... awkward. In your approach, the pre-render and post-render work (such as clearing the appropriate render targets, and then presenting the final frame the screen) has to be done before and after getUserInput(): while (game_is_running){ prepareForRender(); ...


4

There are two obstacles you need to deal with in order to achieve similar quality like the one in the image, the first is artistic and the second is technical (memory, processing). First I assume that you already solved your artistic problem, you can make the models, the art and the shaders etc. (Partially because I can't answer art problems) The major ...


1

The conversion from a unit to another is a matter of a simple multiplication. You can implement a ConvertUnits static class with functions like ConvertToGameUnits(), and ConvertToBox2DUnits() to make it easier. I haven't used libgdx or Box2D, but i have used Farseer Physics engine which is basically identical with box2D but made for C#. With that being ...


1

If you use a point sampler for your mask texture, then you can store as many IDs as bits in your texture: for a 32-bit RGBA texture you'd be able to store 128 different IDs. In such a case though, as you have a single bit per ID, there's virtually no blending as you have only 0 or 1. The more bits you devote per ID, the greater the blending granularity, ...


1

Lets call everything that happens inside a game an event for the duration of this answer. The events that occur in a game are not "observing" the game model. They happen every x frames. Rendering for instance happens every frame and the view doesn't need to care if the model changed or not since the previous frame. It normally will render every frame. This ...


1

Big engines using 'premutation' that make many shaders for every specifited set of material features. But thats not solution for 'deffered' rendering, for deffered rendering you should implement material 'indexes' Indexes will select proper render path, and all material caps. Usualy indexes created in matrial pipeline, when level builds. Small parts of ...


1

You can use a tiny neutral texture to "disable" shader features you're not using which incurs a texture switch penalty but no shader switch penalty. You can generate multiple shaders with all feature combinations and switch to the proper shader, this incurs a shader switch penalty but the simpler shaders execute faster. Which ever is best depends on which ...



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