VBBR
Moderator
Brazil
617 Posts |
Posted - Jun 06 2004 : 09:54:18 AM
|
Hey how is that hungarian notation? I have no clue about notations and such.
I think the notation I use is the "VBBR notation"...
Also I will adopt EACam's suggestions for logging, thanks EACam.
|
Whatever. Who knows... |
|
|
Sr. Guapo
Swordmaster
USA
272 Posts |
Posted - Jun 06 2004 : 10:01:59 AM
|
It's ok, I just learned the actual term yesterday, convenient... Anyway, it is the notation about how a variable should be named, constants are fully capitalized, etc. It also suggested using prefixes (such as n-integer, dbl-double, str-string, etc.) on variables to keep the types straight. I don't know where the name came from, but it is helpful... |
|
|
masterbooda
Swordmaster
277 Posts |
Posted - Jun 06 2004 : 10:05:30 AM
|
That is the next change to the code, is the device lost error fix.... I am looking into the code and it should be an easy enough change, I was going to do it earlier, but got so excited to fix the recent bug I had forgot about it... but noticed it on my request page... It will be implemented shortly into v1.3 code....
Thank you 2dCoder for running those demos again, and thank you for reminding of that bug... it is something I really should have put into it to begin with, but I prefer windowed mode myself, and my bias blinded me...lol
Dabooda out... |
DaBooda Team is back: http://dabooda.789mb.com/ |
|
|
masterbooda
Swordmaster
277 Posts |
Posted - Jun 06 2004 : 5:06:21 PM
|
Ok, I have another problem here, and I know what the issue is and somewhat how to fix it, but implementing the change is beyond by grasp...
The engine is doing this, in fullscreen mode when somebody hits alt tab or minimizes the window it is popping up an error which is the simple device lost error... ok I know the error and I know to check for it, but here is my problem...
I have everything in the class and I can't really create an event because that will require the user to do more work, I am trying to implement the check and fix into the render routine, this way no user is the wiser to it even being there.... any suggestions...?
DaBooda out... |
DaBooda Team is back: http://dabooda.789mb.com/ |
|
|
Eric Coleman
Gladiator
USA
811 Posts |
Posted - Jun 06 2004 : 7:34:20 PM
|
You generally want to stop calling any render functions when the device is lost, so the best way to do that is to go into a secondary loop that waits for the device to return, and then it can reload all textures, vertex buffers, and index buffers. If your class stops the program from functioning in any way because the device is lost, then that's just really bad for the program. In a real game you'll still want to be able to transmit and receive any network data and also keep physics simulations running or somehow pause them to avoid a simulated explosion. |
|
|
masterbooda
Swordmaster
277 Posts |
Posted - Jun 06 2004 : 10:11:18 PM
|
There in lies the problem, because I thought of using the second loop but it would put everything in the clients program on hold. So I thought of maybe skipping the render routine as long as the device is lost, but the rest of the program would run, and they would have to put in an event to notify them. There is no way to install this into the engine without losing one or the other. I will figure something out, but I am tempted to let the user have control over that, because they know when the program has lost focus... and they can set it up to do what they will, because really the engine only runs when one command is called. This will give the user more control, because putting the render loop on pause just wouldn't do.
DaBooda out...
|
DaBooda Team is back: http://dabooda.789mb.com/ |
|
|
masterbooda
Swordmaster
277 Posts |
Posted - Jun 06 2004 : 10:13:54 PM
|
I'm almost tempted to remove the fullscreen ability anyways, because you can still achieve full screen by maximizing your window and using always on top functions... And Windowed is hundred more times compatible, and the refresh is more stable as well as being able to have any size window, that is a bonus... So any opinions on that?
DaBooda out... |
DaBooda Team is back: http://dabooda.789mb.com/ |
|
|
Eric Coleman
Gladiator
USA
811 Posts |
Posted - Jun 06 2004 : 10:49:45 PM
|
slow, slow, slow. |
|
|
masterbooda
Swordmaster
277 Posts |
Posted - Jun 06 2004 : 11:05:09 PM
|
I know I am slow but that is besides the point :)
As for windowed being slow, I notice no difference on my machine at all and I am running an archaic piece of junk... actually full screen runs a little slower than windowed for me....
Should I give the user the control over this, or simply let it ride, because there is no way to incorporate this without losing something in the engine... stupid window's and stupid alt tab and window's key... I will concentrate on this tommorrow my mind is tired from writing all these tutorials...
Dabooda out... |
DaBooda Team is back: http://dabooda.789mb.com/ |
|
|
EACam
Warrior
154 Posts |
Posted - Jun 09 2004 : 09:37:43 AM
|
Yeah...and actually, using windowed mode is LESS compatable, i believe. If u do recall, there is a Caps value u need to check that specifies if windowed mode is supported, whereas there is no such enumeration for full screen. To me that seems good enough proof that full screen, when done right, is more compatable.
Unfortunately, tho, I have the same problem. In full screen my alt+tab handling (YES, i DO have it) doesn't even work. It causes DX to crash and i haven't the slightest clue why. I think i'll have to rewrite my initialization code and see if i can get it to work, but i'm not sure. From what i hear, however, it is a good idea to load ur textures after restoring, and to me, i feel that if i cant get restoration to work, it wouldn't be any worse for me to just COMPLETELY destroy and re-initialize my window and then reload all the grafix.
But yes, Windowed mode IS slower (and there's no hope of gamma correction in windowed mode - speaking of gamma correction, i still dont have the Interpolate function ).
Well, theres my 2c.
P.S. VBBR, i'm glad u like my method , i got it from how MS Visual C++ does its compilation logging. |
Edited by - EACam on Jun 09 2004 09:42:26 AM |
|
|
EACam
Warrior
154 Posts |
Posted - Jun 09 2004 : 09:49:14 AM
|
Oh...and hungarian notation is definately a +. I didn't know what that was for the first 2 yrs or so of my programming life (aka, no life), and then i started using it. One nice thing i've found is that, since VB DOESN'T use hungarian notation, by using it u can have things like
sName As String
whereas
Name As String
would be invalid since VB already uses Name.
Unfortunately, my programming style is like the wind and i have once again neglected to use hungarian notation. It's probably because I had to use a bunch of code i wrote a LONG time ago and i didn't want to seem inconsistent by using hungarian when a lot of the code didn't...i dunno. I should pick it back up tho. |
|
|
VBBR
Moderator
Brazil
617 Posts |
Posted - Jun 09 2004 : 10:29:46 AM
|
Does anyone have a link for a page explaining hungarian notation? |
Whatever. Who knows... |
|
|
Sr. Guapo
Swordmaster
USA
272 Posts |
Posted - Jun 09 2004 : 11:31:34 AM
|
I just sa it in a book the other day (some PHP code book...). There isn't much to explain. Basically, it gives a common nomenclature (sorry, too much chemistry), naming scheme, to variables, functions and classes. It can be adapted to suit your needs as well. Here are some of the more common things:
Variable Names: -always lowercase except at the beginning of a word (if the var name is more than one word): variableOne -names should describe the values the variable holds (except for loop variables: i, j, etc.): frameRate -names should have a prefix describing the type of variable: strName, nNumber, dblNumber
Constants: -always uppercase, words seperated by underscore: CONSTANT_ONE -rest same as variables
Functions/Subroutines/Methods: -just like variables: getValue()
Classes: -Just like variables except the first letter is capitalized: GraphicsEngine
This is all subject to change based on your own preferences, but it provides a good base to build on. |
Edited by - Sr. Guapo on Jun 09 2004 11:32:36 AM |
|
|
Eric Coleman
Gladiator
USA
811 Posts |
Posted - Jun 09 2004 : 9:44:31 PM
|
quote: Originally posted by VBBR
Does anyone have a link for a page explaining hungarian notation?
It's in the VB help file.
Look under Visual Basic Documentation > Using Visual Basic > > Programmer's Guide (All Editions) > > > Visual Basic Coding Conventions
There should be 4 topics in that "book," read them all. |
|
|
VBBR
Moderator
Brazil
617 Posts |
Posted - Jun 10 2004 : 07:56:18 AM
|
Hum... that would be good if I had the MSDN CD... well I guess this also exists in the online MSDN, I will take a look, thanks. |
Whatever. Who knows... |
|
|