What I did today

EDIT:
Also, here’s this:

wxG1qz0mRV0

Uploaded an example done by shader expert Cypherdare showing how color grading can be done in Libgdx:color grading

Spent some time making a few shaders for my next game:

https://lh4.googleusercontent.com/2m1WmcEeWqKcREoShS926rViG4aRWLcm1uy7ZmI1IC_kDK-OygooBIRXshhGUA0lEw4TpaU3iUKxN-Y=w1366-h638-rw

(EDIT: if you can’t see the image please refer to my next post, or go directly to imgur: here)

The blur one is a little cheap so if anyone could point me to helpful resources that would be awesome! Or if you have any other ideas of cool looking effects for a 2D strategy game please share :point:

Btw the ninja sprites are from gameart2d

J0 :slight_smile:

Image is broken for me

I’d like to do a “ripple-fade” of some sort. I think there is a JavaFX tool that lets you create a 2D map of translation values, the name is escaping me at the moment. I have yet to investigate how to animate a series of such translation values so that a “rippling” occurs. The fading part is easy, handled via an opacity property. I worry that creating a large array every animation cycle will be too costly–but probably that will be just fine and will be the way to go. Saving a cycle of several dozen might work also. I probably worry too much about using up memory.

Is this working better? Imgur instead of gDrive:

I just realised that for some reason my gif was appearing without JGO’s gif player… :persecutioncomplex:

@philfrei isn’t it our fate, as programmers, to worry about memory all the time? :slight_smile:

Worked on my SSR a little bit more today.
Found some nice high-res textures to test it with :slight_smile:

Decided to rewrite most of my engine for lwjgl3. It’s almost there now.

Our Robot Farm trailer is finally out!!

Don’t have pictures yet, but I got a plexi glass screen for my arcade cabinet and cut it, as well installed a metal screen thing to hold the marquee/hide the speakers.

Bit more progress from me over the last couple of days:

https://dl.dropboxusercontent.com/u/1668516/shots/walkerstown.png

And a you tube run through:

FOXuRGIvhzA

Cheers,

Kev

Nearly done with the rendering functionality for my lwjgl3 engine :slight_smile:

Looks great :slight_smile:

Is your anti-aliasing on, though? And is it just me, or is there a really small white halo around your objects?

Havent written an AA shader yet. It’s on the list :slight_smile:

The white halo is just a little bit of rim lighting.

thats 2.5D ? … was actually about to ask how much code that cube took.

Cheating! Here I am still trying to get a solid swapchain system working…

What’s the point of Vulkan if it really is that hard to get anything out of it?

[sup][sub]My Games Programming tutor mentioned some 4th year students were making their project using Vulkan[sub][sup]

Just got an idea to generate a polygon from an image, and started to code it out. There are a few imperfections, but it is looking out nice!


Polygon polygon = new Polygon();

List<Vector2> vertices = new ArrayList<>();
Color pixelOut = Color.REUSABLE_STACK.pop();

// Start scanning the image from left to right, and then from top to bottom
for (int y = 0; y < image.getHeight(); y++)
{
    boolean found = false;

    for (int x = 0; x < image.getWidth(); x++)
    {
        image.getPixel(x, y, pixelOut);

        // Add the first non-transparent pixel
        if (!found && pixelOut.a != 0)
        {
            vertices.add(new Vector2(x, y));
            found = true;
        }
        // Add the last non-transparent pixel
        else if (found && pixelOut.a == 0)
        {
            vertices.add(new Vector2(x - 1, y));
            found = false;
        }
    }
}

// We got the vertices that surround the image, but they are in scanned order.
// Sort them into clock-wise order
Vector2 imgCenter = Vector2.REUSABLE_STACK.pop().set(image.getWidth() / 2f, image.getHeight() / 2f);
Collections.sort(vertices, (v1, v2) -> (int) (v1.angle(imgCenter)) - (int) (v2.angle(imgCenter)));

And it looks like this in action!

Looking cool! This is very inefficient however, generated 880 vertices for this simple tree image. I’m now going to try creating a convex hull over this concave polygon.

It’s not hard to get “anything” out of it. I already have gotten something out of it. The reason I’m stuck is because I’m trying to design a swapchain manager that works with a dedicated GLFW thread and dedicated Vulkan thread. The swapchain feature of Vulkan is actually really powerful. In OpenGL you just have the default framebuffer (FBO 0) which you can bind to render to the main screen. This framebuffer is in turn backed by (usually) 2-3 different images to achieve standard double/triple buffering, but these images are hidden and can only be rendered to.

In Vulkan, you create a swapchain which in turn creates the images for you, but the key here is that you actually get access to the actual images. You can use them as compute shader write-only textures, write to them from the CPU (nice for software rendering/emulation!), copy to and from them, even use them as textures if you’re feeling nuts. If you want to render to them, you need to bind them to a framebuffer manually. The cool thing about this is that we can even gain a bit of extra performance here by being able to exactly control what happens with the images.

Some hardware requires images to be converted to specific layouts for different usages. They may use different layouts for render targets, for textures and for presenting to the screen. In OpenGL, the driver has to guess what you’re trying to do and do these layout transitions implicitly. In Vulkan, you just tell it exactly what to do, which means that you can save a lot of work there. For example, after presenting an image you can skip the layout transition if you know you’ll always clear/overwrite the old contents. Also, with the fancy render pass system in Vulkan, this means that you can include the copy to the screen as a subpass, which can help improve performance, especially on mobile/tiled GPUs.

mysterious fbo zero. like texture zero, what the hell?

Some progress on my multiplayer game!

4 Clients connected via kryonet

  • Each client has physics object in the server’s Jbullet world (and its own)
  • All clients have their own dynamics worlds
  • All physics objects are instanced by the server to the client using UUIDs generates server side
  • If the client finds a new UUID in the batch, it constructs a new container for that info which acts as an address to update it later
  • Player input is sent to the server using 2 bytes for keyboard input (right, left…) rotation is sent in a quaternion of 4 shorts (tracking it server side wouldn’t make sense ;D)
  • Teacup is constructed using an OBJ model, and its physics model is made using triangles (Its pretty slow to construct but ok when its ran)

I tested this over the internet with a friend of mine and it works very well too