Adventure Game Studio

AGS Support => Advanced Technical Forum => Topic started by: Crimson Wizard on Mon 15/03/2010 21:27:23

Title: [SUGGESTION] Room constants
Post by: Crimson Wizard on Mon 15/03/2010 21:27:23
I have a suggestion to make AGS create constants for rooms which would store room ID's, as it does for characters. I have a feeling it would be nicer to use them instead of plain numbers in such functions as ChangeRoom, or when checking character.Room property.
Title: Re: [SUGGESTION] Room constants
Post by: Pumaman on Tue 16/03/2010 20:30:50
Yes, I agree. This is something I've been meaning to do for a long time, it will be added at some point.
Title: Re: [SUGGESTION] Room constants
Post by: monkey0506 on Tue 16/03/2010 20:43:48
If you're talking about the constants like EGO it's really just a macro definition..which you could do for yourself pretty easily such as:

#define HALLWAY 1
#define BEDROOM 2
#define KITCHEN 3
#define BATHROOM 4


I'm not entirely sure if that's what you meant though.

If it is, I'd actually just use an enumeration instead:

enum RoomName {
  eRoomHallway = 1,
  eRoomBedroom = 2,
  eRoomKitchen = 3,
  eRoomBathroom = 4
};
Title: Re: [SUGGESTION] Room constants
Post by: Crimson Wizard on Thu 18/03/2010 18:32:08
Hey monkey, are you kidding me? You seriously thought I woudn't guess that?  :P

To make it clear: ofcourse there's a lot of stuff that could be done by user. What I propose is to make user's life easier.
Title: Re: [SUGGESTION] Room constants
Post by: monkey0506 on Thu 18/03/2010 23:11:40
Well it's also the burden of the user to understand that suggestions must be prioritized. Something the user can simply and easily do themselves in literally about 5 seconds is not high-priority for implementation IMO. :P
Title: Re: [SUGGESTION] Room constants
Post by: subspark on Thu 18/03/2010 23:41:58
Still, it's good to know it was already on CJ's to-do list. It will of course make a nice feature addition to AGS.
It makes sense to try and unify the way this kind of data is handled anyway.

Cheers,
Sparky.
Title: Re: [SUGGESTION] Room constants
Post by: monkey0506 on Thu 18/03/2010 23:48:43
I'm not saying it's a bad idea, I'm just saying there are a slew of other things which would be a load more useful, and thereby be a better usage of CJ's time overall.

Ultimately yes, it would be nice to get rid of all arbitrary numerical values in scripts, replacing them with meaningful entities instead. As I said though, I would rate it as a being very low priority.
Title: Re: [SUGGESTION] Room constants
Post by: Crimson Wizard on Fri 19/03/2010 00:01:30
Um, unfortunately I don't have a list of all suggestions in mind atm, and also it is not always obvious how much time this or that feature will take to be implemented; so I must disagree, I don't think user should prioritize suggestions, it's developer's work, and here I am simply throwing in proposal in the suggestions pool, without considering its priority or implementation date  ::)

But, actually I responded above mainly to imply that there's no need to explain those simple things to me.  ;)
Title: Re: [SUGGESTION] Room constants
Post by: subspark on Fri 19/03/2010 00:34:29
Relax fellas. ;)  It's just a suggestion and it has already been agreed to. Let Chris handle it from here.
In the meantime Crimson, Monkey's suggestion is a good one. But your suggestion has a logical home inside AGS.

Share the love people :=

Cheers,
Sparky.
Title: Re: [SUGGESTION] Room constants
Post by: CShelton on Fri 19/03/2010 02:53:52

Quote from: Crimson Wizard on Fri 19/03/2010 00:01:30
But, actually I responded above mainly to imply that there's no need to explain those simple things to me.  ;)

Please keep in mind that although you know all about constants and enums, the rest of us might not. I'm on both of your sides, arbitrary numbers should be done away with at some point, but I'm certainly happy to have workarounds posted until those changes are implemented.
Title: Re: [SUGGESTION] Room constants
Post by: Crimson Wizard on Fri 19/03/2010 17:53:40
Okay, okay, I agree, sorry, I am being an arrogant asshole again  :)