For New Users Starting With 3.x vs 2.7

Started by CaptainBoosh, Fri 12/12/2008 04:34:16

Previous topic - Next topic

CaptainBoosh

I haven't been able to read the entire 20 page long thread about Lucasarts templates, but I've scanned a few posts and the conclusion I'm getting is (most posts are from years prior, so maybe things have changed but not updated), that most templates work with 2.7 of AGS and not 3.x?

For a beginner wanting to make a game with minimal scripting experience (want to use an editor and tools with a GUI as much as possible), is there any reason to use the newer version of AGS vs. using an older version that works with Lucasarts templates?  I figure having a template I'm familiar with will make things easier and quicker to get up and running.  Easier to work with?  Less complicated?  Better features?

Better yet, is it really true that you can start a game in the old version and use an older template but then save it over to the newer version of AGS and it will work fine?  I've seen it mentioned, but not followed up on in detail.  How much work should you do in the previous version before moving over?

I just want to get started as soon as possible without having to dive deep into scripting and want to focus on the creative side with art and dialouge (I am a sound designer and want a heavily narrated and voiced game).  I've gotten bogged down with having to learn complicated tools to create games before and it takes away from actually making a really good game (Half Life 2 mods).

Thanks for all help in advance.  You guys seem like a very dedicated and awesome bunch.

Khris

There have been tons of improvements since 2.7, especially to the editor. Learning to handle 2.7 now would be a big mistake imo.
Here's a revamped template for 3.0.2:
http://www.2dadventure.com/ags/MI_3.0.2_v0.1.zip

It's a WIP but all the basic functionality is there.

Example of a basic interaction:
Code: ags
// room script file

function sign_AnyClick() {
  if (MovePlayer(270, 46)) {
    Guybrush.FaceDirection(eDir_Up);              
    if (UsedAction(eGA_LookAt)) { 
      player.Say("No treasure hunting!");
    }
    
    else Unhandled();
  }
}


There's a whole bunch of useful functions included in the template since it's based on a slightly stripped down version of the Maniac Mansion Deluxe source.
You'll need a fair understanding of current AGS scripting though.

abstauber

#2
I can second that. Khris' script is really nice, I'm using it as a base too.

You can also get a "maniac mansion mania" starterpack, these have been ported to 3.x too.

CaptainBoosh

#3
I set up a quick test using the MI 3.0.2 template and I saw how it works fine.  BUT.  If I change the resolution to something than other 320x200, I got an error trying to run it.

My next question is, do these templates have to be run in the native resolution they come in, or is there a way to go about changing to a higher reso?

And when something works in 3.0.2, it works perfectly in 3.1?  It seem everything above a 2.7 should work fine in 3.1?  Correct?

And preferably not in German, but English.  Granted it was mostly English, but when I tried to Pull the sign or something other than read, it spit out German. 

I did like that look and it definitely helped as a starter.  Thanks so far.

Trent R

I opened up the .agt in Notepad and very quickly browsed through it. I may have missed some, but I think what your're talking about is under #sectionstart unhandled_event.

And what is the error that pops up when you try to change the res?

~Trent
To give back to the AGS community, I can get you free, full versions of commercial software. Recently, Paint Shop Pro X, and eXPert PDF Pro 6. Please PM me for details.


Current Project: The Wanderer
On Hold: Hero of the Rune

Khris

The original script was made with 2.5 I think, and at some point I went through all the script and changed it to the current oo standard.
Technically, anything created for 2.7 should work with 3.x, although some tweaks may be necessary.
(And you'll have to load it into 2.72 then save it first, since 3.x won't accept older versions.)

Changing the res isn't a good idea; the game was specifically tailored to emulate the oldschool LEC style, including the res of 320x200. But yes, what error did you get?

There shouldn't be that much German in the template, just scan through the global script and translate the lines.
You might have to change a few GUI texts, too.

CaptainBoosh

Yeah, I like the old school look at that resolution, but I run at 1600x1050, so it is very small.  I haven't really done too much yet, just trying to iron out kinks before I really get in.  I changed to 1024x768 and made a quick new background and then it wouldn't run.  I also changed the background to a different image in the 320x200 reso and it worked, so it definitely had something to do with the size change.

Error running function 'game_start':
Error: null pointer referenced

And it highlighted:
  while (p<text.Length && text.Chars[p]==' ') {


And doing a second try at changing resolutions, I switched it to 640x400 without changing any backgrounds and leaving everything default, and this error is at:

SetSpeechFont: invalid font number
Located at:
Game.SpeechFont=getInteger(); // Speech

I guess an easy way to get around this is to use the scaling function and just do a 2 or 3X enlargement, right? 

Basically I really like the GUI of Talk, Push, Pull etc. that the old Lucasarts games used and want that as the look and function of the game without having to design one myself because of the coding involved.  As long as that can scale to a larger resolution, it's perfect.

But I'm not sure if the modules, plugins, fonts etc from the resource page work with pre-made templates or only if you're starting from scratch.  Like the flashlight module.  Does that work with a pre-made template?  And it seems most of those were written in older versions, which is why I asked if I'd be better off using an older version if I want those effects and such.

It's just there is so much information out there and since a lot of this seems to date from 2003-2006 that now in 2008, a newcomer is overwhelmed by all the options and whether different versions of things work or haven't been updated etc.

You guys are already being really helpful and pointing me in the right direction.


RickJ

Quote
I opened up the .agt in Notepad and very quickly browsed through it. I may have missed some, but I think what your're talking about is under #sectionstart unhandled_event.
Khris, I believe the #sectionstart and #sectionend directives are no longer used  or necessary.  You may want to investigate the possibility of removing them from your template.

Quote
error running function 'game_start':
Error: null pointer referenced

And it highlighted:
  while (p<text.Length && text.Chars[p]==' ') {
Perhaps the only thing that the size change did was to cause the global script to be recompiled.   What happens if you don't change the resolution and do a "Build All" command?

This error can be fixed by either initializing the text variable (i.e. text = "") or changing the while statement to something like this:
Code: ags

     while ((text!=null)&&(p<text.Length)&&(text.Chars[p]==' ')) {


Quote
And doing a second try at changing resolutions, I switched it to 640x400 without changing any backgrounds and leaving everything default, and this error is at:

SetSpeechFont: invalid font number
Located at:
Game.SpeechFont=getInteger(); // Speech
I haven't looked at the template at all but iot would seem that the custom function getInteger() is returning a number that is not a valid font ID.   Again, I think this is an error in the template and the reason it comes up when you change resolutions is that perhaps everything is being flagged for recompile.   Just comment this line out (i.e. "// Game.SpeechFont=getInteger(); // Speech") and see what happens. 

SMF spam blocked by CleanTalk