1
\$\begingroup\$

As I get closer and closer to the end of the feature development for my game and the beginning of the graphical overhaul, I keep thinking of ideas for graphical effects that would make my game even better, but Slick2D is so limited in terms of graphical capabilities. The LWJGL layer is exposed, and thus, basic OpenGL functions, but I don't know anything about the various blending functions and other functions available to me.

A couple of the most basic things I need to be able to do are to be able to properly blend images and primitive shapes together, and to be able to create a proper lighting system. As of right now, I simply have a black and white "stencil" for my flashlight that I blend with a flat black layer that's drawn over everything and set its opacity so it sort of looks like a flashlight. However, I'd like it to look better and to be able to have other light sources in the scene.

Also, I'd really like to be able to have "glow" effects, such as electricity or fire that brighten up the scene and don't just look like flat pixels. Is it as simple as additively drawing these images/shapes to the scene? Or is there more to it?

I know Slick2D is horribly outdated and no longer supported and I never should have used it, but it's definitely the last time I'll be using it. I only went to it because Java has limited game libraries available and LibGDX was giving me a lot of trouble getting started.

I'd appreciate any articles and examples.

EDIT: As an example of the "glow" effect, here's a neat explosion effect created in Unity that I found on /r/gamedev. It would be great if I could get something like this in my game.

https://www.reddit.com/r/gamedev/comments/8wurqc/stylized_explosion_shader_breakdown/

\$\endgroup\$
0

1 Answer 1

1
\$\begingroup\$

slick2d shader's language is glsl so this tutorial is useful for you

but anyway I want to explain that how to make explosion effect that you added in your question.

1.posterize noise texture

Posterization or posterisation of an image entails conversion of a continuous gradation of tone to several regions of fewer tones, with abrupt changes from one tone to another.

https://en.wikipedia.org/wiki/Posterization

enter image description here

2.use color palette and add to your Posterization

this is a common way to add color to different level of Posterization that also used in celshading

example 1:

enter image description here enter image description here

example 2:

enter image description here enter image description here

3.then use cut off to make cut based on your noise texture

just use noise as alphaclip of your shader

this youtube tutorial will help you.

\$\endgroup\$
7
  • \$\begingroup\$ As far as I know, Slick doesn't have any implementation of shaders. Are you telling me it does? Because I've gone over the documentation and can't find any mention of it. \$\endgroup\$ Apr 12, 2019 at 11:49
  • \$\begingroup\$ Ah... I never thought to check LWJGL. And here I thought I might never get to add shader effects to my game. \$\endgroup\$ Apr 12, 2019 at 11:55
  • \$\begingroup\$ @DarinBeaudreau I didn't use Slick2D but why you use Slick2D you can use another game engines like jmonkeyengine.org \$\endgroup\$ Apr 12, 2019 at 18:52
  • \$\begingroup\$ Because my game is 2D and I wanted something lightweight that wasn't so damn hard to get up and going with? LibGDX gave me so many problems just setting up a basic window to draw to and I didn't like how it handled drawing and that there was no way to draw primitive shapes. \$\endgroup\$ Apr 12, 2019 at 19:39
  • 1
    \$\begingroup\$ I don't care about Unity. I wanted to build my own engine. Just because something is "easier" doesn't mean it's better. Thanks for the Shader example, though. \$\endgroup\$ Apr 15, 2019 at 12:14

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .