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 Discussion / loading screens after a level's completed

Author
Message
Lover of games
20
Years of Service
User Offline
Joined: 17th Apr 2005
Location:
Posted: 14th Jul 2006 02:20
I've been trying to add a loading screen signaling the loading of another level in the Alien Hunter game. you know if the playerScore is equal to 2 then gosub loading screen. but when the condition is true then go to the loading screen. It does that but i want it to be clear not show the first level while it's loading.
I'll show you a picture.



"Originally I was going to have a BS on it but you know how that would be. I can't walk around with the letters BS on me." More or less a qoute by Syndrome from Jack, Jack, attack
Jack
20
Years of Service
User Offline
Joined: 4th Oct 2004
Location: [Germany]
Posted: 14th Jul 2006 14:29
first you have to delete all the media which is used in this level
(delete object / matrix / image ) then you can load your 2. level.
If you want a loading screen try to use a sprite with the screen size
you should also reset all the variables e.g player start position

Pincho Paxton
22
Years of Service
User Offline
Joined: 8th Dec 2002
Location:
Posted: 14th Jul 2006 14:32
Or stick your loading screen on a plain in front of everything else.

Lover of games
20
Years of Service
User Offline
Joined: 17th Apr 2005
Location:
Posted: 16th Jul 2006 06:07
I deleted all the files in a subroutine called Delete:
now i'm getting alot of errors.
at first i got an error that object does not exist on like 2 720 but it pointed to the Sync rate command. I deleted all the things i was suppose to delete. When i play the game and let the monster win 2 times (as a demo until i get the hang of it.) it says "object does not exist at line 254 and it points to



why does it say that when i deleted everything in level 2.
after changing a few things now it says that Sleep is an object and it doesn't exist.

here's the code for loading level 2.


and here's the subroutine i used to delete everything.



Hope that's everything. thanks for all ur help.

"Originally I was going to have a BS on it but you know how that would be. I can't walk around with the letters BS on me." More or less a qoute by Syndrome from Jack, Jack, attack
RUCCUS
20
Years of Service
User Offline
Joined: 11th Dec 2004
Location: Canada
Posted: 16th Jul 2006 08:50
Instead of deleting all of the objects, just hide them.


Projects: Online CTF Game | Newcommer's Guide to FPS's
Sven B
20
Years of Service
User Offline
Joined: 5th Jan 2005
Location: Belgium
Posted: 16th Jul 2006 13:27
Quote: "Instead of deleting all of the objects, just hide them."


Didn't we just suggest do delete all the objects before loading a new level?

Please read the whole thread...

It's the programmer's life:
Have a problem, solve the problem, and have a new problem to solve.
RUCCUS
20
Years of Service
User Offline
Joined: 11th Dec 2004
Location: Canada
Posted: 16th Jul 2006 15:18
Yes, you all suggested to delete all of the files (which will add loading time), which gave him a bunch of errors because obviously his program uses some of those objects elsewhere. Hiding them however would not do this, but would still give him free reign over getting any objects back from previous levels if he finds the need. As long as he culls the non-used objects properly, they shouldnt cause too much of a problem.


Projects: Online CTF Game | Newcommer's Guide to FPS's
Lover of games
20
Years of Service
User Offline
Joined: 17th Apr 2005
Location:
Posted: 16th Jul 2006 17:17
I get an error that matrix does not exist. I don't see any command that says hide matrix. I hide all the objects but deleted the images, sounds, and such. after the monster reaches two the screen still shows but it still doesn't clear the level one. i still see some of the objects of level 1, thanks for all ur help. I'm trying as hard as i can to figure out.

"Originally I was going to have a BS on it but you know how that would be. I can't walk around with the letters BS on me." More or less a qoute by Syndrome from Jack, Jack, attack
RUCCUS
20
Years of Service
User Offline
Joined: 11th Dec 2004
Location: Canada
Posted: 16th Jul 2006 18:49 Edited at: 16th Jul 2006 18:50
It might be easier to use a loop going from the first object you've got in your level to the last, and checking if the object exists, if so delete/hide it. So if you had objects 7,12,13,14,15,85,97,and 100, you'd use a loop like so;



A lot shorter. You could also have an array for each level that holds what objects are required for that level, like so;



And then you could add that into the loop like this;



Somethin like that, makes it easier. Still needs some tweaking but I've got to go for now. Goodluck.


Projects: Online CTF Game | Newcommer's Guide to FPS's
Sven B
20
Years of Service
User Offline
Joined: 5th Jan 2005
Location: Belgium
Posted: 16th Jul 2006 22:00
I don't know about that...

I remember a thread (pretty recent) where I had some argues with SFSW, and someone posted a very interesting "bug". (It was about DBC advantages).

He showed, that - when loading like 500 images - the fps drops pretty much when using the 500th image instead of the first.

So maybe this could be also a problem when using 3D.

It's the programmer's life:
Have a problem, solve the problem, and have a new problem to solve.
Pincho Paxton
22
Years of Service
User Offline
Joined: 8th Dec 2002
Location:
Posted: 18th Jul 2006 10:04
I say to the guy that posted the thread that all you have to do is find the objects that are shared between levels, and not delete them. Asking for help on this is pointless. You should know what you are loading, and deleting without needing to ask us.

Captain America
20
Years of Service
User Offline
Joined: 8th Apr 2005
Location: Here
Posted: 28th Jul 2006 07:35
Lover:


You cant trust that error thing, it'll tell you whats wrong, but it never points to the correct line, it always points a couple lines too high or a couple too low.

You basically just have to read over all your code again in that area and look for bugs. (Easier said then done)

The only advice I can give you on the loading screen is to delete all the stuff that you wont use on the next level (like what Pincho said) and then put an image infront of everything else using the 'draw to front' command. (like what Pincho said).

Then when you're all done loading, delete the image infront, and set up your next level!

Cheer's

Cap'n


Cheers,
Capt. America
Lover of games
20
Years of Service
User Offline
Joined: 17th Apr 2005
Location:
Posted: 30th Jul 2006 17:50
I guess pincho has sort of a point. I think i know what I need to do. I've had the solution in my mind now i just have to try it

"Originally I was going to have a BS on it but you know how that would be. I can't walk around with the letters BS on me." More or less a qoute by Syndrome from Jack, Jack, attack

Login to post a reply

Server time is: 2025-05-25 12:45:47
Your offset time is: 2025-05-25 12:45:47