(September 2016) Monthly WIP screenshot thread

I don’t. I treat it like Minecraft mods (or any other game mod really) in that the user has to be aware of the fact that odd ons have access to their whole machine and can do literally anything.

You could load your scripting related stuff into an isolated classloader with its own SecurityManager (or that otherwise restricts access to certain classes)… but in the end it is an arms race you will never win. Even Oracle couldn’t keep its own Java secure in its own sandbox… which is why it’s rare to find Java on browsers anymore.

1 Like

We use Nashorn in our project and the way we sandbox things is by denying the user access to anything that is Java standard API. We then just expose interfaces which can be called from Javascript.

1 Like

Speaking of script languages for games, I just saw this video from IndieFormer. Maybe some of you guys find it inspiring.

2 Likes

Well, the good news is even my wife was impressed. The bad news is that she thought of a dryer or a washing machine (don’t see it myself). But I think it’s pretty damn cool anyway. I do think more glow seems appropriate.

Java 9 will have jShell that can be used as scripting, right?

wow, just wow

That may be both good news actually, since I’ve been neglecting the comedy part of the game a bit. Anything that looks funny is great :wink: The more glow version looks better up close but the problem is that the filter glows over the blades and it looks really weird from a bit further away.

I never thought I’d say this but I think that this looks actually like a place for a DOF filter that would hide some of the detail of the background trees. Maybe less single bit alpha and more regular alpha for the branches?

Amazing grass btw, what does it look like from other angles?

Thanks guys for reviews! :slight_smile:

Yes. I am working on making background less detailed and quite natural at the same time. Because DOF without good setting makes it uglier.

It is pretty simple: grass is geometry consisting of different grassblades under various Y-angles. When environment generator works it gets Contact normal of surface and apply it (with some modifications) to geometry. If density is high enough, it looks realistic. Most geometries are loaded from database so there is no RAM memory overhead.

1 Like

Hold on, you’re saying that each grass blade is an opaque geometry?

Of course not :smiley:

This is how it looks like. It just has big density. And I made a lot of optimizations to support big density. But now problem is, that you can have crappy CPU and good GPU to play with high fps. But if you have crappy old GPU but good CPU, you will have fps drop. I think transparency is the main reason so I am working with it.

2 Likes

I assume you those ‘blades’ are one large mesh?

If that is the case you might have a lot of owerdraw depending on the view angle. And there we have another usecase where a depth only prepass could save you fill rate

1 Like

Yeah I think you’re having the same problem I did with the nebulas, which is hitting fill rate limits because of lots of transparent objects overlapping. So, what @zzuegg said.

The thing is that you might actually get better performance from thousands of more opaque quads than some overlapping transparent ones. GPUs are unfortunately a lot more optimized on the mesh part and less on the texture part in my experience.

I will try later to do something with it. But it is not very critical, really. We made some tests with friends and results shows that it doesn’t require super GPU but just good gpu. Some tricky techniques like @zzuegg 's one will be enough.
The current results of our test are: it takes to render scene with full filters stack 46% of GTX980 power to get 60 fps.

Interesting thought. Have you tried it in your game?

Wouldn’t work for my case sadly because I need additive blending on the quads and nothing can be ignored, plus they’re sometimes half transparent. Your grass is either 0 or 1 on the alpha channel though.

Maybe this could help optimize grass sprites: http://discuss.cocos2d-x.org/t/new-feature-meshsprite-polygonsprite-updated/21153

That’s a lot and you will be able to attract people with good graphics cards. A year ago the GTX760 was being used by most gamers on Steam. I’m also one of them, my gaming PC still uses a 760. But I might upgrade to 1060 or wait until the next generation is out (preferably, since 1060 is not fully compatible to DirectX12 but AMD cards are … but they are AMD cards ;-)).

2 Likes

Cool idea! At least i will crop unused alpha region as much as I can :smiley: . I couldn’t even guess about it.

I got Radeon 6670 xD . So I feel every frame of optimization/regress.