|
#1
|
|||
|
|||
How to increase draw distance/culling range properly?
I've been struggling this out, I know there's a draw distance value, and the zoom level obviously...but it doesn't seem to work properly. Are there hard-coded limits or something odd that I'm missing?
I'd appreciate any insights/info about that. |
#2
|
||||
|
||||
You probably want to change:
zoomMax in User/default.cfg DrawDistance in Database/systems.gdb OnScreenDistance also in Database/systems.gdb
__________________
Steven Peeler Designer/programmer Depths of Peril, Kivi's Underworld, Din's Curse, Drox Operative, Zombasite, Din's Legacy, Drox Operative 2, & Din's Champion Wishlist Din's Champion |
#3
|
|||
|
|||
Quote:
Firstly, let's say around zoom 3.6 (coz the ships do get larger, apparently. Commensurately I changed the ai reaction, etc distance values). But with a limit of 3.6 (practically less) zoom max, and pretty much like 20x higher drawdistance, onscreendistance, it still culls things within view (not just effects, sounds, either, coz I did change those values too). Does it perhaps have something to do with the tiles, radar range maybe? *I appreciate the reply btw, it's just, it's difficult to understand wtf is going on without trying to kinda hijack code and data (and I'm not gonna go that far). I mean, I dig the game, but that zoom level, view distance, ai response, etc range is kinda annoyingly low (imo), coz I do think you have the basis for modification that could elevate your games to "higher status", but I keep on having these weird sort of issues that I can't quite contextually understand. Niggling things here and there, which have significant limiting effects. Last edited by sir isO : 08-01-2022 at 01:38 PM. |
#4
|
||||
|
||||
A few others you might need to change (all in systems.gdb):
SpawnSteps EntitySendDistX EntitySendDistY
__________________
Steven Peeler Designer/programmer Depths of Peril, Kivi's Underworld, Din's Curse, Drox Operative, Zombasite, Din's Legacy, Drox Operative 2, & Din's Champion Wishlist Din's Champion |
#5
|
|||
|
|||
Quote:
Btw...what do you think of this sort of code? (it's from around 15 years ago and I'm completely "uneducated", never "sober" and such)... // #include "main.h" #include <float.h> #include <math.h> //#include "stdlib.h" #include <stdlib.h> #include <stdio.h> #define _16_0(x) (x & 0xFFFF) #define _16_1(x) (x >> 16) #define _FasUI(x) (((unsigned int&)(x))^(-((unsigned int&)(x)>>31)|0x80000000)) void sort_radix_f32idx32_16b(const float *farray, unsigned int *ind, const unsigned int elements) { unsigned int i=0; unsigned int *_ar0 = (unsigned int*)malloc(elements*4); // 2 16-bit histograms. const unsigned int kHist = 65536; unsigned int b0[kHist*2]; unsigned int *b1 = b0 + kHist; //memset(&b0[0], 0, 131072); for (i = 0; i < kHist*2; i++) b0[i] = 0; for (i = 0; i < elements; i++) { const unsigned int fir = ((unsigned int&)farray[i]) ^ (-((unsigned int&)farray[i]>>31) | 0x80000000); b0[_16_0(fir)]++; b1[_16_1(fir)]++; } unsigned int sums[3]={0,0,0}; for (i = 0; i < kHist; i++) { sums[0] = b0[i] + sums[1];b0[i] = sums[1] - 1;sums[1] = sums[0]; sums[0] = b1[i] + sums[2];b1[i] = sums[2] - 1;sums[2] = sums[0]; } for (i = 0; i < elements; i++) _ar0[++b0[_16_0(_FasUI(farray[i]))]] = i; for (i = 0; i < elements; i++) ind[++b1[_16_1(_FasUI(farray[_ar0[i]]))]]=_ar0[i]; free(_ar0); } I mean, I could mention some things about blocking, hierarchy, multithreading, GPU sort of stuff. But the basic idea, coz you can kinda adjust bitrate, passes, etc depending on context.. And I mean you could even sort hashed (though indexed) values. Oh I almost forgot, then you can use a bunch of caching, temporal coherence, heuristics sort of things along with binary search (i got a pretty good binary search). So instead of sorting the values/datasets, you sort indices, with some other tricks associated with that too. *Oh sorry, I just noticed I might have pasted the wrong version of that. Haven't coded in a long time. In a general sense, I figure ui32 sorting is a bit more useful... Though this uses a static array, iirc...(long time ago, based on Michael Herf's f32 swap-sorter, but I didn't like the swapping of values in a general sense, rather than indices...considering a sorted value could be associated with rather a lot of data) void sort_radix_ui32idx32_16b(const unsigned int *farray, unsigned int *ind, const unsigned int elements) { unsigned int i=0; //unsigned int *_ar0 = (unsigned int*)malloc(elements*4); // 2 16-bit histograms. const unsigned int kHist = 65536; unsigned int b0[kHist*2]; unsigned int *b1 = b0 + kHist; memset(&b0[0], 0, 131072*4); // for (i = 0; i < kHist*2; i++) b0[i] = 0; for (i = 0; i < elements; i++) { const unsigned int fir = farray[i]; b0[_16_0(fir)]++; b1[_16_1(fir)]++; } unsigned int sums[3]={0,0,0}; for (i = 0; i < kHist; i++) { sums[0] = b0[i] + sums[1];b0[i] = sums[1] - 1;sums[1] = sums[0]; sums[0] = b1[i] + sums[2];b1[i] = sums[2] - 1;sums[2] = sums[0]; } for (i = 0; i < elements; i++) _ar0[++b0[_16_0(farray[i])]] = i; for (i = 0; i < elements; i++) ind[++b1[_16_1(farray[_ar0[i]])]]=_ar0[i]; //free(_ar0); } Hopefully I didn't mess that up too much, peculiarly, that's from a 2d space game thing I was busy with at the time (I also got some uh...generalized collision/distance/interference detetion algorithms that are far simpler, while having the functionality (and more) while being rather efficient compared to GJK/MPR/EPA combined, for arbitrary dimensionality/convex compounds) Last edited by sir isO : 08-01-2022 at 04:02 PM. |
#6
|
|||
|
|||
Super, that seems to have fixed it. Cheers dude.
|
Thread Tools | |
Display Modes | |
|
|