Soldak Home   Drox Operative   Din's Curse   Depths of Peril   Zombasite  

Go Back   Soldak Entertainment Forums > Drox Operative 2 > Drox Operative 2
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

Reply
 
Thread Tools Display Modes
  #1  
Old 08-01-2022, 10:12 AM
sir isO sir isO is offline
Amateur
 
Join Date: Aug 2022
Posts: 4
Default 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.
Reply With Quote
  #2  
Old 08-01-2022, 01:21 PM
Shadow's Avatar
Shadow Shadow is offline
Super Moderator
 
Join Date: Jun 2007
Location: Dallas, TX
Posts: 10,091
Default

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
Reply With Quote
  #3  
Old 08-01-2022, 01:31 PM
sir isO sir isO is offline
Amateur
 
Join Date: Aug 2022
Posts: 4
Default

Quote:
Originally Posted by Shadow View Post
You probably want to change:
zoomMax in User/default.cfg
DrawDistance in Database/systems.gdb
OnScreenDistance also in Database/systems.gdb
Yeah I've tried editing all those values (to ridiculous amounts)

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.
Reply With Quote
  #4  
Old 08-01-2022, 02:43 PM
Shadow's Avatar
Shadow Shadow is offline
Super Moderator
 
Join Date: Jun 2007
Location: Dallas, TX
Posts: 10,091
Default

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
Reply With Quote
  #5  
Old 08-01-2022, 02:55 PM
sir isO sir isO is offline
Amateur
 
Join Date: Aug 2022
Posts: 4
Default

Quote:
Originally Posted by Shadow View Post
A few others you might need to change (all in systems.gdb):
SpawnSteps
EntitySendDistX
EntitySendDistY
Cheers, appreciate that, I'll test it out.

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.
Reply With Quote
  #6  
Old 08-01-2022, 03:37 PM
sir isO sir isO is offline
Amateur
 
Join Date: Aug 2022
Posts: 4
Default

Quote:
Originally Posted by Shadow View Post
A few others you might need to change (all in systems.gdb):
SpawnSteps
EntitySendDistX
EntitySendDistY
Super, that seems to have fixed it. Cheers dude.
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -4. The time now is 07:29 AM.


Powered by vBulletin® Version 3.6.7
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright © 2007 - 2024 Soldak Entertainment, Inc.