AGS 2.8 alpha 8 preview

Started by Pumaman, Mon 15/01/2007 23:24:45

Previous topic - Next topic

subspark

#140
My game compiles, but I get an error when I run it.

Code: ags
// Main global script file


//SOME TEMPLATE DEFINITIONS:

//-----------------------------------------------------------------------------------------------
#define MAX_MODES 			11//	put here how many cursor modes you have (= last
//						number in mode '#defines' in the Script Header+1).
//						Putting a lower number will cause strange errors.
//-----------------------------------------------------------------------------------------------
#define MAX_SAVEGAMES 			99//    Max number of savegames.
//-----------------------------------------------------------------------------------------------
#define EXTENSION_IDENTIFIER 		">"//	Character(s) extensions start with. 
#define VARIABLE_DEF_ACTION_EXTENSION	'v'//	Extension for variable default action things.
#define NO_DEF_ACTION_EXTENSION		'n'//	Extension for no default action things.
#define EXITS_EXTENSION			'e'//	Extension for exit type things.
//-----------------------------------------------------------------------------------------------
#define ALWAYS_GO_TO_HOTSPOTS 		1//	Read the template documentation for this.
//-----------------------------------------------------------------------------------------------
#define DEFAULT_FONT_HEIGHT 		8//	Used in SaveGame GUI script
//-----------------------------------------------------------------------------------------------
#define GUI_MAPS_WIDTH 			100//	Used for setting up the GUI label in map rooms .
#define GUI_MAPS_LABEL_FONT 		1//
//-----------------------------------------------------------------------------------------------
#define INV_UP_ARROW_ON_SPRITE 		39//	Used for setting the correct arrows so that the 
#define INV_UP_ARROW_OFF_SPRITE 	45//	player can see if the inventory is scrollable.
#define INV_DOWN_ARROW_ON_SPRITE 	40//
#define INV_DOWN_ARROW_OFF_SPRITE 	46//
//-----------------------------------------------------------------------------------------------
#define ACTION_LABEL_COLOR_NORMAL	 3//	Used in highlighting the action bar.
#define ACTION_LABEL_COLOR_HIGHLIGHTED 	11//
//-----------------------------------------------------------------------------------------------
#define BLANK_CURSOR_SPRITE_NUMBER 	1//	Used for changing the cursor back to 'wait' 
//							cursor after 'semi-blocking' functions finish. 
//-----------------------------------------------------------------------------------------------
#define FIRST_INV_SLOT_COORDS 	    161,159//	Any point inside the top left inventory slot.
//									coordinates used for inventory box.
//-----------------------------------------------------------------------------------------------
#define CONFIRM_GUIS_CHARACTER_YES	'Y'//	Keys for 'Yes' and 'No' in 'exit game' and 
#define CONFIRM_GUIS_CHARACTER_NO	'N'//	'restart game' GUI requests. (Always uppercase)
//-----------------------------------------------------------------------------------------------
#define SPECIAL_INV_MODE		1//	1 = LOOK mode (as defined in script header).
//							It is the mode that will trigger a left click
//							in the inventory if mode is WALK or PICKUP.
//-----------------------------------------------------------------------------------------------


The Guis from 0 - 10

gAction
gMaingui
gDialogsgui
gOptions
gMaps
gPaused
gRestore
gSave
gSavetextbox
gConfirmexit
gRestart

The error message is this:
Quote
Error: FindGUIID: No matching GUI found: GUI may have been deleted

I thought #defines were reimplemented. Im not sure what is happening.

monkey0506

#141
Does it by any chance tell you the line number that is crashing the game or which GUI ID it's looking for but can't find?

-----------------

BTW Chris...it's wonderful that we can implement our own extender methods...but is there any way it would be possible to implement extender properties? Basically it would be great if we could get rid of having to use get/set methods and local variables if we want to store our own data for the built-in types. ;D Thanks either way.

subspark

No line number I'm sorry. Thats what was so confusing about it.

In order to hack around the problem, I basically changed all the names of the GUI's in the global scripts to numbers, compiled again and it ran without a hitch.

For a working LucasArts template for 2.8 a7 visit my post here:
http://www.adventuregamestudio.co.uk/yabb/index.php?topic=31258.0

Cheers,
Paul W.

monkey0506

You could have done something like this (although annoying to type out and it shouldn't have been necessary):

Code: ags
#ifndef ACTION
#define ACTION 0
#endif
#ifndef MAINGUI
#define MAINGUI 1
#endif
// etc.


No idea what the problem might have been.

However...I never understood why you posted that code snippet as it has nothing to do with the GUI name #define-s...?

Pumaman

QuoteFor testing purposes I have a GUI (gEgogui) that runs through EGO's animation cycles. So that explains what gEgogui is. And like I said, I stopped typing after the opening parenthesis because I was working on another script and forgot to return.

There was no sort of error message generated by AGS itself (as I would suspect there (would/should) (be/have been)), Windows just reported that it had to terminate the program.

I just tried this but it was fine. Are you able to reproduce the crash?

QuoteThe error message is this:

Error: FindGUIID: No matching GUI found: GUI may have been deleted

Ah, I think there might be a problem with the implementation of the #defines. I'll take a look at it.

QuoteBTW Chris...it's wonderful that we can implement our own extender methods...but is there any way it would be possible to implement extender properties?

Custom properties are a separate request, it's been requested a few times but won't be happening for 2.8 I'm afraid.


Stee

Just my opinion, but with the removal of 320x200 support in Vista, would it be possible to get the compiled exe, to check the OS, and if its vista run the game in 640x480?
<Babar> do me, do me, do me! :D
<ProgZMax> I got an idea - I reached in my pocket and pulled out my Galen. <timofonic2> Maybe I'm a bit gay, enough for do multitask and being romantical

Gilbert

The games should work by choosing 640x400 and turning on letterbox mode in setup, I doubt if it's worth implementing to check for a specific version of OS to force switch the resolution.

SupSuper

Quote from: Stee on Wed 16/05/2007 20:29:57
Just my opinion, but with the removal of 320x200 support in Vista, would it be possible to get the compiled exe, to check the OS, and if its vista run the game in 640x480?
Actually 320x200 / 320x240 full-screen still works on Vista. It's just a mix of whether the application and video drivers execute it properly on Vista.

Thus it's still best to just use the Setup option to change it yourself since everyone might experience it differnetly.
Programmer looking for work

Pumaman

Quote from: Stee on Wed 16/05/2007 20:29:57
Just my opinion, but with the removal of 320x200 support in Vista, would it be possible to get the compiled exe, to check the OS, and if its vista run the game in 640x480?

Do you have a source for that claim? As far as I'm aware, as SupSuper says Vista still supports 320x200 as long as your graphics card drivers do.

subspark

Yeah I would have though so. It's a common development resolution for Nintendo DS ipod other devices. I don't see microsoft discarding that screen format for quite some time.

scotch

You're right that Vista supports 320x200 for games, it's the classic PC resolution and every PC graphics card supports it too (although it's not accurate to say it's the resolution of the DS, iPod, or most handhelds, but I don't see why that'd make a difference to MS wanting to support it). Vista graphics card drivers are pretty new, so if it doesn't work right now, it may soon. However, I think the main problem people have is with their monitors not supporting particular combinations of resolution, depth and refresh rate. I know I have that problem sometimes. I don't think there's a good way to detect it and up the resolution automatically, unfortunately.

SupSuper

I've decided to look a bit into this and there seems to be something up with how AGS switches to such low resolutions in Vista. If you run a full-screen AGS game in 320x200/320x240, the screen will blink a couple of times (possibly trying to switch resolution) until eventually it gives up with something like this:
---------------------------
Adventure Game Studio
---------------------------
There was a problem initializing graphics mode 320 x 200 (8-bit).
(Problem: 'Can not set video mode')
Try to correct the problem, or seek help from the AGS homepage.

Possible causes:
* your graphics card drivers do not support this resolution. Run the game setup program and try the other resolution.
* the graphics filter you have selected does not work. Try another filter.
---------------------------
OK  
---------------------------
This could still be just a driver issue, but since other applications like DOSBox or The Games Factory switch to 320x200 fine, it might be worth looking into. Though you can just setup to 640x400/640x480 or to run in a window and that'll work.

I'm gonna do some more Vista testing to look for any other issues.
Programmer looking for work

subspark

Quotealthough it's not accurate to say it's the resolution of the DS, iPod, or most handhelds
Really. I thought most handhelds besides PSP use 320x200. From memory this is pretty standard cross platform.

scotch

About SupSuper's findings: that does seem odd, it's definitely trying to set an appropriate mode... should be fine if it works in DosBox etc. Does AGS do anything unusual when setting the display mode, CJ?
Still, we can hope that these issues will disappear with driver and OS updates. Luckily most people are waiting for SP1 ;)

subspark:
There's not much of a standard on gaming handhelds and mp3 players, but perhaps you're thinking of the squarer 320x240, which is a common resolution on phones/PDAs (it's called QVGA), and the GP2X uses it for example.

320x200 is pretty unusual because it's not a square pixel mode on 4:3 displays. I suppose exists because it fits in a neat 64kB of memory. I'd usually recommend against using it for AGS games (as well as 640x400), because people almost never draw the graphics properly for it, but it's not a huge deal I suppose.

subspark

No your right actually. I was thinking 320x240 but was typing 320x200.

larino87

Wow, I haven't really made a game yet or anything. I just messed around with AGS until I get an idea for one but I gotta say--looks wise-- this version looks a lot more easier to work with than 2.7 and prettier too... but that's just me
Now I'm your queen... bow down to my queenly queenliness
                  --Libby Folfax

Pumaman

Quote from: scotch on Sat 19/05/2007 12:33:00
About SupSuper's findings: that does seem odd, it's definitely trying to set an appropriate mode... should be fine if it works in DosBox etc. Does AGS do anything unusual when setting the display mode, CJ?

It does try a few alternate combinations. For example, if your game is 320x200 at 16-bit, then AGS should automatically try the following resolutions before giving up:

320x200x16
320x200x15
320x240x16
320x240x15

However maybe it should try 640x480 as well, since not supporting 320x200 is getting more common these days?

QuoteWow, I haven't really made a game yet or anything. I just messed around with AGS until I get an idea for one but I gotta say--looks wise-- this version looks a lot more easier to work with than 2.7 and prettier too... but that's just me

Yeah, the 2.7 editor does look and feel quite "retro"; and this 2.8 version will provide a much easier base on which to expand.



Anyway, 2.7 Alpha 8 is now up. This includes these changes:

* Added Test Game command
* Added VOX file compilation, including PAM file compilation
* Improved autocomplete to show local variables and function parameters
* Added ability to import script modules
* Added a couple of advanced options to the Auto Number Speech feature
* Added preferences dialog
* Importing game from 2.72 now creates script code for Check & Set Graphical Variable interactions
* Fixed GUI #defines not being recognised by the game engine

I think that'll be the last alpha release, it's very nearly ready for Beta.

It's still lacking some import/export features, but that's what I want to ask you guys. Rather than me just re-implementing the same import and export stuff as 2.7 had, what do you want it to be able to import/export? I take it GUIs and Characters are useful to able to do?

GarageGothic

#157
I get this error message when importing my 2.72 Final 2 game with the new Alpha. It imports fine in Alpha 6. Didn't try Alpha 7, because I never got around to downloading it and can't find a link now.

Quote---------------------------
Adventure Game Studio
---------------------------
An error ocurred whilst trying to load your game. The error was: Object reference not set to an instance of an object.
If you cannot resolve the error, please post on the AGS Technical Forum for assistance.
Error details: System.NullReferenceException: Object reference not set to an instance of an object.

   at AGS.Editor.Components.MusicAndSpeechComponent.ReadFileTimes(XmlNode node, String elementName, Dictionary`2 fileStatuses)

   at AGS.Editor.Components.MusicAndSpeechComponent.FromXml(XmlNode node)

   at AGS.Editor.AGSEditor.ImportedOldGame()

   at AGS.Editor.OldGameImporter.ImportGameFromAGS272(String gameToLoad, Boolean useWizard)

   at AGS.Editor.Tasks.LoadGameFromDisk(String gameToLoad, Boolean interactive)

   at AGS.Editor.InteractiveTasks.LoadGameFromDisk(String gameToLoad)
---------------------------
OK   
---------------------------

Pumaman

Ooops my bad, didn't test this release with a 2.72 import. I've uploaded a fixed version, thanks for letting me know.

GarageGothic

#159
Thanks CJ. This time it imported fine. Haven't found any errors so far.

I just noticed that the 2.8 editor still displays corrupted transparent areas for alpha channel sprites, just like the old one. Is there any chance of getting rid of this annoyance?

Edit: Regarding import/export, as previously discussed it would be very convenient to have a text dump/re-import function using a format more similar to the translation source (no code fragments whatsoever, pure String/strings, GUI texts and dialogs).

SMF spam blocked by CleanTalk