TritonForge || Immersion RPG/Sandbox

Quick Swing tip: put this somewhere:

static {
    UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName())
}

Thanks for that. Don’t really know which look to go with though

For things which aren’t game UI, typically the closer to native OS look the better. I.E SystemLookAndFeel.
For a lot of work and dubious gains you can also go full custom, like the steam client.

A splash screen has been added to show that the process is running until the menu comes, and it made a bigger difference than i expected

For the Look and Feel, I would love to go full custom, but once again have no idea where to start. After looking into it I decided that it would be best to uphold that tweak until later. Now what I think i will do is re-implement fluid for like the fifth time :stuck_out_tongue:

Are you still looking for anyone to help with programming? I don’t have a project to work on right now after I halted Project MP. Your game seems quite similar to what Project MP was supposed to be and I (probably) wouldn’t mind working on something new yet familiar.

Unfortunately not on this particular project. I deeply appreciate the offer though, and definitely would be interested on cooperation and code assistance when I have a few extra days on hand, but time is scarce now that school and sports are back :stuck_out_tongue: Maybe I will PM you! :slight_smile:

I know what it is like to not have anything to work on though, it’s bland at times.

Just uploaded a new video showing how the update system works, in case anyone wants to see it in action.

DfhLlpheYSI

Check the Original post for the new download link for the app installer, with auto-update functionality.

Or use this link here
TritonForge Installer

Im curious, how does your lighting system work exactly?

My light system is heavily based on the algorithm found on this thread:
http://www.java-gaming.org/index.php?topic=26363.0

public void applyLightRec(int currentx, int currenty, float lastLight) {
   if (!isValidPosition(currentx, currenty)) return;
   float newLight = lastLight-map.getLightBlockingAmmoutAt(currentx, currenty);
   if (newLight <= map.getLight(currentx, currenty)) return;
   
   map.setLight(currentx, currenty, newLight);
   
   applyLightRec(currentx+1, currenty, newLight);
   applyLightRec(currentx, currenty+1, newLight);
   applyLightRec(currentx-1, currenty, newLight);
   applyLightRec(currentx, currenty-1, newLight);
}

But it isn’t anything more than a recursive flood fill.
each block has a “light” value, and any block that casts light, goes in all for directions.
Based on the next block’s density (an int i called blighting), the light value of that block is modified
then it does the same thing starting from the original light decreased by its own density.

The end result is the lighting you see in my game (:

public void applyLightRec(int x, int y, int lastLight, int xt, int yt, int r, int g, int b, int alph) {
			int x1 = (int) (xt + ( TritonForge.pixel.width / TileArt.tileSize) + 2);
			int y1 = (int) (yt + ( TritonForge.pixel.height / TileArt.tileSize) + 2);
			if (x < xt-10 || x > x1+10)return;
			if (y < yt-10 || y > y1+10)return;
			int newLight = lastLight+getLightBlockingAmmountAt(x, y);
			if (newLight >= getLight(x, y)) return;
			
			Light u = light[x][y-1];
			Light d = light[x][y+1];
			Light ri = light[x+1][y];
			Light l = light[x-1][y];
			
			light[x][y].r = r;
			light[x][y].gr = g;
			light[x][y].b = b;
			light[x][y].alph = alph;
			light[x][y].lighting = newLight;
			Color col = new Color(r,g,b,alph);
			Color col1 = new Color(u.r,u.gr,u.b,u.alph);
			Color col2 = new Color(ri.r,ri.gr,ri.b,ri.alph);
			Color col3 = new Color(d.r,d.gr,d.b,d.alph);
			Color col4 = new Color(l.r,l.gr,l.b,l.alph);
			Color new1 = blend(col,col1);
			Color new2 = blend(col,col2);
			Color new3 = blend(col,col3);
			Color new4 = blend(col,col4);
			applyLightRec(x+1, y, newLight, xt, yt,new1.getRed(),new1.getGreen(),new1.getBlue(), new1.getAlpha());
			applyLightRec(x, y+1, newLight, xt, yt,new3.getRed(),new3.getGreen(),new3.getBlue(), new3.getAlpha());
			applyLightRec(x-1, y, newLight, xt, yt,new4.getRed(),new4.getGreen(),new4.getBlue(), new4.getAlpha());
			applyLightRec(x, y-1, newLight, xt, yt,new2.getRed(),new2.getGreen(),new2.getBlue(), new2.getAlpha());
		}

Blocks can cast light at different brightnesses that way. My color system is flawed though so I won’t touch on that yet.

If the block is not visible, then the method stops flooding past that block.

So the last image shown in this concept reel

gUM_qgZ5F_k

Is being materialized into something, how is it looking? anyone have any suggestions to make the basic outline more interesting?

NOTE: This is only a mock screenshot

I am confused. What did I watch. :clue: This concept reel is not usable for the target audience of the game.

How exactly do you handle the lighting on the tophone of your world? I am using a modification of that lighting algorithm you posted but I can’t think of an efficient way to light the entire top of the world. Any tips?

What do you mean? and It is a bit hard to recognize because i literally just threw together all of the scribbles i had without taking clarification into consideration… Anyway don’t pay too much mind to that, other than the last images. It’s interesting to try and recognize it.

Do you mean all at once? Like straight across the top?

Yeah how do you determine what is the top layer? Do you have a skype I could message you over? I’m making a game similar to terraria and it’d be great to ask you how you handled a few things with the lighting. I have the basis down just need to brainstorm some more ideas to questions I have

Drey.Warde is my skype, but this has a pretty simple explanation anyway. lighting doesn’t go top down, it goes in all directions at once. now if in your version it goes top down nothing changes really.

each block has a variable known as “castslight”.

on block property updates, the engine will see if the block is a type that should cast light (I.E Air, torch).

If the value is false, then the light tile corresponding to that block remains completely dark.

If the block does cast light however, the flood fill algorithm starts from that block, and the goes for the whole screen.

Well, that is exactly what it looks like. Arbitrary stuff thrown together with a random soundtrack (that takes ages to get up to speed). It’s like dragging whatever is in the garage on the sidewalk, taking photos of it, making it into a video, and calling it a ‘garage content reel’. People are not going to bother unless you engage them.

[quote]Well, that is exactly what it looks like. Arbitrary stuff thrown together with a random soundtrack (that takes ages to get up to speed). It’s like dragging whatever is in the garage on the sidewalk, taking photos of it, making it into a video, and calling it a ‘garage content reel’. People are not going to bother unless you engage them.
[/quote]
Appreciate the honesty Riven :stuck_out_tongue: I do at times question why I rushed that video so much, but it was the first “actual” concept real I actually put together anyway. So no, future reels won’t be this rough. The soundtrack is the background theme to the new biome I am conceptualizing.

Right I understand that, that is how any light source would work. I mean on the top of the world, when the “sun shines down on the world” it lights up the ground to a certain extent. I am curious how you handle this. I currently have a system in to light individual columns of tiles in the world but the difficulty is updating the light if, for example, another tile is set above the original highest tile.