[dumb ZScript experiment] Daggerfall-like overworld map

Discuss anything ZDoom-related that doesn't fall into one of the other categories.

[dumb ZScript experiment] Daggerfall-like overworld map

Postby Nash » Tue Feb 28, 2017 3:42 pm

Screenshot_Doom_20170301_052840.png


Just something silly I was toying around with just because. I wanted to try recreate the scale of Daggerfall's world within GZDoom's limits.

It's a huge map with 379463 trees sprawled across it. So wait, there's 300k Things on the map, how does it not slow down (too much)? The entire world is divided by imaginary "cells" and every time the player steps into a cell boundary, only trees close to the player are spawned. Also has sloped terrain made in Blender.

It's pretty much just a walking simulator at this point and there's no gameplay... and I don't know how much more will I tinker with this. I have no idea how to texture the ground and how to add towns because of the sloped terrain and - more importantly - since you are able to see the ENTIRE world with no 2-sided lines... attempting to add geometry into this will backfire very fast.

I guess it's just cool to be able to walk around in a world with 300k trees and see how laggy it could get, if at all.

Things you can try:

- "pukename tsc" in console to move very fast
- cl_foliagedistance to adjust the render distance (NOT spawn distance! this doesn't affect FPS too much)
- sv_foliagecellsize to set how large a cell size is. Use power of 2 numbers (512, 256, 1024 etc)
- sv_foliagecellmult determines how many more cells' worth of foliage is spawned in addition to the current cell. This was made so that when you're close to a cell boundary, you won't see an empty land then as soon as you step into the cell boundary, suddenly trees appear in front of you

The last 2 CVars would affect FPS more drastically than the first


Download -> https://www.dropbox.com/s/xbrylnhqbvwlx34/dag.pk7?dl=1
You do not have the required permissions to view the files attached to this post.
Last edited by Nash on Tue Feb 28, 2017 3:48 pm, edited 2 times in total.
User avatar
Nash
 
 
 
Joined: 27 Oct 2003
Location: Kuala Lumpur, Malaysia
Github ID: nashmuhandes

Re: [dumb ZScript experiment] Daggerfall-like overworld map

Postby Nevander » Tue Feb 28, 2017 3:46 pm

It would be beyond amazing if someone could create an Elder Scrolls style mod, using a HUGE open world with quests and everything.
Nevander
Self-Banned User
 
Joined: 07 Jan 2014

Re: [dumb ZScript experiment] Daggerfall-like overworld map

Postby Ravick » Tue Feb 28, 2017 7:09 pm

I'd love to have something just like that in the time of my old artificial life experiment in DooM engine. *-*

Just imagine, a huge open world, free for the species to interact. I understand that for now the trees does not rly exist when player is in another "cell", but it could also just don't drawn the specimens far away AND let they live normally, invisibly. Thus, saving processing.
User avatar
Ravick
Do what thou wilt, since you don't bug the hell out of me!
 
Joined: 23 Aug 2010
Location: Tubarão, Brasil

Re: [dumb ZScript experiment] Daggerfall-like overworld map

Postby Nash » Wed Mar 01, 2017 12:56 am

Ravick wrote:Just imagine, a huge open world, free for the species to interact. I understand that for now the trees does not rly exist when player is in another "cell", but it could also just don't drawn the specimens far away AND let they live normally, invisibly. Thus, saving processing.


That's not possible, the CPU cost for an actor in a Doom map to exist doesn't go down just because it's invisible. The actor has to actually be destroyed from the map for it to not add up to the processing your computer needs. This is what I'm doing with the trees here. It's not enough to make them invisible, I actually have to completely remove them from the map when they're out of range, and re-add them when you step into a new cell.

If you thought NUTS.wad was crazy with ~10,000 actors in the map, this map shits over all that with roughly ~379,000 actors... >8D
User avatar
Nash
 
 
 
Joined: 27 Oct 2003
Location: Kuala Lumpur, Malaysia
Github ID: nashmuhandes

Re: [dumb ZScript experiment] Daggerfall-like overworld map

Postby EldritchNexus » Wed Mar 01, 2017 9:19 am

You should add a few buildings to represent towns/villages, maybe that you could enter. I've seen some maps where you could do just that. Also, could you try making a ZDoom-friendly equivalent?
EldritchNexus
 
Joined: 10 Jan 2017

Re: [dumb ZScript experiment] Daggerfall-like overworld map

Postby Nash » Wed Mar 01, 2017 10:15 am

Sorry, ZDoom has been discontinued and I don't mod for ZDoom anymore as it's severely outdated and lacking in modding features I need.
User avatar
Nash
 
 
 
Joined: 27 Oct 2003
Location: Kuala Lumpur, Malaysia
Github ID: nashmuhandes

Re: [dumb ZScript experiment] Daggerfall-like overworld map

Postby abbuw » Wed Mar 01, 2017 10:49 am

On adding more complex geometry, how hard would it be to make the ceilings of the cells lower so that the geometry isn't rendered?

aaand I just remembered it doesn't work that way. Neat stuff, regardless.
User avatar
abbuw
Contact your poison control center.
 
Joined: 12 Jun 2012
Location: South Lake Hills

Re: [dumb ZScript experiment] Daggerfall-like overworld map

Postby Nash » Wed Mar 01, 2017 11:09 am

Believe me, I already tried that early on.

Generated an empty triangulated terrain in Blender, really large, has 1024 segments each, imported into GZDB, then lowered all the ceilings of every triangle except the one the player is standing in... I still get 5 FPS. :P
User avatar
Nash
 
 
 
Joined: 27 Oct 2003
Location: Kuala Lumpur, Malaysia
Github ID: nashmuhandes

Re: [dumb ZScript experiment] Daggerfall-like overworld map

Postby Gez » Wed Mar 01, 2017 11:59 am

The BSP remains 2D (not 3D like in Quake) so differences in height will not have any effect on whether something will be processed. Only stuff behind single-sided lines will be fully skipped. Stuff hidden from player view by a lowered ceiling or a raised floor will still have an impact on performances.
Gez
 
 
 
Joined: 06 Jul 2007

Re: [dumb ZScript experiment] Daggerfall-like overworld map

Postby cambertian » Wed Mar 01, 2017 12:16 pm

Interesting little optimization. Makes me wonder about the possibility of a Doom-based "MMO"... It's always been a distant dream of mine to make such a thing. (Does it work in multiplayer?)

Another thing you could consider implementing: the original GTA was known for its huge cities filled with interact-able objects and cars, but in actuality the game only remembered the placement and condition of what the player interacted with, rather than keeping every single one in memory. I'm wondering if you could implement something similar - for instance, you could make the trees light on fire when the player shoots them and store it for later somehow...
User avatar
cambertian
Resident Non-Programming Programmer
 
Joined: 07 May 2015
Location: New England Area, USA
Discord: cambertian#6245

Re: [dumb ZScript experiment] Daggerfall-like overworld map

Postby Nash » Thu Mar 02, 2017 6:41 am

I think I can improve the performance when stepping into a new cell by making it record which cell each tree belongs into, so when you step into a new cell, it will only load that cell's trees, instead of doing a ~379,000-step iteration every time the player steps into a new cell.

There will still be a massive lag when the map is first loaded though. I tried moving the trees out of the MAP WAD and made them pre-generated array assignments inside a ZScript source file but when I did that, GZDoom didn't go beyond the "Loading actor definition" stage so I had to leave the trees in the map WAD.

I tried doing that because with ~379,000 Things inside the map, GZDoom Builder eventually runs out of memory trying to save the map so it leaves little space left for placing other Things.

Ahhh well. This will forever remain a bunch of silly experiments I guess. No sane, playable project will ever be made this way. :P Perhaps this will forever stay as a Thing-count benchmark or something.
User avatar
Nash
 
 
 
Joined: 27 Oct 2003
Location: Kuala Lumpur, Malaysia
Github ID: nashmuhandes

Re: [dumb ZScript experiment] Daggerfall-like overworld map

Postby Cherno » Wed Sep 04, 2019 3:26 am

Necro necro etc....

Since I have my Hunter TC on the backburner, and it also Features a massive open Terrain with trees and other features, I face the same issues. Maybe the initial map loading times could be circumvented by storing each tree Position (along with other Information) in a seperate file, even a zScript file, that is accessed when a cell is loaded. So there are actually no tree actors in the map when it is placed in the archive, they are spawned by referring to the separate file exclusively.
User avatar
Cherno
 
Joined: 06 Dec 2016

Re: [dumb ZScript experiment] Daggerfall-like overworld map

Postby Nash » Wed Sep 04, 2019 7:00 am

This is the wrong engine for this kind of thing. Forget it. :-)
User avatar
Nash
 
 
 
Joined: 27 Oct 2003
Location: Kuala Lumpur, Malaysia
Github ID: nashmuhandes

Re: [dumb ZScript experiment] Daggerfall-like overworld map

Postby Cherno » Wed Sep 04, 2019 8:07 am

Why, though? There could be a global manager that has references to all the cell data instances and tracks player position. The cell data could just be a simple class.
User avatar
Cherno
 
Joined: 06 Dec 2016


Return to General

Who is online

Users browsing this forum: Laggy and 3 guests