SUGGESTION: NEW and CLOSE game

Started by Shane 'ProgZmax' Stevens, Sat 07/06/2008 20:52:31

Previous topic - Next topic

Shane 'ProgZmax' Stevens

I'm really surprised that these haven't been mentioned or implemented yet, but it's a bit strange that you have to close and reopen the editor every time you want to create a new project.  The ability to close your project (return to just a blank screen) and open a new one after you've started using the editor would definitely be improvements :).

Pumaman

I think a "New" option has been mentioned before, but there hasn't been much enthusiasm for it. Would anyone else find it useful?

monkey0506

I don't think it would probably be of very high usage to be honest. I wouldn't say it's an unreasonable suggestion, I'm just unsure how many people would actually use it.

Personally I doubt I would really need such an option. However if it wouldn't be difficult to implement I wouldn't object to it.

skuttleman

#3
Useful = Yes.

But I wouldn't think of it as a priority. It's not like AGS takes ages to load like Microsoft EverythingTM does. So it's not that big of a deal to close AGS and re-open it. Besides, I'd much rather see any of the billions of other things on the countless threads of wishlists happen, first.

EDIT: Like returning Strings from functions....  ;)

Shane 'ProgZmax' Stevens

It's certainly a hassle to close and reopen it when you are testing and confirming bugs and (in my case) creating a few miniature game projects.  It's pretty much just something every application I'm aware of allows, so it definitely seems strange to me that AGS would be an exception :).

GarageGothic

Quote from: skuttleman on Sat 07/06/2008 22:52:35EDIT: Like returning Strings from functions....  ;)

Just declare the function as a "String" rather than as "function" (which always returns int values), and this is already possible. Like so:

Code: ags
String MyFunction(String text1, String text2) {
  String text = String.Format("%s %s", text1, text2);
  return text;
  }

skuttleman

Quote from: GarageGothic on Sun 08/06/2008 04:13:19
Just declare the function as a "String" rather than as "function" (which always returns int values), and this is already possible

SUITE!

monkey0506

Off-topic: I just wanted to clarify the "returning Strings from functions" issue. The keyword function is actually internally defined as:

Code: ags
#define function int


So:

Code: ags
function my_func() {
  int i = 7;
  return i;
}


And:

Code: ags
int my_func() {
  int i = 7;
  return i;
}


Are synonymous. You can do the same to return any of the base data types, built-in or user-defined enumerated types, or a pointer to any of the built-in data structures (Character, GUI, etc.). You cannot use it to return a user-defined structure or pointer to a user-defined structure. So the following will work:

Code: ags
DynamicSprite* MyDSCreate(int width, int height) {
  // note this function is pointless, redundant, and for example purposes only
  // DO NOT USE UNDER PENALTY OF DEATH!
  if ((width <= 0) || (height <= 0)) return null;
  return DynamicSprite.Create(width, height);
}


However, this will NOT:

Code: ags
struct MyType {
  int myvar;
};

MyType FuncReturnMyType() {
  // THIS FUNCTION WILL NOT WORK OR EVEN COMPILE
  // NOR CAN YOU MAKE IT A POINTER SINCE POINTERS-TO-CUSTOM TYPES ARE NOT ALLOWED
  MyType m;
  m.myvar = 879;
  return m;
}

SMF spam blocked by CleanTalk