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.

Dark GDK / Blue Screen moving back to 2D from 3D

Author
Message
Shadow Fan 0
16
Years of Service
User Offline
Joined: 27th Jan 2008
Location: Livermore, CA
Posted: 6th Apr 2008 07:30
In my game I have a 2D title screen (just a bitmap I copy to the screen), but the actual game is 3D. I'm trying to travel back to the title screen from the 3D environment via the Escape Key and, while I'm having no trouble with the clean-up (removing objects, sound effects, etc.), the title screen will appear for a split second then the screen will go blue. I'm thinking the 3D camera might still be active? If so, is there a way to disable it until I re-initialize it later? Any suggestions are appreciated and thank you in advance!

"...The Protoss do not run from their enemies. Aiur is our homeworld, it is here that we shall make our stand!" -Aldaris
Lilith
16
Years of Service
User Offline
Joined: 12th Feb 2008
Location: Dallas, TX
Posted: 6th Apr 2008 19:20
Are you refreshing the copy of the bitmap to the screen every cycle?

Lilith, Night Butterfly
I'm not a programmer but I play one in the office
Shadow Fan 0
16
Years of Service
User Offline
Joined: 27th Jan 2008
Location: Livermore, CA
Posted: 6th Apr 2008 22:15
As far as I know I am yes. Here's my main loop:


The statements in the ifs are enumerated types I made to clear things up. AutomatedEvents() deals with gravity, keeping the Listener thingy with the player, etc. There is no screen refresh code in it. CheckInput() simply has a switch statement in it to determine what keys to look for based on what screen we're on. In the case of the game engine it branches to the following



So, this just does cleanup, deleting everything to free up memory. My Terrain is object 1, Skybox 2, and the 2 players are 3 & 4. All the other objects are 5+. After it does that clean-up, here's what LoadTitle Screen() does:



I realize I have an extra dbCLS() in there, but it shouldn't matter as it is placed before the screen drawings. By the time this function is done executing, half of the main loop no longer runs (i.e. all it does is CheckInput() and dbSync() like it's supposed to). When it refreshes I get a split second viewing of my title screen, then the Blue void of an empty 3D environment (not the Black void of dbCLS()). Hence my question in my first post. Thank you again in advance!

"...The Protoss do not run from their enemies. Aiur is our homeworld, it is here that we shall make our stand!" -Aldaris
Shadow Fan 0
16
Years of Service
User Offline
Joined: 27th Jan 2008
Location: Livermore, CA
Posted: 12th Apr 2008 23:02
Judging by the lack of responses I guess no one really does this frequently? Cleaning up a 3D Environment and then interfacing with 2D menus again that is?

"...The Protoss do not run from their enemies. Aiur is our homeworld, it is here that we shall make our stand!" -Aldaris
Shadow Fan 0
16
Years of Service
User Offline
Joined: 27th Jan 2008
Location: Livermore, CA
Posted: 13th Apr 2008 01:09
Solved it. I needed to call "dbBackdropOff()."

"...The Protoss do not run from their enemies. Aiur is our homeworld, it is here that we shall make our stand!" -Aldaris
Zizzy
16
Years of Service
User Offline
Joined: 16th Apr 2008
Location:
Posted: 18th Apr 2008 22:33
i've found a few more problems with dark gdk to, the input methods are very limited instead of there being MouseReleased and MouseDown it just has MouseClick, no way to control these 2 you can only control MouseDown basically...
Shadow Fan 0
16
Years of Service
User Offline
Joined: 27th Jan 2008
Location: Livermore, CA
Posted: 19th Apr 2008 03:01
I also noticed the same thing with the keyboard keys. My book "Beginning Darkbasic Game Programming" used in my college Game Intro course has an entire chapter dedicated to input subtlties like that and for whatever reason, those disappeared in Dark GDK...

"...The Protoss do not run from their enemies. Aiur is our homeworld, it is here that we shall make our stand!" -Aldaris
Lilith
16
Years of Service
User Offline
Joined: 12th Feb 2008
Location: Dallas, TX
Posted: 19th Apr 2008 04:00
Quote: "i've found a few more problems with dark gdk to, the input methods are very limited instead of there being MouseReleased and MouseDown it just has MouseClick, no way to control these 2 you can only control MouseDown basically..."


I mistakingly responded to this on the Character Movement thread. Check for my response over there. Sometimes you just have to fend for yourself.



Lilith, Night Butterfly
I'm not a programmer but I play one in the office
jason p sage
17
Years of Service
User Offline
Joined: 10th Jun 2007
Location: Ellington, CT USA
Posted: 21st Apr 2008 19:08
Yup, writing your own has its benefits - more control - and frankly the tools are there - you have the ability to test joysticks, mouse, and keyboard...

for mouse, just save last buttons positions, and compare. If buttonclickold=false and buttonclicknow = true then they JUST pressed the button. etc etc.

DarkGDK is way cooler than DBPro - you just have to learn the landscape and decide how to attack the beast

Login to post a reply

Server time is: 2024-09-29 17:25:44
Your offset time is: 2024-09-29 17:25:44