Work In Progress / The Cogwheel Chronicles: Volume 1 Mechastica

Author
Message
cybernescence
GameGuru Master
6
Years of Service
User Offline
Joined: 28th Jan 2013
Playing: Cogwheel Chronicles
Posted: 6th May 2019 21:14
A quick update. I finished the memory reset and it seems to be working OK, I'll keep testing though.

When standaloneresetallbetweenlevels=1 in setup.ini, GG standalones will have a full memory reset between each level loaded.

Any weapons collected will be automatically carried forward across levels. Any game (lua) variables will have to be written out and reloaded by each level (easy job).

It does add 8 or so seconds to each level load, but video and system memory reset, so best used with large level game builds.

I also fixed the IBL lighting not initialising correctly in standalones.

Lastly just been playing around with the water shaders to add some transparency and swirl effects at the terrain/water intersect boundary:



You can get the shader and instructions here: - https://forum.game-guru.com/thread/220729#msg2615285

Cheers.


Attachments

Login to view attachments
Kitakazi
12
Years of Service
User Offline
Joined: 9th Feb 2007
Location:
Posted: 10th May 2019 02:57 Edited at: 11th May 2019 00:38
Quote: " so best used with large level game builds."

How large would you say a level needs to be to use standaloneresetallbetweenlevels=1?
And are you going by the file size of the level or things like number of entities used / scope of the map?

I guess my real question is what exactly is a large level size for gameguru? And If its purely memory how do you know when you are reaching a large amount? my memory gauge in top left of editor has never worked...

Your game looks really cool btw.
PM
cybernescence
GameGuru Master
6
Years of Service
User Offline
Joined: 28th Jan 2013
Playing: Cogwheel Chronicles
Posted: 14th May 2019 17:05
@Insane6 - it will depend - if the levels use the same assets irrespective of how many, then very little extra memory will be used when moving to next level load, but if the levels are completely different and/or have a lots of entities (thousands) then it may be useful to use this setting. Essentially would need to try it without it being set and only try with it if issues being encountered. I added a numeric memory display to GG so I could keep track of memory usage for debug purposes - so I can see when it peaks.

I've just added some bill boarded name tags that follow the NPCs (can be used for non NPC assets too) for the game, lua:

CreateNPCNamePlates(e,"name",R,G,B) -- r,g,b text color
UpdateNPCNamePlates(height) -- height name plate appears over NPCs

This is reusing the code set-up for multi-player (though the shader was borked and needed fixing too):



Cheers.


Attachments

Login to view attachments
Defy
11
Years of Service
User Offline
Joined: 20th Aug 2007
Location:
Posted: 16th May 2019 05:00
The volume of work speaks for itself.
Keep it going , all the best
PM
cybernescence
GameGuru Master
6
Years of Service
User Offline
Joined: 28th Jan 2013
Playing: Cogwheel Chronicles
Posted: 18th May 2019 02:09
Thanks Defy. I'll try

So when testing I noticed the Terrain LOD sliders weren't setting terrain values appropriately/correctly (the "LOD Far" wasn't enabled to do anything at all). So have changed the engine and getting much better FPS on terrains now with the LOD sliders adjusted.

Also still testing the IBL, seems to really help fix/blend the terrain into the skybox. Also further tweaked the water shaders, getting some reasonable water transparency and foam swirls at shallow depths.





Cheers.


Attachments

Login to view attachments
Wolf
Forum Support
11
Years of Service
User Offline
Joined: 8th Nov 2007
Location: Luxemburg
Posted: 18th May 2019 22:26
The water shader is marvellous!
synchromesh
Forum Support
5
Years of Service
User Offline
Joined: 24th Jan 2014
Location:
Posted: 20th May 2019 02:14
That's looking pretty stunning.
Hard to believe the bottom shot is even GameGuru
The only person ever to get all his work done by "Friday" was Robinson Crusoe..
PM
Bored of the Rings
GameGuru Master
14
Years of Service
User Offline
Joined: 25th Feb 2005
Location: UK
Posted: 20th May 2019 18:59
Wow this is really stunning
Professional Programmer: Languages- SAS (Statistical Analysis Software) , C++, C#, VB, SQL, PL-SQL, JavaScript, HTML, Three.js, Darkbasic Pro (still love this language), Purebasic, others
Hardware: Dell Precision 490; AMD Radeon HD 7570; 12GB.
PM
cybernescence
GameGuru Master
6
Years of Service
User Offline
Joined: 28th Jan 2013
Playing: Cogwheel Chronicles
Posted: 21st May 2019 19:23
Appreciate the comments guys, thanks

Well another 3am finish and I got the grass improved and able to be loaded and moved anywhere alongside the terrain. Also tied the fog color automagically (as default) into the horizon color of the sky box being used. All these little things are adding up I think to make the terrains more inviting.

I couldn't properly trouble-shoot the terrain FPS with the default info, so separated out terrain polys from everything else in the control sliders (pic below). This makes it so much easier to tune the terrain LOD sliders and see the impact on terrain polys (and knock-on to FPS). Also shows the entity polys in isolation so helps to smooth out scene poly peaks with better placement. The terrain coding in GG is a quality piece of work.

I'm getting not bad FPS now with terrains and as I run GG as a default at twice the stock linear size, four times area size I'm getting happier. I'm going to have a look at LOD impostors now for trees ... I saw some old (?) code in GG that I think could be used to morph to quad LODs.

Cheers.







Attachments

Login to view attachments
reliquia
GameGuru TGC Backer
4
Years of Service
User Offline
Joined: 27th Jan 2015
Location: Tasmania Australia
Posted: 22nd May 2019 11:17
wow! really cool stuff here cybernescence.

You mentioned that you 'got the grass improved' along with the terrain improvements, just wondering if this is helping sort the issue with grass popping in\out of view.

Great work though.

Reliquia....
aka OldFlak
i7-4790 @ 3.2GHz. 8GB Ram. NVidia GeForce GTX 1060 6GB. M1: Acer 31.5" @1920x1080 M2: Samsung 31.5" @ 1920 x 1080. M3: Acer 24" @ 1920 x 1080. OS: Windows 10 Pro 64-bit Insider.
PM
Earthling45
2
Years of Service
User Offline
Joined: 3rd Sep 2016
Location: Zuid Holland Nederland
Posted: 22nd May 2019 14:25
It is so enjoyable to follow this, thanks for the updates Cybernescence.
cybernescence
GameGuru Master
6
Years of Service
User Offline
Joined: 28th Jan 2013
Playing: Cogwheel Chronicles
Posted: 22nd May 2019 16:12
@ Reliquia - thanks and yes that grass popping is (was) annoying

Actually you can try that update without engine change, just easy shader changes. Take a backup of apbr_core.fx first (in case you need to restore) then open it up with notepad and change two lines:

From this:
float fEdgePerc = max(0,fDist-(GrassFadeDistance*0.4f)) / (GrassFadeDistance*0.6f);
To this:
float fEdgePerc = 1- smoothstep(GrassFadeDistance-600,GrassFadeDistance, fDist);

And from this:
output.color.a = 1.0f - fEdgePerc;
To this:
output.color.a *= fEdgePerc;

Then delete apbr_veg.blob (not the apbr_veg.fx), restart GG and see if the grass popping has stopped. It has for me but I'm running a 4x terrain - the '600' value in the first replacement line might need tweaking if you still get popping, but should be OK I think.

@Earthling45 - thanks for posting, sometimes think I won't bother as few are reading, though it is turning into a journal of GG updates so may be useful at some point just for that as I'll forget what I've done or why .

On an I5/GTX750TI I can now run around the 4X GG terrain shown in the pics that is completely covered in grass (vegetation setting at 80, quantity, height, width = 50) at 60FPS (vsync'ed), dipping to 50FPS when detailed terrain LOD encountered.

I now suspect the occlusion culling is not working for grass, now that I've separated out terrain polys to monitor it, I can see there is no change on grass polys rendered irrespective of occlusion culling slider value. So might get more mileage out of the grass system yet.

Cheers.

Bolt Action Gaming
GameGuru Tool Maker
5
Years of Service
User Offline
Joined: 24th Oct 2013
Location: Harrisburg, PA (USA)
Posted: 22nd May 2019 19:30
So I can confirm occlusion has a huge effect on grass. If you spray terrain on long swaths of visible terrain and pop occlusion to maximum, it does occlude out past around 1500-2000 units. It makes mountains look bald and far terrain look ... remarkably poor. From a performance standpoint I'm sure it makes sense but from a visual standpoint it looks terrible. Perhaps the answer lies in setting up a proper LOD for the vegetation model?
reliquia
GameGuru TGC Backer
4
Years of Service
User Offline
Joined: 27th Jan 2015
Location: Tasmania Australia
Posted: 23rd May 2019 01:04
@cybernescence - thanks for the info

Tried the changes you suggested and I think the grass does looks much better with those settings in that it doesn't fade out so close to the player - much better for the visual look of the level.

However I still get grass popping in and out in some areas right in front of the player, usually - but not limited - to areas where there is a sharp rise in the terrain.

Reliquia....
aka OldFlak
i7-4790 @ 3.2GHz. 8GB Ram. NVidia GeForce GTX 1060 6GB. M1: Acer 31.5" @1920x1080 M2: Samsung 31.5" @ 1920 x 1080. M3: Acer 24" @ 1920 x 1080. OS: Windows 10 Pro 64-bit Insider.
PM
cybernescence
GameGuru Master
6
Years of Service
User Offline
Joined: 28th Jan 2013
Playing: Cogwheel Chronicles
Posted: 23rd May 2019 07:30
@BAG - the occlusion was partially working. I’ve added some changes that I think has fixed it, still testing. The LOD comment gave me an idea, can’t really simplify that veg model much more it is only two planes and as the grass objects are reused and roll around the player position rather than being wherever painted in the terrain. However could darken or colour the terrain or even texture it differently for the distant view of grass. So will try that. Also your comment made me think there might be a way to add more than one type of grass - tricky as there is only one texture channel available but perhaps the value of the channel could be made to refer to different grass types.

@reliquia - thanks for testing, I’ll check that out and fix. I suspect it’s because GG is doing a horizontal/flat distance check only at the moment.

Cheers
cybernescence
GameGuru Master
6
Years of Service
User Offline
Joined: 28th Jan 2013
Playing: Cogwheel Chronicles
Posted: 23rd May 2019 17:33
WIP - multiple grass types - well three . Still have the hard yards to do on this, but I want reeds at water side and other types of veg elsewhere ...



Cheers.

Attachments

Login to view attachments
GraPhiX
Forum Support
14
Years of Service
User Offline
Joined: 15th Feb 2005
Playing: Fixing stuff ;)
Posted: 23rd May 2019 17:34
Awesome
Welcome to the real world!
Main PC - Windows 10 Pro x64 - Core i7-7700K @4.2GHz - 32GB DDR4 RAM - GeForce GTX 1060-6G 6GB - 1TB NVe SSD
Test PC - Windows 10 Pro x64 - G4400 @3.3GHz - 16GB DDR3 RAM - GeForce GTX 950 2GB - 500GB SSD
Laptop - Helios 300 Predator - i7 7700HQ - 32GB - Nvidia GTX1060 6GB - 525GB M2 - 500 SSD - 17.3" IPS LED Panel - Windows 10 Pro x64
Various Tutorials by me
Bolt Action Gaming
GameGuru Tool Maker
5
Years of Service
User Offline
Joined: 24th Oct 2013
Location: Harrisburg, PA (USA)
Posted: 24th May 2019 15:20
Man you continue to impress. I'm really looking forward to that one. Always seemed like a reasonable simple add to make 3-4 diff vegetation types. Keep up the good work!
cybernescence
GameGuru Master
6
Years of Service
User Offline
Joined: 28th Jan 2013
Playing: Cogwheel Chronicles
Posted: 26th May 2019 16:56
Well that was a bit of a nightmare/challenge - I can see why it was left as one grass type only

However, now seems to be working perfectly for three grass types (which I think is plenty, certainly to code and for performance).

The grass is overlaid as per normal (green - grass type 1), but by also pressing 'z' key, it paints grass type 2 as red and with 'x' key grass type 3 (highlights in blue).

The tricky part was getting all the intersecting types to work properly, so when all three colors are laid down (white), it renders all three grass types at that position, when only two, depending on which two grass types/colors (purple, yellow, turquoise) it mixes only the correct type of grasses in game at that position. Whomever coded the original grass system (Lee? Simon?) did a great job in providing rolling mesh models over the terrain but it wasn't geared up to have more than one grass type (not in original spec I guess) so a lot of code changes for this one.

It's legacy compatible, so if only one type of grass exists in the veg folder, all colors in edit mode will render the same grass.

I'll now apply to the Cogwheel terrains and test thoroughly. I'm now calling a halt to engine changes unless something critical turns up being required as I have spent (probably) too much time on this and not enough on the actual game - but it was enjoyable for me being a coder at heart .

Cheers.




Attachments

Login to view attachments
granada
GameGuru TGC Backer
16
Years of Service
Recently Online
Joined: 27th Aug 2002
Location: United Kingdom
Posted: 26th May 2019 17:22
Very cool cybernescence,looking better all the time

Dave
Windows 10 Pro 64 bit
GeForce GTX 1050 Ti
AMD FX (tm)-9590 Eight-core Processor
31.96 GB RAM
1920x1080,60 Hz
PM
synchromesh
Forum Support
5
Years of Service
User Offline
Joined: 24th Jan 2014
Location:
Posted: 27th May 2019 10:57
Wow !!
The only person ever to get all his work done by "Friday" was Robinson Crusoe..
PM
Bolt Action Gaming
GameGuru Tool Maker
5
Years of Service
User Offline
Joined: 24th Oct 2013
Location: Harrisburg, PA (USA)
Posted: 29th May 2019 15:06
TGC needs a 'donate to cybernessence' button.
Ertlov
GameGuru BOTB Developer
12
Years of Service
User Offline
Joined: 18th Jan 2007
Location: Australia
Posted: 30th May 2019 04:15
Can I ask the obvious greedy question - will that be pushed to public? ^^
"I am a road map, I will lead and you will follow, I will teach and you will learn, when you leave my sprint planning you will be weapons, focused and full of JIRA tickets, Hot Rod rocket development gods of precision and strength, terrorizing across the repository and hunting for github submits."
Bored of the Rings
GameGuru Master
14
Years of Service
User Offline
Joined: 25th Feb 2005
Location: UK
Posted: 30th May 2019 14:04
excellent work as usual Cybernescence, amazing what you have done so far with the game and the engine.
Professional Programmer: Languages- SAS (Statistical Analysis Software) , C++, C#, VB, SQL, PL-SQL, JavaScript, HTML, Three.js, Darkbasic Pro (still love this language), Purebasic, others
Hardware: Dell Precision 490; AMD Radeon HD 7570; 12GB.
PM

Login to post a reply

Server time is: 2019-06-16 20:39:46
Your offset time is: 2019-06-16 20:39:46