View previous topic :: View next topic |
Author |
Message |
clayasaurus
Joined: 21 May 2004 Posts: 857
|
Posted: Thu Oct 12, 2006 1:11 pm Post subject: |
|
|
Sequoh wrote: | Thanks for the explanation! How can I reproduce the bug? What's drawn in the wrong order? |
Just play FreeUniverse for a small amount of time, some planets and space stations get drawn over the players ship, plus the particles are not drawn over space stations. Not being able to control draw order in some way is a real hinderance, a design flaw.
Quote: |
2) Split lists would have the added advantage of being able to get rid of mosts of the run-time type checking and casts, making some things cleaner. However, calling each FU_OBJECT's handle_object would get more tiresome. I propose a custom holder class, that allows to iterate over all FU_OBJECTs in the right display order and also over the seperate FU_SHIP, etc. |
Alright. If I understand you correctly, this would eliminate the need for the sorting? I think keeping each object type 'ships', 'planets', etc. in their own linked list would be good, and writing holder class would be good (assuming it holds all linked lists and allows for easy operations on multiple lists).
If this is the case, I'm willing to undo the sorting damage that I've done by adding the extra template parameter (lots of code effected). Before I do, however, I want to get phr00t's opinion. Also, which one of us would develop this holder class?
~ Clay |
|
Back to top |
|
|
Phr00t
Joined: 03 Mar 2006 Posts: 203
|
Posted: Thu Oct 12, 2006 1:44 pm Post subject: |
|
|
I am open up to anything you guys want to implement to fix the draw order. As long as it doesn't require sorting the list every frame, which doesn't sound very efficient?
Get a good estimate on how much work it is going to require to do these class / list changes.. making these class changes, different lists etc. are fundamental, and can't be "half-done" and still work.
If ships and planets are not in the same list, then AI ships will have to search both lists for possible targets... unless there is a base class list they search through -- like what currently happens. |
|
Back to top |
|
|
clayasaurus
Joined: 21 May 2004 Posts: 857
|
Posted: Thu Oct 12, 2006 2:19 pm Post subject: |
|
|
Alright, I'll make a seperate thread to deal with the object handler implementation, I hope it is as simple as it sounds |
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|