Post news RSS Lighten Up

Hello everyone! A short and sweet Mondoid this week, as we’re all hard at work finishing off the new rendering system detailed last week. So, just a few updates.

Posted by on

Rendering System

Work on this is going tremendously, but we’re still waist-deep in it at the moment.

The exciting possibility is that 2 of the biggest bottlenecks in the game’s performance may not only be reduced, but may more or less disappear completely.

We've converted the map to use ‘static vertex buffers’. Before the game was forced to composite each and every frame of the game from scratch, forming a frame-by-frame list of polygons to draw for both world and characters alike. It would then ditching them, and starting anew for the next frame.

Now, since we’re not confined to draw order and characters can all be drawn after the world, we can construct a set of one-time vertex buffers that'll hold all the composited geometry of the world for as long as you're stood in the same chunk.

Then, as soon as you run onto a neighbouring chunk and trigger the map streaming, a new vertex buffer is composed to represent the geometry around you - which can then be reused and reused again until something changes.

This means something rather costly that used to happen every frame now only happens every ten tiles, when transitioning between rooms or when someone opens a door. (Or when something breaks down a door.)

Lighting

Another big bottleneck of the game was the smooth lighting, not only for the actual iso order drawing that we described in detail last week, but the calculations of the lighting across the loaded world’s tile grid.

Now we’re using OpenGL 3D for our rendering, it means we can easily transfer responsibility for lighting to the graphics card. As such, Binky has been working on a new lighting system that'll not only speed the game up massively, but will also look a lot prettier and more accurate:

lighttest_01
IMG_29092013_150247
lighttest_03
lighttest_02

It goes without saying these are WIP and are tests, and we're not changing the name of the game to Project Disco-oid.

This all means that we're taking the slow lighting calculations out of the PZ java code, and putting it into super fast native (and probably hardware accelerated) OpenGL code.

Interim Build

If this process takes much longer to finish off, we may consider doing a beta build with our former badly compressed textures - just to get a version out there.

It’s not something we’d want in an official version, but would give us an opportunity to test Romain’s fixes that have been in development during the overhaul. This would be to make sure that we're on track with the rest of the game once these changes are complete, as well as tide over those waiting for new stuff!

We’ll come up with a good compromise that scrapes under the memory budget if we can, and will see where we are in a couple of days.

Until then! Love yus!

Comments
atomic_swerve
atomic_swerve - - 5 comments

For PZ, more realistic lighting = even scarier to play. Loving it! Great work guys!

Reply Good karma Bad karma+13 votes
Gunny8
Gunny8 - - 21 comments

Great work guys, keep it up! <3

Reply Good karma Bad karma+7 votes
Guest
Guest - - 692,177 comments

Didn't they say there next mondoid was going to be packed full of npc's about 4 mondoids ago?

Reply Good karma Bad karma+4 votes
thisoldhat
thisoldhat - - 7 comments

(buried)

YEAH FORGET LIGHTING - DO NOT CARE ABOUT LIGHTING. WAITING TO PLAY GAME AGAIN W NPCS.

I hate those people that use caps for everything - but it gets read. Seriously guys, noone cares about your lighting. Or rather - the 80/20 rule applies here - 80% of the people are waiting for npcs, 20% already play and might be happy that there's now different colored lights.

In the end, we still all only want NPCs. That is all.

Reply Good karma Bad karma-8 votes
Superlouis66
Superlouis66 - - 7 comments

Not true. It's more of a 50/50 thing. You're like the 5th person to say this that I've seen, but about 30 people say it's great as it is.

Reply Good karma Bad karma+1 vote
nasKoo
nasKoo - - 133 comments

Putting in NPCs into an unoptimised system will not result in the good stuff you expect. There are things that are a bit more important than NPCs, such as making the game actually run on the systems of the customers. Getting the game finally up on Steam is also a very important step.

The "WHY NO NPCS" and push to Steam was covered in 4 Mondoids ago.
Projectzomboid.com

Reply Good karma Bad karma+3 votes
holmesc2009
holmesc2009 - - 29 comments

nigga sit the **** down

Reply Good karma Bad karma+1 vote
thisoldhat
thisoldhat - - 7 comments

quiet, pastyface.

Reply Good karma Bad karma-1 votes
holmesc2009
holmesc2009 - - 29 comments

no u nigga

Reply Good karma Bad karma+1 vote
aidy70060
aidy70060 - - 368 comments

Nah, I want a great game whose developers have taken their time to ensure that all the mechanics are done as well as their engine will let them yet runs really really well.

Plus, lighting is a huge huge part of any horror-esque game, so lighting is ridiculously important. Oh, and by the way, you shouldn't pull out ******** statistics out of your arse, you don't know what the majority of fans want because you are not that majority.

Reply Good karma Bad karma+1 vote
thisoldhat
thisoldhat - - 7 comments

It's a part of the game. It's not a huge huge part. A huge huge part would be NPCs. In terms of coding - NPCs > different colored lights. Stop pulling statistics out of your ***.

I acept blinky/naskoo answers fully because they work on the game and their explanations make sense. I understand now that they pretty lights was just a random test - not a feature they're showing off (since we all agree setting different color light values is super tough, but its not)

If you're seriously placing different colored lights above full functioning NPCs - you're just another idiot white knighting the game. An idiot who can't see all points of view.

Reply Good karma Bad karma0 votes
thisoldhat
thisoldhat - - 7 comments

^ you're justifying a pretty lights update that has nothing to do with the framework or optimization of anything. Plus - they shouldn't be teasing about NPCs if they're not going to release them in an appropriate time slot after. I know plenty about selling crap online - and you don't show a youtube video of being able to snuff out NPCs with a pillow + talk about "NPC Updates coming soon" in later posts for months and not do anything. That's just stupid. No matter how you try to justify changes of colors of lighting as "the need to fix the framework".

And Louis - I can only speak for friends who have showed me the game and friends who I've shown the game. Everyone says after you do some building and farming - there's not much else to do. Enter NPCs.

I understand you fellas want to white knight. But noone is saying the game is bad. Everyone is saying it's boring after you spend a while on it because no NPCs. Your white knighting is obsolete because everyone would be happier w NPCs.

Good thing GTA 5 saved the... how ever many months Indiestone wish to take with NPCs.

Reply Good karma Bad karma0 votes
isbeorn
isbeorn - - 837 comments

But they clearly state that the new lighting stuff is made for optimization. I agree it would seem they are not doing what they've said they should if they're implementing "disco lights", but surely the screens above are taken from tests. Tests imperative in making sure the new code works as intended.

Reply Good karma Bad karma+1 vote
CaptainBinky
CaptainBinky - - 13 comments

Yes, isbeorn is correct. The screens above were taken from a small OpenGL testbed that I have running on my machine in order to test shader stuff before it gets integrated into the game - the disco lights are simply because I put random colour values in for testing.

Everything about this system is geared towards performance - were it 'just' a case of the cosmetic effects of marginally nicer lighting then frankly, this would be an incredibly low priority task but it isn't. The performance issues are a big problem and we certainly wouldn't want to release a Steam version which had glaring performance issues, early access or not, in the same way that we didn't want to update the Desura build until that build was reasonably stable.

Reply Good karma Bad karma+3 votes
nasKoo
nasKoo - - 133 comments

Nothing to do with whiteknighting (especially considering I can be considered an "official").
The change to the lighting system is actually a part of performance optimisation, as described by CaptainBinky in reply to isbeorn.

I understand you want NPCs in the game badly. It'd be mad to not want them in the game as they will probably make the game way more interesting.
The devs want them out just as much. It's a matter of priorities. Having people actually running the game is a higher priority right now.

Reply Good karma Bad karma+2 votes
patrickcod5
patrickcod5 - - 9 comments

Awesome, but I am hoping that i can still run the game ok on my old samsung R519 laptop. =/

Reply Good karma Bad karma+2 votes
Discorded
Discorded - - 87 comments

Im just hoping for the relationship settings, I know this is super far into the future, but i also hope kids could be involved in PZ, that little girl is really a zombie, and eats your face, or you could have kids of your own you would need to protect. Like the walking dead almost. Also, dont say having kids in this game is bad lol, they have babies blowing up in dead space so..js..

Reply Good karma Bad karma+1 vote
Duckordie
Duckordie - - 13 comments

This.... Is... Amazing!
Keep up the good work, realy love this game!

Reply Good karma Bad karma+1 vote
thesetales
thesetales - - 53 comments

good job. gl is a good choice. looking forward to that release

Reply Good karma Bad karma+1 vote
Magusdl
Magusdl - - 10 comments

Yeah, please take your time to do the NPC's, once I start toying with their AI, I don't want to start from scratch every update because everything changed due to a bug or something. I really miss them, but rushing it will only make things worse.

Reply Good karma Bad karma+1 vote
Post a comment
Sign in or join with:

Only registered members can share their thoughts. So come on! Join the community today (totally free - or sign in with your social account on the right) and join in the conversation.