Please login or register.

Login with username, password and session length
Advanced search  

News:

IRC channel - server: waelisch.de  channel: #wme (read more)

Pages: 1 [2]  All

Author Topic: FadeOut and FadeIn  (Read 15604 times)

0 Members and 1 Guest are viewing this topic.

Daniel

  • Regular poster
  • ***
  • Karma: 0
  • Offline Offline
  • Posts: 124
  • I'm *not* a llama!
    • View Profile
Re: FadeOut and FadeIn
« Reply #15 on: April 20, 2004, 08:57:26 PM »

My two cents...

Maybe you could use words that describe the purpose of the methods instead of their functionality. For instance, if the whole purpose of the new fade methods is for using in system exclusive mode (and I don't even know if that's the case, btw), then maybe you can add words like "System" or "Exclusive" to the method names. Something like Game.SystemFadeOut().

Another option might be the Microsoft WIN32 way. Something like Game.FadeOutEx() for the new methods. The "Ex" functions in WIN32 are usually very similar to the ones without the "Ex" but they have more parameters, so the ones without the "Ex" are used for most common things while in cases when you need more specialized functionality, you call the "Ex" functions, fully aware that you'll be required to specify more parameters. Btw, AGS uses this scheme for playing sounds. It has PlaySound(sound_number) and PlaySoundEx(sound_number, channel).

Another option, a more object oriented one this time, could be to use a new object. If, for instance, the Game object, along with all it's attributes and internal parameters, encapsulates the things that are being saved to the saved games (it's just an example, I'm not saying that's really the case), then maybe a new object could be conceived, that encapsulates all other game attributes and parameters that are not saved to the saved games. In that case, you don't have to come up with another name for the fade methods because they will belong to different objects now. You'll have a System.FadeOut() method, for example, as opposed to the Game.FadeOut() method that exists today. I agree that two fade methods seem pretty scant for creating a new engine object but maybe there are other methods here and there that this new object could be their long lost home. And for the long run, surely more and more things will come up that will fit right into this kind of object.

Then again, you can forget all about my academic rants and just use Game.FadeOutUnfreezable() ;)
Logged

Mnemonic

  • WME developer
  • Administrator
  • Addicted to WME forum
  • *
  • Karma: 41
  • Offline Offline
  • Gender: Male
  • Posts: 5683
    • View Profile
    • Dead:Code Site
Re: FadeOut and FadeIn
« Reply #16 on: April 20, 2004, 09:18:07 PM »

Maybe you could use words that describe the purpose of the methods instead of their functionality. For instance, if the whole purpose of the new fade methods is for using in system exclusive mode (and I don't even know if that's the case, btw), then maybe you can add words like "System" or "Exclusive" to the method names. Something like Game.SystemFadeOut().

Good point. Yep, I like "SystemFadeOut" :)


Another option might be the Microsoft WIN32 way. Something like Game.FadeOutEx() for the new methods. The "Ex" functions in WIN32 are usually very similar to the ones without the "Ex" but they have more parameters, so the ones without the "Ex" are used for most common things while in cases when you need more specialized functionality, you call the "Ex" functions, fully aware that you'll be required to specify more parameters. Btw, AGS uses this scheme for playing sounds. It has PlaySound(sound_number) and PlaySoundEx(sound_number, channel).

I was considering the Windows-like *Ex naming convention, but then I thought "what if there are more than two variations?", so I declined.


Another option, a more object oriented one this time, could be to use a new object. If, for instance, the Game object, along with all it's attributes and internal parameters, encapsulates the things that are being saved to the saved games (it's just an example, I'm not saying that's really the case), then maybe a new object could be conceived, that encapsulates all other game attributes and parameters that are not saved to the saved games. In that case, you don't have to come up with another name for the fade methods because they will belong to different objects now. You'll have a System.FadeOut() method, for example, as opposed to the Game.FadeOut() method that exists today. I agree that two fade methods seem pretty scant for creating a new engine object but maybe there are other methods here and there that this new object could be their long lost home. And for the long run, surely more and more things will come up that will fit right into this kind of object.

Well, the Game object *is* supposed to be this "system", actually. I believe the "Game.FadeOut" name works pretty well in the object oriented context, but still the the two game states make things a bit complicated :) I can see your point, though...


Then again, you can forget all about my academic rants and just use Game.FadeOutUnfreezable() ;)

No no, I appreciate your comments!
Logged
Yes, I do have a twitter account
Please don't send me technical questions in private messages, use the forum. ::wave

Daniel

  • Regular poster
  • ***
  • Karma: 0
  • Offline Offline
  • Posts: 124
  • I'm *not* a llama!
    • View Profile
Re: FadeOut and FadeIn
« Reply #17 on: April 20, 2004, 10:29:27 PM »

I was considering the Windows-like *Ex naming convention, but then I thought "what if there are more than two variations?", so I declined.
You're right, I don't care very much for this option myself. All the "Ex" functions in WIN32 seem like a bunch of patches to me.

Well, the Game object *is* supposed to be this "system", actually. I believe the "Game.FadeOut" name works pretty well in the object oriented context
If the Game object really is the appropriate place for the new Fade* methods, then under the circumstances, I agree with you that Game.SystemFadeOut() is the best option.

No no, I appreciate your comments!
Thanks, I'm glad to be of help :).
Logged
Pages: 1 [2]  All
 

Page created in 0.038 seconds with 23 queries.