Author Topic: Asteroid Field Improvements Attempt (Images)  (Read 11936 times)

0 Members and 1 Guest are viewing this topic.

Offline Kazan

  • PCS2 Wizard
  • 212
  • Soul lives in the Mountains
    • http://alliance.sourceforge.net
Asteroid Field Improvements Attempt (Images)
before suggesting more features let me fix the bugs in this


thunder: to fix a bug, you have to first understadn the bug
PCS2 2.0.3 | POF CS2 wiki page | Important PCS2 Threads | PCS2 Mantis

"The Mountains are calling, and I must go" - John Muir

 

Offline Fineus

  • ...But you *have* heard of me.
  • Administrator
  • 212
    • Hard Light Productions
Asteroid Field Improvements Attempt (Images)
True, but (whilst I re-state my lack of knowlege) you might be able to forget the bug all together if you ripped out the relevant code and put in a new system.

Of course, it's not as easy as that methinks...

 

Offline Kazan

  • PCS2 Wizard
  • 212
  • Soul lives in the Mountains
    • http://alliance.sourceforge.net
Asteroid Field Improvements Attempt (Images)
i meant i don't understand the bug, i could do all the ripping out and rewriting of things as i want, i'd probably just make it not work as well.  I need to understand the bug before i can do anything about it

We need DaveB's input
« Last Edit: July 14, 2002, 11:58:31 am by 30 »
PCS2 2.0.3 | POF CS2 wiki page | Important PCS2 Threads | PCS2 Mantis

"The Mountains are calling, and I must go" - John Muir

 

Offline Inquisitor

Asteroid Field Improvements Attempt (Images)
Is all your code up in the thread? There are a decent group of people here, might be able to help, Dave will have to want to help, and recent events may not make him inclined to do so.

So, this works as designed if there are fewer than 150 objects in the scene (refresh my memory, is the scene defined in your mind as on screen)?

What kind of hardware are you on, out of curiousity?

Also, not that it matters much, but are you working from released code, code you have been personally working on, or the fs2_open build from the warpcore CVS?

Question for the group: Has anyone else tried this? A community project only works if we're working together ;)
No signature.

 

Offline Kazan

  • PCS2 Wizard
  • 212
  • Soul lives in the Mountains
    • http://alliance.sourceforge.net
Asteroid Field Improvements Attempt (Images)
the origional release code is what i have

i can post my changes up on here, what i posted at first has been revised

the number is not exactly 150 - i know know 150 asteroids + 8 herc IIs + 1 deimos doesn't break it


this collision detection breakage occurs in the origional game if you put too many asteroids in
PCS2 2.0.3 | POF CS2 wiki page | Important PCS2 Threads | PCS2 Mantis

"The Mountains are calling, and I must go" - John Muir

 

Offline DTP

  • ImPortant Coder
  • 28
    • http://www.c4-group.dk
Asteroid Field Improvements Attempt (Images)
Quote
Originally posted by Kazan
increasing things didn't help

here are the Framerates i got
Max: 30.0 fps [looking at nothing but background], it appears to be the highest framerate FS2 will produce, *shrug*i often average 70 fps in Unreal Tournament at 1024x768 high detail

Min: 5.4 fps [looking down the major axis of the asteroid field, with a NTF asteroid base in view]


There must be an adjusteble setting somewhere. as i recall the standalone lets you cap FPS. and the max is 100 FPS.

the 30 FPS might be the default client_master cap.

but a quick glance did not reveal anything
VBB member; reg aug 1999; total posts 600.
War is a lion, on whos back you fall, never to get up.
Think big. Invade Space.

 

Offline LtNarol

  • Biased Banshee
  • 211
    • http://www.3dap.com/hlp/hosted/the158th
Asteroid Field Improvements Attempt (Images)
Quote
Originally posted by Inquisitor
Dave will have to want to help, and recent events may not make him inclined to do so.
Clarify for those of us who have been living under a rock?

 

Offline Fineus

  • ...But you *have* heard of me.
  • Administrator
  • 212
    • Hard Light Productions
Asteroid Field Improvements Attempt (Images)
Take my advice and forget it.

 

Offline Kazan

  • PCS2 Wizard
  • 212
  • Soul lives in the Mountains
    • http://alliance.sourceforge.net
Asteroid Field Improvements Attempt (Images)
actually ask me in private

[edited]
PCS2 2.0.3 | POF CS2 wiki page | Important PCS2 Threads | PCS2 Mantis

"The Mountains are calling, and I must go" - John Muir

 

Offline aldo_14

  • Gunnery Control
  • 213
Asteroid Field Improvements Attempt (Images)
Could be as simple as a bug in the collission code that only occurs at that (rough) number... or exceeding memory bounds.
Where's the collission detection defined again?  

I can't really understand most of the maths, but I might as well try and look at this stuff for myself :)


EDIT... just glanced (I emphasis the glanced part :D ) at void_weapon_area_apply_blast.... maybe the pointer's overrunning allocated space or soemthing... dunno.  Not really too clear on all this, unfortunately.  (But at least it gives you something to brutally criticise and dismiss ;7 )

(or weapon_hit... sod this, I'm off to bed)
« Last Edit: July 14, 2002, 05:40:06 pm by 181 »

 

Offline Inquisitor

Asteroid Field Improvements Attempt (Images)
So, back to the point, let us know when the code snippets are updated, maybe one of these kind folks (I know phreak looked at it briefly) can help solve the insoluble.

-edit-
(aldo replied when I did, so this is a bit out of context ;))
« Last Edit: July 14, 2002, 06:11:59 pm by 122 »
No signature.

 

Offline Kazan

  • PCS2 Wizard
  • 212
  • Soul lives in the Mountains
    • http://alliance.sourceforge.net
Asteroid Field Improvements Attempt (Images)
if the pointer runs off the end of the array you get a crash
PCS2 2.0.3 | POF CS2 wiki page | Important PCS2 Threads | PCS2 Mantis

"The Mountains are calling, and I must go" - John Muir

 

Offline aldo_14

  • Gunnery Control
  • 213
Asteroid Field Improvements Attempt (Images)
Quote
Originally posted by Kazan
if the pointer runs off the end of the array you get a crash


IIRC, you can sometimes overrun assigned area into a random block of different memory and just fetch random data... doesn't the FS2 code ignore any event causing a crash?  i.e. simply ignoring the collisison if it causes an error?

Ne'ermind....

 

Offline Kazan

  • PCS2 Wizard
  • 212
  • Soul lives in the Mountains
    • http://alliance.sourceforge.net
Asteroid Field Improvements Attempt (Images)
while it is true that sometimes running off the end of the array may stay within a programs memory page, it would crash once in a while

and to ignore any situations like that you have to have code in place to catch situationhs like that which would slow down the game, so you avoid checking code and just make sure you never pass data that does that


if they had checking code in place a 380K ships.tbl wouldn't crash fs2, it would just prevent it from running
PCS2 2.0.3 | POF CS2 wiki page | Important PCS2 Threads | PCS2 Mantis

"The Mountains are calling, and I must go" - John Muir

 

Offline aldo_14

  • Gunnery Control
  • 213
Asteroid Field Improvements Attempt (Images)
Quote
Originally posted by Kazan
while it is true that sometimes running off the end of the array may stay within a programs memory page, it would crash once in a while

and to ignore any situations like that you have to have code in place to catch situationhs like that which would slow down the game, so you avoid checking code and just make sure you never pass data that does that

 


There could be an implicit assumption that certian conditions will never be met in the code - you could have 'broke' that with your changes.

If the error handling was too great a problem, it could simply be ingored and the data set being limited by either those using the program, or the other interacting modules... and by ignore, I mean simply using a default value if the memory locaiton is out of 'synch' of expected values... i think stuff like moemnt of inertia does this - i remember some related stuff in the physics section along these lines.

BTw, I'm not sure, but if Windows references memory as 'wraparound', you could easily go off the edge of actual memory addresses and simply be tweaked onto the side... i've never looked at the Windows stuff in my courses last semester (primarily Unix and broad OS concepts), but it could be that the kernel prevents (or ties to) that sort of memory related error.

I don't really know... it's just that the only thing that immediately jumped out (for me) with C and pointers is exceeding defined bounds.  Unfortunately, I don't have the experience to make a more educated 'guess' :)

 

Offline penguin

  • Eudyptes codus
  • 28
  • Still alive.
Asteroid Field Improvements Attempt (Images)
Quote
Originally posted by aldo_14
BTw, I'm not sure, but if Windows references memory as 'wraparound', you could easily go off the edge of actual memory addresses and simply be tweaked onto the side... i've never looked at the Windows stuff in my courses last semester (primarily Unix and broad OS concepts), but it could be that the kernel prevents (or ties to) that sort of memory related error.
hehe, Windows (and most intel-based OSes) use a 4GB virtual memory layout.  You'd have to be pretty far off to wrap that :D
your source code slave

 

Offline Kazan

  • PCS2 Wizard
  • 212
  • Soul lives in the Mountains
    • http://alliance.sourceforge.net
Asteroid Field Improvements Attempt (Images)
it's very easy to walk off the end of a program's own memory page- what do you think a General Protection Fault or a Page Fault is?

each program is given it's own "region" in memory, windows doesn't enforce it very well, but walking off the end of your region - either end - results in a crash
PCS2 2.0.3 | POF CS2 wiki page | Important PCS2 Threads | PCS2 Mantis

"The Mountains are calling, and I must go" - John Muir

 

Offline EdrickV

  • Valued
  • 29
    • http://members.aol.com/HunterComputers
Asteroid Field Improvements Attempt (Images)
Assuming the number of objects in the mission is the deciding factor about whether the code will work, it might be worth adding a bit of code to display on the HUD the number of objects currently in the mission. Then if you have a mission where you can "add" more ships (reinforcements for instance) you may be able to find out exactly when the code breaks and that could give you an idea what to look for.
One other note, it may not be related to thisv but I have seen missions where the number of ships and stuff on the screen seemed to be the deciding factor on whether the program would crash or not.
Ground - "Let me help you out, you're clear to taxi any way you can, to any runway you see."

Mesh Gallery/Downloads:
http://members.aol.com/ArisKalzar/Gallery.html
Turreting 101:
http://members.aol.com/EdrickV/FS2/Turreting.html

http://members.aol.com/HunterComputers

 

Offline Nico

  • Venom
    Parlez-vous Model Magician?
  • 212
Asteroid Field Improvements Attempt (Images)
what about replacing the asteroids in the distance ( in fact LOD3 ) with sprites ( like explosions, engine glows, space debris etc )? I guess it's a no go, but take this as a suggestion anyway.
SCREW CANON!

 

Offline Bobboau

  • Just a MODern kinda guy
    Just MODerately cool
    And MODest too
  • 213
Asteroid Field Improvements Attempt (Images)
that might help speed, but I don't think it would help stability becase you would still have to many asteroids, even if they were just sprites,
you see it's the number of objects that seems to be the problem
Bobboau, bringing you products that work... in theory
learn to use PCS
creator of the ProXimus Procedural Texture and Effect Generator
My latest build of PCS2, get it while it's hot!
PCS 2.0.3


DEUTERONOMY 22:11
Thou shalt not wear a garment of diverse sorts, [as] of woollen and linen together