Jump to content

Long-distance perception


Packbat

Recommended Posts

It is a source of occasional frustration for me that you can't see farther than approximately the width of the screen from where you stand. Based on the Google Maps Street View going along Dixie Highway in Muldraugh, during the day, a survivor on the highway looking south from Knox Bank should be able to see zombies milling about in front of the Sunstar Hotel, and if that survivor had a one-story watchtower next to the road, they might be able to spot a horde as far away as Pizza Whirled. Plus, if we want to use vehicles and rifles to their full effect, we need to know what going on more than a couple hundred feet away.

 

I like Project Zomboid's third-person view setup. I don't want to change it. What I want is to brainstorm UI workarounds for offscreen-but-within-line-of-sight data.

 

My current thought is something like the Moodle system: icons that appear on the edge of the screen with a background color to indicate distance (perhaps dark red for just off screen fading to white at the horizon). Like on-screen objects, they would fade in or out based on your ability to perceive them, but the total amount of information they would give you as a player would be pretty sharply limited: for example, you could have separate icons for one human or zombie, for a group humans and/or zombies, for a vehicle in motion, for a side street, for a side trail, for a dead end ... I think you'd need some playtesting to figure out what distinctions to include, but you'd never put in enough to (for example) tell which survivor on a multiplayer server is coming up the highway towards you.

Link to comment
Share on other sites

Press ctrl or rmb. Place the mouse cursor on the edge of the screen.

The camera will now move in that direction, showing you more area.

But you have to remember that part of the problem is, past a certain point, the map doesn't exist on anything other than your harddrive.

Link to comment
Share on other sites

But you have to remember that part of the problem is, past a certain point, the map doesn't exist on anything other than your harddrive.

Is it like an unchangeable aspect of the game ? Wouldn't it be possible to stream the map depending on the player's camera and not the character's location or something like this ?

Like the map could be streamed as you move your camera with ctrl+mouse in any direction, and would "un-stream" (is that even a word ?) when you release control and let your camera center on your character again. Would even be nice to have an item like binoculars or rifle scope to be able to do this.

Please bear in mind I'm clueless about coding ^^

Link to comment
Share on other sites

Press ctrl or rmb. Place the mouse cursor on the edge of the screen.

The camera will now move in that direction, showing you more area.

But you have to remember that part of the problem is, past a certain point, the map doesn't exist on anything other than your harddrive.

 

 

I did know that the screen would scroll a bit (that's why I said approximately the full screen width instead of approximately half the screen width ;-)) but I wasn't thinking about the loading-from-HD issue. Is it a system where the map is divided into squares, like Minecraft chunks? How big are those?

Link to comment
Share on other sites

 

But you have to remember that part of the problem is, past a certain point, the map doesn't exist on anything other than your harddrive.

Is it like an unchangeable aspect of the game ? Wouldn't it be possible to stream the map depending on the player's camera and not the character's location or something like this ?

Like the map could be streamed as you move your camera with ctrl+mouse in any direction, and would "un-stream" (is that even a word ?) when you release control and let your camera center on your character again. Would even be nice to have an item like binoculars or rifle scope to be able to do this.

Please bear in mind I'm clueless about coding ^^

 

Yes, resources required to display the map go up exponentially as it gets larger, as well as the time required to calculate pathfinding. Due to a large number of customers using less than ideal hardware (both before and after system specs were released), it could get bad in a hurry. The more RAM dedicated to the map also means there's less RAM for textures/sprites.

 

I did know that the screen would scroll a bit (that's why I said approximately the full screen width instead of approximately half the screen width ;-)) but I wasn't thinking about the loading-from-HD issue. Is it a system where the map is divided into squares, like Minecraft chunks? How big are those?

 

A 50 x 50 area is loaded around the player initially. Then, as the player moves, 5 x 5 chunks are loaded from the edges.

Link to comment
Share on other sites

Thanks for the technical explainations ^^

 

 


A 50 x 50 area is loaded around the player initially. Then, as the player moves, 5 x 5 chunks are loaded from the edges.

 

There, I can ask my quesiton better now :

Wouldn't it be possible to change the "point of reference" from which the 5x5 chunks are loaded ? making it the center of your camera instead of your character's position, so has you move your camera to the West with ctrl+mouse, 5x5 chunks of the map are loaded into that direction, but the same amount "unload" in the opposite direction (East).
 

Link to comment
Share on other sites

 

I did know that the screen would scroll a bit (that's why I said approximately the full screen width instead of approximately half the screen width ;-)) but I wasn't thinking about the loading-from-HD issue. Is it a system where the map is divided into squares, like Minecraft chunks? How big are those?

A 50 x 50 area is loaded around the player initially. Then, as the player moves, 5 x 5 chunks are loaded from the edges.

 

Thanks!

 

Couple more technical questions:

  • What units of measurement are these numbers (50 x 50 and 5 x 5)? I could believe anything from yards or meters to 5-foot squares of ground - I don't have a perfect sense of scale in Project Zomboid.
  • What kind of format are unloaded squares stored in? How much data is stored? Do their contents ever get updated while they're unloaded?

I'm pretty sure that I could get the essential functionality I want from a couple bytes per chunk - "contains n zombies", "obstructed or unobstructed by terrain" (which is used to mark dead ends and side turnings), "contains a vehicle" - but that's still a lot of bytes that may need frequent updating.

 

For what it's worth, I don't need the full circle either, and I don't need it continuously - if the player isn't ctrl+mousing in a direction, I wouldn't give them information on anything outside the 50 x 50 square, and if they are ctrl+mousing, they'd only need information for chunks in the direction they are looking in. In the system you describe, moving diagonally, you might be loading or unloading as much as 19 chunks at a time; if, when stationary and looking out in whatever direction, you could temporarily load in a six-by-three-chunk stripe (18 chunks), that would be pretty much as much perception range as I really want: about 1000 to 1500 feet (300-450 meters).

 

Cars I still don't know how to handle, but for rifles I'd be pretty satisfied with that.

 

Wouldn't it be possible to change the "point of reference" from which the 5x5 chunks are loaded ? making it the center of your camera instead of your character's position, so has you move your camera to the West with ctrl+mouse, 5x5 chunks of the map are loaded into that direction, but the same amount "unload" in the opposite direction (East).

If I recall rightly, the camera snaps back to centered on the player very quickly after you release the mouse - if you unloaded half the area around the player to look off in one direction, that would be a lot of data to yank off the hard drive in very little time.

 

Also, if the squares are unloaded for memory, it's harder for the zombies in them to blindside you. :ph34r:

Link to comment
Share on other sites

This is speculation on my part:

They're tiles. I generally assume it's somewhere between 2.3ft and a meter, just going by the width of the player character, doors .etc. But it's my own personal guess -- others probably view it differently. This means only a very small area is visible, compared to what humans normally see.

They're stored in a binary format, making up the map_*.bin files (those that are numbered. I do not believe their contents are altered once they're saved until the player returns to them.

Mind, I might be wrong on some of this: panning the camera could already be loading additional chunks. ;)

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...