Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

DarkBASIC Professional Discussion / ok, whats going on -_-

Author
Message
Sephnroth
23
Years of Service
User Offline
Joined: 10th Oct 2002
Location: United Kingdom
Posted: 14th Aug 2003 16:26
I am having some mad troubles when it comes to using normal dbp things along side bsps. For example, i had a second camera that follows the main camera around except it draws to an image - that was fine and worked perfectly (fast too) - but when i used the image that the camera was drawing too as a sphere map for my gun, the gun looked great and reflected the whole scene around him but all the lights in the bsp went cock and it things in a square type pattern.
Now yesterday i tried to add a GUI to my little game. loaded my gfx (3 pngs), set the colour key to 255,0,255 (magenta is my transparent colour for them) and tried to paste them - first problem was the magenta refused to go transparent. i tried using them as sprites, just pasting the image, whatever, no go. tried turning the png's into bmp's and it kinda worked although i got a nasty cutout-like halo around my graphics. But forget that for now, I noticed that walking down this one corridor in my bsp map my fps was dropping down to 30fps (its usually a constasnt 60fps for me) - it didnt used to happen. I went back to my code, commented out the drawing commands (left the code to load the images there), reran, went back to my corridor and sure enough, were back to 60fps! loading 3 small images and trying to draw them HALFS my fps?! what is going on with bsps? Can I use ANYTHING along side them?
p4 2.4ghz, 256ddr ram, Geforce4 MX 440
Innovate, redefine, recreate whats in your mind. It isnt fate, you decide, only you can cross that line.
MasterInsan0
23
Years of Service
User Offline
Joined: 14th May 2003
Location: United States
Posted: 14th Aug 2003 16:34
As far as I can tell, BSPs don't get along too well with other elements of graphics. My shooter game has a closed-in, mazelike level with about 20 objects and in some areas my framerate (on a 1.1 Ghz Celeron with a GeForce 4 MX 420) drops to about 4. In others, it's perfectly around 60.

Although I haven't been able to recompile it and test in on my faster computer to see if BSPs just require a really fast computer to load well (see the thread "Problems Dealing with External Files" if you're curious as to why), there are definitely some problems still yet to work out of BSPs.

My friends' and my website for DBPro Programming:
http://unseenstudios.netfirms.com
Sephnroth
23
Years of Service
User Offline
Joined: 10th Oct 2002
Location: United Kingdom
Posted: 14th Aug 2003 17:03
bsps needing a faster computer? The idea is ridiculous These are half-life maps, that thing would run in software mode in a 400mhz machine and still be playable - half-life 2 keeps with the same *kinda* map format and yet its gorgousness will require a minium of just a 700mhz machine - I run on a p4 2.4ghz machine, i dont expect 3 images to half my fps T_T I mean, how am I supposed to have a semi decent gui now? And if objects cause the same problems.. you telling me we get to have a bsp level and thats it? no pictures, no badguys, no weapons. What good is that? About all I could write with that is a virtual tour of my house (and i bet i would still run into problems)

p4 2.4ghz, 256ddr ram, Geforce4 MX 440
Innovate, redefine, recreate whats in your mind. It isnt fate, you decide, only you can cross that line.
spooky
23
Years of Service
User Offline
Joined: 30th Aug 2002
Location: United Kingdom
Posted: 14th Aug 2003 17:51
From P4.1 and up I believe, transparency in png files is dictated solely by the graphic's built in transparency layer.

The programmer formerly known as sonic
Sephnroth
23
Years of Service
User Offline
Joined: 10th Oct 2002
Location: United Kingdom
Posted: 14th Aug 2003 18:02
i am patch 4.1 and I did try creating an alpha layer. If alpha is different from a transparency layer then im afraid i dont know what you are talking about

I hope these issues with bsps are fixed for patch five. in beta 2 loading a bsp either had it not appear at all or appear untextured. in beta 3 my world loaded completly black (either a texture error or a lighting error). maybe by beta 4 they will actually display, and if im lucky i will be able to use other dbp commands alongside them :/

p4 2.4ghz, 256ddr ram, Geforce4 MX 440
Innovate, redefine, recreate whats in your mind. It isnt fate, you decide, only you can cross that line.
MasterInsan0
23
Years of Service
User Offline
Joined: 14th May 2003
Location: United States
Posted: 14th Aug 2003 18:02
Hmmm...true, it is ridiculous. Heheh. Quake used BSPs and, as we all know, is very old.

In Half-Life, just recently, I was in a level with about 13 or 14 large enemies, all of them actively doing AI calculations, pathfinding, etc., and maintaining a smooth, constant framerate.

In DBPro, also just recently, I was in my small, closed off, maze-level with about 20 low-polygon models standing completely still and lagging all to hell in most places. I adjusted my collision settings so that I could look through the wall slightly and noticed that DBPro was drawing all of my object consistantly. So, you might try writing code to not draw them if they're outside of a certain distance. This will cause, if it's a more open area, a sort of popping-up when the enemies do come in distance, but it raised my framerate to about 13 from 3 or 4 in the really bad areas.

However, that still doesn't explain why the images are cutting your frames in half. I've personally noticed that sprites don't work too well when using BSPs as well (and possibly in other scenarios), so if you're using the sprite commands try using the image commands instead. I used those for my crappy paint-drawn grey GUI in my shooter game and it only cut my framerate by about 5 fps.

Another thing you have to remember is that no matter how well-compiled a DBPro program is, it'll never be as optimized as hand-tuned C/C++. That's why DBPro runs at 14 FPS and Half-Life runs at 60. However, there are always workarounds. Trust me, it's better to work around a slow part in DBPro than write a really optimized 3d engine in C.

My friends' and my website for DBPro Programming:
http://unseenstudios.netfirms.com
Sephnroth
23
Years of Service
User Offline
Joined: 10th Oct 2002
Location: United Kingdom
Posted: 14th Aug 2003 18:12
dbp will never be as optimised sure, but it DOES compile to machine code - i dont want my app to run at 300 frames per second, but I would like to get 60 out of a rather small test bsp, 1 gun object locked to the screen and 3 images :/

I would just use the image commands.. but im after transparencey. I dont just mean that everything a certain colour isnt drawn (though, i do want that) but I was intending on using the sprite alpha command to make the entire gui partially see-through so things didnt obstruct the screen. It would of even been nice to eventually have a menu option to allow the user to set the transparancey :/

Its a shame, Bsps are GREAT. Just the ability to be able to create my levels in something as nice as Quark is enough of a driving force to make me want to attempt to write my own bsp compilers to remove the rest of the legal issues. But im never going to even attempt that if I cant actually write a game using bsp's. I'd like to be able to have a gui please. I'd like to be able to use sphere mapping if i wanted without all the bsp lights blowing up (slow down i could cope with when it comes to advance effects like that.. but lights dying?). And i also want to find a way of handling brush-type entities. These are all things I need (or at the very least, really want bad) to make a half decent game - but recently every experiment i run just gets me more and more depressed- at this moment i dont think its POSSIABLE to write a decent game using bsps and dbp

p4 2.4ghz, 256ddr ram, Geforce4 MX 440
Innovate, redefine, recreate whats in your mind. It isnt fate, you decide, only you can cross that line.
Van B
Moderator
23
Years of Service
User Offline
Joined: 8th Oct 2002
Location: Sunnyvale
Posted: 14th Aug 2003 18:25
One of the things that worried me most about converging to DBPro was BSP's - 'cos I did'nt know a lot about them, I thought I'd have to learn howto use Quark and how BSP's worked.

Now I could'nt give a monkeys - I won't use BSP's because I don't think they hold enough benefits for us to put up with the niggles. I'd rather make my own detail hiding and collision system than use them.

Not very helpful I know, but maybe you should approach it from another angle, have a rethink about ways to do this without resorting to BSP's. Put this way - If BSP's are not really fast in DBPro, if they don't have amazing collision and don't run really smoothly without problems, why use them? - .X model levels hold so many more benefits if implimented properly.


Van-B

My cats breath smells of cat food.
Sephnroth
23
Years of Service
User Offline
Joined: 10th Oct 2002
Location: United Kingdom
Posted: 14th Aug 2003 18:35
The main reasons why i want to use bsps are a) the portal system is cool. Drawing only what you can see, precalculated lights - sometimes bad in their own way but also so very good. b) and this is the big one, the editors availiable. Ok, so you could write your own editor for a .x system. But unless you are going to spend like sometime between a month and a year on them, you will not come anywhere near the scale of the bsp editors around. Hammer, Q3Radient and Quark are just three of them, theres more. These things have been around for quite some time, patched and updated - constantly refined. They actually make mapping really quite fun Personally, I dont even think cartography shop compares. And these things are free!
Then theres the entities system - weapon, powerup, spawn points, patrol points, badguys - all these are Point Entities and I can already handle all them just fine - it makes it so easy and can be mainly handled from the map editor. Brush entities are things like trigger areas, doors, buttons n whatnot. I cant handle these at the moment.. im still researching the bsp format to see if i cant write a few routines to handle them (although i have no idea how their rendering is going to slot in with dbp's bsp rendering..).

All in all, Bsp is a GREAT format (and theres no real reason it should only be used for first person shooters.. heavy metal fakk2 (a third person rpg) used the bsp format too) - but at the moment in dbp it just doesnt seem usable :/ Right now I dont want the hastle of writing my own level editor (again) when without putting a huge amount of time into it (which i really dont have if i want to write a game as well) its not gonna be all that great - certainly no where near the calibur if the editors i can get for free to handle bsp's.

All in all, the situation is really very lame :/

p4 2.4ghz, 256ddr ram, Geforce4 MX 440
Innovate, redefine, recreate whats in your mind. It isnt fate, you decide, only you can cross that line.
David T
Retired Moderator
23
Years of Service
User Offline
Joined: 27th Aug 2002
Location: England
Posted: 14th Aug 2003 19:14
Here's my advice about BSPs: don't bother. They'll give you more trouble that they're worth.

You are the th person to view this signature.
GRAVITY: I fought the law but the law won

Login to post a reply

Server time is: 2026-07-23 02:29:58
Your offset time is: 2026-07-23 02:29:58