(March 2016) Monthly WIP screenshot thread

Nice textures on the ground, looks quite detailed.

1 Like

It looks like a satellite photo + satellite heightmap. You can see the actual houses if you look closely in the center.

Yes, it is a satellite photo. The terrain is a custom implementation of Ulrich’s “chunked LOD”, with 90 m SRTM elevation data.

2 Likes

I’m working in a strategy online game using modern units such as soldier, snipers, mortars and vehicles.

I posted some screenshots in another thread to show the maps. Now, the game is way more advanced:

Firstly, I learned Nifty GUI and created a simple menu and login screen.

Added a beautiful sky using SkyControl. Still need to tweak the light intensity because sometimes the grass looks “unnatural”.

Made a login server that already logs in users. I’m using SHA-256 encryption. It also saves the usernames and respective encrypted password in a file and load later.

Terrain is now randomly generated but I’m using a algorithm that I call “group algorithm”. Basically, it counts the number of groups of grass tiles. If there is more than one group, recreates a new map. Did some testing about performance, and, in average, my computer can create 80 boards per second. Maybe not the most efficient method, but for me, it works fast enough.

Now, I’m going to create a HUD and the functionality to place units.

8 Likes

Nice!
But I have some questions ( :stuck_out_tongue_winking_eye:): Are you using a fog filter?
And where can I download SkyControl?

^The texture atlas, Fedora default Sans Serif 26pt

So I ran up against a problem with the TrueType Font loader I’m working on. The shader based anti-aliasing doesn’t look so hot on smaller fonts such as would be used in a UI. Currently my solution is to create a dynamically resized texture atlas containing all requested characters. Whenever a character is requested it is looked up in the atlas, if it’s not present the atlas is resized if need be and the character, or characters, are added to it. The atlas is currently using 16x anti-aliasing to produce nice smooth characters. The atlas is rendered to a FrameBuffer with 16 samples which is then copied to a Texture2D.

Of course you’ll also be able to request a scaleable truetype font geometry for rendering in a scene.

P.S. That warning in the console is thrown by the mesh generator. I’m using java.awt.Font to load the fonts and get the shape points. For some reason the PathIterator on the glyph Shape sometimes throws an ArrayIndexOutOfBoundsException, but that exception does not hinder the mesh creation. Seems to be an issue in the PathIterator itself, not the array I’m passing into it.

Even stranger is that it will throw the exception on, for instance, the letter m, but only when the GlyphVector contains only the letter m, not when the GlyphVector contains multiple glyphs including the letter m.

I’ve also found that the PathIterator sometimes begins with a QuadTo command which the docs specifically state that a QuadTo should never come before a MoveTo or LineTo command. Nonetheless I was able to handle such situations.

^Sans Serif 12pt Italic

^GOODTIME.ttf 46pt

Not all fonts have every single character in them. TTF files contain a default character to use in place of characters that the font file does not contain. This situation is detected and taken care of so the texture atlas only loads the default character once rather than every time it comes up against a character not contained in the font file :slight_smile:

13 Likes

when you say font, do you actually mean typeface ? … it would be a shame to sour such awesome work with such a simple mistake =P

I think it’s clear what he means regardless of term used since he’s specifically talking about generating glyphs of different sizes at runtime (a font) from his single TTF (TrueType Font which actually contains a typefact, confusing, eh?)

For the “what are they on about?” crowd:

Basically, if you are using old blocks of letters to make physical prints then you should worry about what a typeface versus a font. Else… it probably doesn’t matter. :slight_smile:

I will not argue with you Paul because:
a) you are always right
b) see a.

I’m just a little tipsy and my internet is broken, slowed to less that 14.4k modem for over a week …

Sorry I was being argumentative for no reason community. @Robbi_Blechdose your work is fantastic, thanks for all your hard work =)

… damn @pspeed … =P

1 Like

Aw, man… you are 100% no fun. :slight_smile: Where is the @thetoucher who would have called me names?

I find language arguments funny sometimes is all.

P.S.: my wife will be the first to tell you that I’m not always right. :slight_smile:

3 Likes

To lighten up:

Well today I learned about typefaces, thanks everyone

It’s often tough to tell when people on a public forum also have a history communicating offline, so I’d just like to say that for the record: @thetoucher is one of my very favorite people here. No joke. I think the forum is way less interesting when he’s on hiatus.

Contrary to his claim that I’m always right, we’ve had many many a late night (for me) chat where he asks me some question, I provide an off-the-cuff answer, and he then proceeds to producing mounting evidence that I had no idea what I was talking about. :slight_smile: “I’m not saying your wrong… but can you explain these results I’m seeing that show you’re wrong…”

Meanwhile his images are looking better and better because he somehow plowed past my advice anyway.

Not to be pedentic, but you probably meant @Tryder

I suppose one could use the term typeface or font for what I’m working on. Never gave much thought to it myself, but based on pspeed’s link font might be a better fit.

“Open up Microsoft Word and you’re asked to choose a font, not a typeface. From the perspective of Microsoft’s designers, this makes perfect sense. At any given time, after all, you’re working in a specific size and weight of a typeface. This is the proper term.”

In this case the TrueTypeKey, the AssetKey for the font loader, is specific for each size and weight. You would have one key for bold 12 point serif, another for italic 12 point serif and another for plain 20 point serif so each instance of the font class represents a single font rather than an entire typeface.

This is based on java.awt.Font in which a different instance is required for each size and style.

P.S. Thanks for bringing it up actually, I actually didn’t know the difference between typeface and font and it’s good to know. I’ve learned a good deal about fonts recently heh. Creating an atlas isn’t as cut and dry as I thought it would be. For instance, obviously, some characters extend below the baseline and java gives you a descent variable that’s supposed to tell you how far, but according to the docs some characters extend below even that value and into the next line. Others might extend beyond their Xadvance into the next character etc…

Fonts are without a doubt a horrible mess everywhere. I think we probably still drag cruft along from the 1600s.

So I am discovering. Occasionally I consider writing my own TTF parser, but I’m pretty sure I don’t want to delve that far into it. The awt font stuff seems a little buggy at times. Using getDescent gave me a value of six for every single character which is quite useless.

You shouldn’t have to write your own parser. But you might want to do your owns bounds discovery using the paths.

I do that in the mesh generator. Java.awt also has a logical bounds method which is useful because it gives me the bounds of the area the shape should appear in which is different from the bounds of the shape. A ^ for instance has a larger logical bound than visual bound because it’s displayed above the baseline rather than on the baseline. In some fonts it is also displayed beyond the xadvance encroaching on the next character.

So in the atlas I can’t simply render the character as is because it ends up being displayed in the next character block, I have to modify its position by the amount it extends above, below, left or right of its origin then restore that offset when creating the quad mesh.

Thanks @Robbi_Blechdose xD.

I’m going to add a fog filter later when I make the map bigger. At this point, you can clearly see the borders are too small ;).

The SkyControl is a plugin created by @sgold that simulates day/night cycles and has a beautiful skybox with generated (I think) clouds. I thought this project was dead, because, as most of you may now, googlecode has shut down, and the author didn’t port the project to github. However, you’re lucky because sgold is “back on track”, and the SkyControl was ported to Github