I publishing for manufacturing our ray tracing engines and products on graphics API (C++, Vulkan API, GLSL460, SPIR-V): https://github.com/world8th/satellite-oem
For end users I have no more products or test products. Also, have one simple gltf viewer example (only source code).
In 2016 year had idea for replacement of screen space reflections, but in 2018 we resolved to finally re-profile project as "basis of render engine". In Q3 of 2017 year finally merged to Vulkan API.
I have a two floats (pan.x and pan.y) which allows the player to move the view in my tile-based 2d-gameworld. I also have a "float scale" for zooming the world in and out.
For drawing most stuff it works fine. I just (where pos is the tile-position of something and #define TILE 20 is the size of a gametile at scale = 1):
drawStuff(pos.x * scale * TILE, pos.y * scale * TILE);
When I change scale it draws to the correct position on screen. But when i draw the lines that shows the grid (all the tiles) they do not offset correctly. It works when scale = 1, but when I lower scale they become off. I tried so many variations but I've got stuck. What am I doing wrong?
int tile2 = TILE * scale;
int offY = ((int)pan.y) % tile2;
// draw horizontal lines for the grid
for (int i = 0; i < h; i++)
gfx.lineRelative(0, TILE*i*scale + offY, gfx.screenX, 0, col);
Trying to get ideas here on how I could do this:
I have created a game for a university coursework assignment using a custom game engine (internal to my university, but it's based on OpenGL).
The game loads levels and menus from a file, this happens at initialization to increase performance while playing the game. At the moment the game loading time is 4.1s, but the loading time without the levels and menus is 0.961s- that's over 3s. As more levels are added the loading time will become longer and I want to add a loading screen.
I've tried to add one, but loading the levels and menus is blocking everything else, including rendering the loading screen. This means that the loading screen doesn't appear until the game has loaded and is overridden by the main menu. The game loading is done via its update function and via calling initialization functions of the various game classes, and the loading screen is rendered within the game's render function (the rendering is done on a separate thread, according to the game engine's documentation).
Any suggestions on how I can show the loading screen without the other loading activity blocking it from being shown?
I know that I can use threading but am unsure how thread-safe the operation would be to init the game on another thread.
I have a particle system with the following layout:
system / emitter / particle
particle is driven by particle data, which contains a range of over lifetime properties, where some can be random between two values or even two curves. to maintain a smooth evaluation between two ranges, i randomize a "lerp offset" on particle init and use that value when evaluating curves. the issue is that i'm using that same offset value for all properties (10ish) and as a result i'm seeing some patterns, which i'd like to remove. The obvious way is to just add more storage for floats, but i'd like to avoid that. The other way is to generate a seed of some sort and a random table, and use that to generate 10 values, ie: start with short/integer, mask it, then renormalize to float 0-1.