TritonForge || Immersion RPG/Sandbox

The port to Slick2D is done!
I’m extremely happy with the results, and performance is much better.

2d6SnQ3Pr50

My primary reason for this was that OpenGL has interpolated sprite rotations.
OpenGL and Slick also make particles easier, and give me flexibility with game states.

Time to roll with this till i hit another wall :stuck_out_tongue:

Other than that, I’m looking in on how to store my Tile Arrays to the disk instead of to memory, I’m wanting to experiment with massive worlds but cant do that at the moment because of OutOfMemory errors.

Worlds can now be however big you want without getting out of memory errors.
Blocks in logic are loaded on the fly, and the rest of blocks out of sight are stored in a simple int array.

Therefore the general world is generated to an array of TempBlock(single int[]) objects that are much smaller than Block(all block variables) objects, so it doesn’t take up all of the heap space.

This will make life better because i can dev test massive worlds and people with low ram will still be able to generate larger worlds.

Smooth lighting is here, and it made me realize i should scrap the black borders.

The game feels so bright and real now, i can’t get enough of it!

It was pretty easy to do after porting to slick.

1.I print out every lighting value to an image the size of how many blocks are on screen.
2.I resize the image with bilinear filter and use that as a spritesheet
3.I draw the sprite of the tile that corresponds to the lightmap on the screen

As you can see, the results are veeeeeeery satisfying with this particular art style.

I am not a fan of the current character. I would like to see blending between the seams of the background between different tile types.

Block blends can be toggled on and off for anyone’s liking.

I don’t see any difference between the tiles. They are all hard lines.

Ahh, I’ll have to look into that. There’s probably a simple system out there I can adapt.
It shouldn’t be too hard to do because I can probably find a procedural way to do so through OpenGL.
If not, guess i just have to make a crapton of sprite variations.

Well you are drawing using all the tiles draw calls, inherently you are using a shader coupled. Using this and samplers, you can extend the tiles you have from 48 pixels to 64 pixel, for example, and draw the 48-48 range in the shader. Lets say 0.2-0.8 is the actual tile. The 0-0.1999 and 0.8001-1 are the blending parts where you mix the colors together in some gradient fashion, using a 64 pixel blendmap. In the 12 pixel range between 48 and 64, you would have some more of the tile of course, and you can even get away maybe using a solid color or a real low res pixel variation of the image.

I believe that this is relevant to this discussion.

https://web.archive.org/web/20120526084938/http://www.m4x0r.com/blog/2010/05/blending-terrain-textures/

I can generate an alpha map successfully, but I’m having trouble implementing it properly.
Tiles:

Map Example

The white is opaque, black is transparent.
I want transitional tiles to draw on the white by using it as an alpha mask, but I can’t get it to do that properly.
If someone familiar with this in lwjgl or slick could provide a link or some advice, It would be appreciated greatly.

It turns out that the problem that made me waste hours and hours wasn’t with my code, but with my alpha tileset :stuck_out_tongue:
I didn’t know that it needed to actually be transparent in the .png, so before i just had fully opaque gradients.
But that’s history, and now fading can be played with by making different mask tilesets :smiley:

Does this look alright? Or should i consider a harsher transition like Terraria’s?

Experimented with more blend masks, and thought it would make sense to share the results:

What do you guys think so far?

Looks noticably better. Now work on alternating the background terrain tiles so that they don’t look all griddy :slight_smile:

You can do this with a simple boolean or something. You just have to reverse the Y axis of the texture coordinates. For example 0 becomes 1 and 1 becomes 0. You may even do it on the X axis too.

One more thing, you should try to experiment with the gradient length too. It may be short. I don’t know because im not the one testing it :slight_smile:

I will look into the background tile alternating, but about the gradients. I can’t really make them any longer
since the tiles are only 12x12 in size. I already had a pass where I made them bigger too.

Maybe in the future I’ll downscale the graphics with resetTransform() and use 24x24 alpha map tiles.
Yeah, I think that I will for sure. ;D

Doubled the alpha map resolution, and I didn’t need to change the code because my system
doesn’t lose pixels when downscaling (Forgot about this)

I think its pretty safe to say we have a winner here, so now I can move on to mobs and
actually using the XP bar I added last week :stuck_out_tongue:

Looks cool :smiley:

What’re you using to make it(Java obviously haha)? :stuck_out_tongue:

Why the donation button? ???

ItsAJavaGame its a java game.

I wish he used Lua :stuck_out_tongue:

He uses libgdx Slick2D and Java2D.

Lol the donation button isn’t super serious, but I hope this game reaches production before I finish highschool, the donation button is there just in case the one odd person would enjoy contributing to marketing this game(website, ads, greenlight etc.)

You really never know.

New Video up! Closer look at tile blending.

HouWB_1ODfc

I used the bitwise method described here for both alpha masks.

http://www.saltgames.com/article/awareTiles/

And just for fun, a better version of the minimaps I sometimes render:

+1 for fully copyrighted stuff