Let's build a new AGS demo game!

Started by cat, Sun 14/05/2023 19:41:43

Previous topic - Next topic

RootBound

I'd also like to suggest a GUI since it's one of the only big decisions left before we could cobble together a prototype:

1) A small menu button in one corner of the screen. Click it to open a menu bar that contains save, load, and exit options, and an inventory window.
2) two-click interface with no need for scrolling through modes. Left click to walk, interact, or talk to (determind automatically depending on whatis under the cursor), or use inventory (if active). Right click to put away inventory or examine.
3) code this in a fairly simple way that does not require a separate two-click handler script, so as to keep the code accessible to newcomers.

Any thoughts, suggestions, changes?
They/them. Here are some of my games:

lapsking

I mean really, you haven't came to conclusion with these things yet but you have found your eternal toad voice? I think you guys were much faster and successful without me. I'm leaving, have fun.
the Thing is in the process, and mostly gone when it's done.

RootBound

@lapsking, sorry, I forgot I had already found that sound file. This thread wad inactive for a couple months and I should have gone back and re-read it. Apologies.
They/them. Here are some of my games:

OneDollar

Quote from: RootBound on Thu 28/03/2024 16:19:25I'd also like to suggest a GUI since it's one of the only big decisions left before we could cobble together a prototype:

1) A small menu button in one corner of the screen. Click it to open a menu bar that contains save, load, and exit options, and an inventory window.
2) two-click interface with no need for scrolling through modes. Left click to walk, interact, or talk to (determind automatically depending on whatis under the cursor), or use inventory (if active). Right click to put away inventory or examine.
3) code this in a fairly simple way that does not require a separate two-click handler script, so as to keep the code accessible to newcomers.

Any thoughts, suggestions, changes?

IMO that sounds good. I know there are concerns about two button interfaces, but I don't think the demo should be embedded in a website or played on mobile. It's not a demo of "Here's what the engine can do, download it now", it's a "Here's how to make all the basic features of an adventure game work". Users should be downloading it alongside the editor (ideally installing as an option alongside the editor), opening and running from inside the editor, while also going through the scripts to figure out how that thing they just saw works. In that context it's being played on a computer and I think it's fairly safe to assume two buttons are available?

As a catch all you can add
4) Use an inventory item on itself to put it away.
5) Don't build puzzles that require examining items.

There were also conversations about using one of the existing interface templates as a starting point. My argument against that is a) they already have their own demos and documentation, b) the simplest template is probably BASS and that has some legacy bagage with its naming (TwoClickHandler, Lightweight BASS Stub) and extras we might not want (inventory pop-up), and c) it might be easier to comment code written for specifically for this project?

Feel free to disagree, I know I'm wading in here to something you've been kicking around for months.

Danvzare

Quote from: RootBound on Thu 28/03/2024 14:42:37@Danvzare the gem looks great. Is it using the color palette from earlier in the thread? If not, that's the only change I would suggest.  :)
Yep, it's using the palette.

Quote from: lapsking on Thu 28/03/2024 14:49:30I think the gem looks better with the contrast. Maybe even a bit more contrast.
Ok, will do.


More contrast, and still using the same apollo palette.  :-D

RootBound

I've been working on the "inside the tree house" background more, and it's almost done.

I still need to finish the sketched out areas (alcoves on second floor and chandelier).

If anyone has any requests for changes, please let me know. :)



They/them. Here are some of my games:

RootBound

#146
ALL RIGHT PEOPLE, HERE WE GO...

Sorry, indoor voice.

I built a working prototype! I've tried my very best to put everything people wanted into this build, so that is not *my* demo game but *our* demo game, as discussed in this thread. So without further ado...

AGS QUEST: AN AGS DEMO GAME
(download link below)



Please test it, read through the comments in the code, see how it feels with regard to everything that's been discussed in this thread. Is this demo a good represenatation of the most basic features AGS has to offer? Is it too complicated? What's working well here? What's not? The more feedback the better!

You'll notice the GUI graphics are all default--this is because I really couldn't tell if there was any agreement about GUIs, so if the GUI needs to change, it certainly can be!

If you have any suggestions for refining the code, feel free to copy and paste them here. That way I can merge everything without ending up with a bunch of different versions of the game.

DOWNLOAD GAME PROJECT FOLDER HERE (UPDATED WITH BUG FIXES FROM BELOW).
They/them. Here are some of my games:

Rik_Vargard

That's looking beautiful!! (nod)  Love that frog  (laugh)

When I'm on the balcony, I can interact with the entrance door, open or close it.
Also from the balcony, if the door is open and I click to enter, I will walk down trough the tree and then enter.
If I use the key to leave the house, once outside I can't go back inside or select the key in the inventory and the cursor is stuck on Walk mode.








RootBound

#148
Quote from: Rik_Vargard on Sun 07/04/2024 16:25:22When I'm on the balcony, I can interact with the entrance door, open or close it.
Also from the balcony, if the door is open and I click to enter, I will walk down trough the tree and then enter.
If I use the key to leave the house, once outside I can't go back inside or select the key in the inventory and the cursor is stuck on Walk mode.

@Rik_Vargard I fixed both of these, and thanks to you pointing them out I also found a fixed a third bug (clicking on the forest exit from the balcony still played the ending). Thank you very much for testing! It's much appreciated.

HERE IS THE UPDATED VERSION: https://www.mediafire.com/file/3lygtdk249how7j/AGSQuestUncompiledProject.zip/file

The original link above has also been updated to reflect the bug-fixed version.
They/them. Here are some of my games:

RootBound

In addition, for anyone who wants to suggest changes to the design, code, or code comments, here is a handy copy of the SCRIPT FROM EACH ROOM, along with a screenshot:

ROOM 1: SPLASH SCREEN
Spoiler

Code: ags
// room script file

//If you look at the Blue Mage character, you will see that the character's starting room is room 1 (this room).
//If you open the room editor for this room, you'll see that the room property "Show player character" is set to FALSE.
//This can be useful for menu rooms, close-ups of small room areas, or anywhere else the player character might be hidden.

function room_Load() //This function is called when the room first loads, before it fades in.
//To create this function, go to room actions (lightning bolt icon) and find "Enters room before fade-in."
{
  gSubtitle.Centre(); //Positions the GUI gSubtitle in the middle of the screen.
}

function room_AfterFadeIn() //This function is called when the room is fully faded in. 
{
  WaitMouseKey(GetGameSpeed()*2); //Pause script for two seconds, unless a mouse button or key is pressed.
  player.ChangeRoom(2); //switch player to room 2.
}
[close]
ROOM 2: MAIN MENU
Spoiler

Code: ags
// room script file

function room_Load()
{
  gSubtitle.Visible = false; //Hide the text GUI that was visible in the previous room.
  gTitleMenu.Visible = true; //Show the title GUI.
  Mouse.Mode = eModePointer; // Set mouse mode as pointer
}
[close]
ROOM 3: FOREST
Spoiler

Code: ags
// room script file
bool IsDoorLocked = true;  // define variable for door state

function room_Load() // called before the room fades in
{
  gDescriptions.Visible = true; // hover text GUI at bottom of screen
  oGem.Scaling = 25; //Adjust size of gem object
  
  if(player.x == 90 && player.y == 130){ // if player is entering from balcony
    oDoor2.Graphic = 10; // make sure balcony door is open
  }
}

function room_FirstLoad() // called only once, after the first time the room fades in
{
  StartCutscene(eSkipAnyKey); //start cutscene, allowing keyboard to skip
  cBlueMage.Walk(360, 176, eBlock, eWalkableAreas);
  cBlueMage.Say("That looks like the Red Mage's treehouse.");
  cBlueMage.Say("He said he'd leave a key outside for me somewhere.");
  cBlueMage.Say("I guess I'd better look for it.");
  EndCutscene(); // skipping cutscene will skip to here
  Display("Click on different parts of the room to walk, examine, and interact with your environemnt.");
  gGameMenuOpener.Visible = true; 
  // In-Game menu opener GUI. The properties of this GUI have it set to appear in the bottom right corner of the screen.
}

function room_AfterFadeIn() //called immediately after the room fades in
{
  Mouse.Mode = eModeWalkto;
}


function room_RepExec() // Lines here get run every game loop, unless the game is in a blocking state
{
  //No repetitive actions were needed in this room.
}

function hBench_AnyClick() // called when player clicks on bench (this function is created by hBench hotspot properties in room editor)
{
  if(player.y < 270){ // if player is far away from the hotspot
    player.Say("I need to get closer.");
  }
  else{ // if player is closer
    player.Walk(88, 286, eBlock, eWalkableAreas);
    player.FaceDirection(eDirectionLeft);
    if(player.HasInventory(iKey)){  // called if player already has key
      player.Say("There's nothing under it now.");
    }
    else{ // called if player doesn't have key yet
      player.Say("A stone garden bench.");
      player.Say("It looks like there's something under it.");
      player.Say("Aha! This is the key the Red Mage left for me.");
      gInGameMenu.Visible = true;         // Show the inventory GUI so that
      WaitMouseKey(GetGameSpeed());       // the player sees the item when it
      player.AddInventory(iKey);          // becomes added. Add inventory item. Play powerup sound.
      aPowerup_by_maodin204.Play();       // Then hide the GUI afterward.
      WaitMouseKey(GetGameSpeed());       // 
      gInGameMenu.Visible = false;        //
      player.Say("Now I should be able to get into the treehouse.");
    }
  }
}

//Next few functions are called when player clicks on the different hotspots in the room.
//Created from each hotspot's properties pane.
function hPond_AnyClick()
{
  player.Say("A pretty garden pond.");
  player.Say("I don't thonk the Red Mage would make me dig through water for the key, though.");
}

function hFlowers_AnyClick()
{
  player.Say("Flowers that bloom only at night.");
  player.Say("They make the grounds feel magical without needing magic.");
}

function hForest_AnyClick()
{
  if(player.y > 135){ //if player is not on balcony
    if(player.HasInventory(iGem)){  // called only if the player has the gem inventory item
      player.Say("I suppose my tasks in this forest are done.");
      player.Walk(416, 144, eBlock, eWalkableAreas);
      gCredits.Visible = true; // open credits GUI
      Mouse.SetBounds(gCredits.X, gCredits.Y, gCredits.X+gCredits.Width, gCredits.Y+gCredits.Height); // lock cursor over GUI
    }
    else{ // called if player does not have gem
      player.Say("The path leads back where I cam from.");
      player.Say("I'm not ready to leave yet.");
    }
  }
  else{ // if player is on balcony
    player.Say("I need to get down to the ground if I want to leave.");
  }
}

function hBalcony_AnyClick()
{
  if(player.y > 135){ // if player is at ground level
    player.Say("I expect that balcony has a lovely view.");
    player.Say("I can't get there from here.");
  }
  else{ // if player is at balcony level
    player.Say("It is indeed a lovely view from up here.");
  }
}

function hShrine_AnyClick()
{
  if(player.x < 250 || player.y < 260){ // if player is far away from the hotspot
    player.Say("I need to get closer.");
  }
  else{ // called every time the player clicks while close enough
    player.Walk(565, 260, eBlock, eWalkableAreas); 
    player.FaceDirection(eDirectionUp);
    
    // called only the first time the player clicks while close enough
    if(Game.DoOnceOnly("First shrine click")){ 
      player.Say("It's a shrine to the mystical source of the magic we mages use.");
      player.Say("We respect our magic and don't use it lightly.");
      player.Say("This is a place to honor that.");
      WaitMouseKey(GetGameSpeed());
      player.FaceDirection(eDirectionDown);
    }
    
    //back to every time the player clicks while close enough
    player.Say("The shrine adds a meditative ambiance to the garden.");
    player.Say("There doesn't appear to be a key here.");
  }
}

function hToadstools_AnyClick()
{
  if(player.y < 260){ // if player is far away
    player.Say("I need to get closer.");
  }
  else{ // if player is closer
    player.Walk(100, 340, eBlock, eWalkableAreas);
    player.Say("Very large toadstools. Probably poisonous.");
    player.Say("A great place to hide a key, but there isn't one under any of them.");
  }
}

function hWindow_AnyClick()
{
  if(player.y < 276){ // if player is far away
    player.Say("I need to get closer.");
  }
  else{ // if player is closer
    player.Walk(112, 280, eBlock, eWalkableAreas);
    player.FaceDirection(eDirectionUp);
    player.Say("The window is a little high up.");
    player.Say("And anyway, it would be rude to spy.");
    player.Say("After all, the Red Mage said he'd leave a key for me.");
  }
}

function hTreehouse_AnyClick()
{
  player.Say("It's a majestic home. I look forward to experiencing the inside.");
}

//click on frog object
function oFrog_AnyClick()
{
  if(player.y < 260 || player.x > 250){
    player.Say("I need to get closer.");
  }
  else{
    aFrog_by_egomassive.Play(); // play frog sound effect
    oFrog.SetView(2); // allows frog object to access the desired animation
    oFrog.Animate(0, 5, eOnce, eBlock); // animate frog
  }
}

//click on front door object
function oDoor1_AnyClick()
{
  if(player.y < 135){ // if player is on balcony
    player.Say("I can't reach it.");
  }
  else{ //if player is on ground
    player.Walk(190, 254, eBlock, eWalkableAreas);
    if(oDoor1.Graphic == 8){ // if door is already opened
      if(player.ActiveInventory != null){ //and player is using inventoty
        player.Say("The door is already open. I don't need to use anything on it.");
      }
      else{ // if not using inventoy
        aDoor_Close_by_kyles.Play(); // play door close sound
        oDoor1.Graphic = 7; // change door sprite to closed door
        return;
      }
    }
    if(oDoor1.Graphic == 7){ //if door closed
      if(IsDoorLocked == true){ // if door closed and locked
        if(player.ActiveInventory == iKey){ // if using key
          aUnlock_by_kyles.Play(); // play unlock sound
          player.Say("The key works!");
          aDoorOpen_by_splicesound.Play(); // play door open sound
          oDoor1.Graphic = 8; // change door sprite to open door
          
          IsDoorLocked = false; //set state which affects future interactions
        }
        else{ // if door closed and locked, player is not using key
          aDoor_Close_by_kyles.Play(); //play rattling sound
          player.Say("It's locked.");
        }
      }
      else{ // if door closed but unlocked
        if(player.ActiveInventory != null){ //if using inventory
          player.Say("The door is already unlocked.");
        }
        else{ //if not using inventory
          aDoorOpen_by_splicesound.Play(); // play door opening sound
          oDoor1.Graphic = 8; // change sprite to open door
        }
      }
    }
  }
}

//click on gem object
function oGem_AnyClick()
{
  if(player.y > 135){ // if player is at ground level
    player.Say("It's a gem of some kind. I can't quite see it.");
  }
  else{ // if player is on balcony
    player.Say("Here's the gem the Red Mage mentioned.");
    gInGameMenu.Visible = true;         // Show the inventory GUI so that
    WaitMouseKey(GetGameSpeed());       // the player sees the item when it
    player.AddInventory(iGem);          // becomes added. Add inventory item. Play powerup sound. 
    aPowerup_by_maodin204.Play();       // Then hide the GUI afterward.
    WaitMouseKey(GetGameSpeed());       // 
    gInGameMenu.Visible = false;        //
    player.Say("This means I've completed the required tasks of the demo game.");
    player.Say("So whenever I want to, I can leave by following the path out of the forest.");
    oGem.Visible = false; //hide gem object
    Display("To exit the demo, follow the path out of the forest, or click the EXIT button in the menu.");
    Display("To explore how the game was made, talk to the Red Mage or use the AGS editor to explore the various elements of the game.");
  }
    
}

//click on entrance hitspot revealed by door object changing to open sprite
function hEntrance_AnyClick()
{
  if(player.y > 140){ //if player is on ground floor
    player.Walk(180, 254, eBlock, eWalkableAreas); // walk to door using walkable areas
    player.Walk(160, 254, eBlock, eAnywhere); // walk through doorway (off walkable area)
    player.ChangeRoom(4, 438, 342, eDirectionLeft); // change room to specific coordinates
  }
  else{ // if player is on balcony
    player.Say("I can't get there from here.");
  }
}

//click on balcony door
function oDoor2_AnyClick()
{
  if(player.y < 135){ // if player is on balcony
    if(player.ActiveInventory == null){
      if(oDoor2.Graphic == 9){
        aDoorOpen_by_splicesound.Play();
        oDoor2.Graphic = 10;
        return;
      }
      else{
        aDoor_Close_by_kyles.Play();
        oDoor2.Graphic = 9;
      }
    }
    else{
      player.Say("The door isn't locked.");
    }
  }
  else{ //if player is at ground level
    player.Say("I can't get there from here.");
  }
}

//click on doorway hotspot revealed by door object changing to open sprite
function hBackDoorway_AnyClick()
{
  if(player.y < 135){ //if player is on balcony
    player.Walk(93, 128, eBlock, eAnywhere);
    player.Transparency = 100; // player character disappears into doorway
    Wait(1); //make sure disappearance happens before room fade-out
    player.ChangeRoom(4, 200, 146, eDirectionRight); // go into the interior room at specific coordinates
  }
  else{ // if player is at ground level
    player.Say("I can't get there from here.");
  }
}
[close]
ROOM 4: TREEHOUSE INTERIOR
Spoiler

Code: ags
// room script file

//Called before room fades in
function room_Load()
{
  oChandelier.SetView(4); // give chandelier object access to animations
  oChandelier.Animate(0, 4, eRepeat, eNoBlock); // animate chandelier, looping
  
  if(player.y == 146){ // if entering from balcony
    player.Transparency = 0; // undo disappearing that happened in previous room
  }
}

//Next few functions: click on the various hotspots in the room

function hFrontExit_AnyClick()
{
  player.Walk(433, 344, eBlock, eWalkableAreas);
  player.ChangeRoom(3, 180, 254, eDirectionRight); //go outside, to specific coordinates
}

function hWashBasin_AnyClick()
{
  if(cBlueMage.HasInventory(iGem2)){ // if player already has the hidden gem
    player.Walk(321, 133, eNoBlock, eWalkableAreas);
    player.Say("The sink is empty.");
  }
  else{ //if player doesn't have hidden gem yet
    player.Walk(321, 133, eBlock, eWalkableAreas);
    player.FaceLocation(321, 100);
    Display("You found a hidden gem in the sink!");
    gInGameMenu.Visible = true;         // Show the inventory GUI so that
    WaitMouseKey(GetGameSpeed());       // the player sees the item when it
    player.AddInventory(iGem2);          // becomes added. Add inventory item. Play powerup sound.
    aPowerup_by_maodin204.Play();       // Then hide the GUI afterward.
    WaitMouseKey(GetGameSpeed());       // 
    gInGameMenu.Visible = false;        //
    cRedMage.Say("I don't know why I left that there.");
  }
}

function oBackDoor_AnyClick()
{
  if(player.ActiveInventory == null){
    player.Walk(200, 146, eBlock, eWalkableAreas);
    if(oBackDoor.Graphic == 47){ //if door is closed
      aDoorOpen_by_splicesound.Play(); //play sound
      oBackDoor.Graphic = 48; //siwtch to open door sprite, revealing exit hotspot behind door object
      return;
    }
    else{ //if door is open
      aDoor_Close_by_kyles.Play(); //play sound
      oBackDoor.Graphic = 47;  //switch to closed door sprite
    }
  }
  else{ //if using inventory on door
    player.Say("The door is unlocked. It doesn't need anything used on it.");
  }
}

function hCupboard_AnyClick()
{
  player.Say("It's a nice-looking cupboard.");
  cRedMage.Say("It is. I inherited it from my mother.");
}

function hTable_AnyClick()
{
  player.Say("The table isn't particularly noteworthy.");
}

function hChair_AnyClick()
{
  player.Say("If anyone is sitting there, they must be invisible. But that would take a lot of magic.");
  cRedMage.Say("No one is sitting there.");
}

function hTeakettle_AnyClick()
{
  cRedMage.Say("The tea isn't ready yet.");
}

function hStove_AnyClick()
{
  player.Walk(324, 287, eBlock, eWalkableAreas);
  player.FaceDirection(eDirectionUp); //face the hotspot
  cRedMage.Say("Be careful, the stove is hot.");
  player.FaceDirection(eDirectionDown); //turn around
}

function hRug_AnyClick()
{
  player.Say("I like the colors.");
  cRedMage.Say("Why thank you.");
}

function hUpperExit_AnyClick()
{
  player.Walk(200, 146, eBlock, eWalkableAreas);
  player.Walk(155, 140, eBlock, eAnywhere);
  player.ChangeRoom(3, 90, 130, eDirectionDown); //go out onto balcony at specific coordinates
}

function hLight_AnyClick()
{
  if(player.ActiveInventory == null){ //if not using inventory on chandelier
    player.Say("The flicker of its flame can be mesmerizing.");
  }
  else{ //if using inventory
    player.Say("I can't reach it. And I should probably leave it alonf anyway.");
  }
}

function hBed_AnyClick()
{
  player.Say("It's a small space, but the bed looks very comfortable.");
  cRedMage.Say("It's all right.");
}

function hShelves_AnyClick()
{
  if(player.ActiveInventory == null){ // if not using inventory on shelves
    player.Say("Ancient books, orbs, and other arcane objects... a fitting collection for a master mage.");
    cRedMage.Say("Some of it is just for decoration. I'm more of a spell-caster than a user of... that stuff.");
  }
  else{  // if using inventory on shelves
    cRedMage.Say("Thank you, but please keep it.");
    cRedMage.Say("To be honest, I've got to clean some of these old things out.");
  }
}
[close]
RED MAGE DIALOGUE
Spoiler

Code: ags
// Dialog script file
@S  // Dialog startup entry point

RedMage: What would you like to learn about?
return
@1
RedMage: Rooms have a few different kinds of areas. Which would you like to explore?
option-off 1
option-off 2
option-off 3
option-off 4
option-off 5
option-off 12
option-on 6
option-on 7
option-on 8
option-on 9
option-on 13
return
@2
RedMage: Objects are interactive items placed in the room.
RedMage: Inventory is items you are carrying that you can use.
RedMage: Which would you like to learn about?
option-off 1
option-off 2
option-off 3
option-off 4
option-off 5
option-off 12
option-on 10
option-on 11
option-on 13
return
@3
RedMage: What makes a character unique as a game element is the ability to walk, talk, carry items, interact with other game elements, and move from room to room.
RedMage: Characters are also always linked to VIEWs, which group together sets of animations like walking, talking, and anything else you want associated with a specific character.
RedMage: If you look in the AGS editor at the VIEW assigned to the blue mage, you'll see all the animations currently assigned to the blue mage character.
RedMage: You can create a very complex gmae using characters alone, but of course things get even more fun when you add objects, hotspots, and other things for characters to interact with.
return
@4
RedMage: GUIs can display text, buttons, inventory items, lists, and other information and controls.
RedMage: Each button or control performs actions by calling a script when the player uses it.
RedMage: If you look at the In-Game Menu GUI for this game, you'll see that each control has its own function in the global script.
RedMage: Reading the AGS manual will help a lot in understanding all of the different GUI controls and what they can do.
return
@5
RedMage: Every event that happens in the game really happens in a script.
RedMage: The scripting language used by AGS is tailored for point-and-click adventures, and is meant to be as straighforward as possible.
RedMage: AGS uses room script files and a global script file. For basic game functions, this should be all you need to make everything happen in your game.
RedMage: If you look at the room script for each room, you'll see that it programs what happens with all of the objects, hotspots, and other elements that belong to that room.
RedMage: The global script controls things that aren't limited to one room, like characters, GUIs, and broad functional components like mouse clicks.
RedMage: If you take some time to read through the scripts in this game, you'll see they have many comments explaining what they do.
RedMage: By learning even a little bit of how to use AGS script, you can very quickly make your game playable and full of interactions.
return
@6
RedMage: Walkable areas are the places you set in the room where you want characters to be able to walk.
RedMage: Press Ctrl-A to see the walkable areas in this room, and try the same thing in the room outside.
RedMage: Areas can be set to have characters grow smaller toward the top and larger toward the bottom, or they can have the character always be the same size.
RedMage: If you look at the rooms for this game in the AGS editor, you can see what each walkable area in each room is set up to do.
return
@7
RedMage: Hotspots are areas you draw onto a room that make an area of the room interactive. Hotspots do not move, and do not change the look of the area that they are on.
RedMage: You can make anything at all happen when the player interacts with them.
RedMage: They can trigger any event that you can write in the script, and can be one of the main tools used to progress the game.
RedMage: The door hotspots in this room will move your character to a different room.
RedMage: In the previous room, clicking on the bench triggers finding the key, and clicking on the shrine triggers movement and dialgoe.
RedMage: In this room, you have door hotspots and background hotspots. See what happens if you click on the stove.
RedMage: The Room Editor will show you all the hotspots that have been put in this game.
return
@8
RedMage: Regions are fairly simple. You can use them to determine light levels or color tinting of an area, or trigger events when the character walks on or off.
RedMage: If you step into the shadows at either end of this room, or go to the shrine outside, you'll see the light level of the character drop.
RedMage: If you want to, for example, make a background with streetlights at night, all you would need would be two regions, one with a light level set higher and one set lower.
return
@9
RedMage: Walk-behinds are parts of the background that you set to appear in front of the character if the character reaches a certain area.
RedMage: Walk-behinds are most useful for background elements that don't move, like a pillar or a counter.
RedMage: When you walk out the upper doorway of this room, you'll see the character pass behind the left side of the doorway.
RedMage: And if you click on the stove behind me, you'll see that the table shows up in front of the character.
RedMage: The table and doorway are parts of the background image, and are set to appear in front of the character once the bottom of the character is above the bottom of the walk-behind.
RedMage: The Getting Started with AGS Tutorial in the manual will give you more details on Walk-behinds and how to set them up.
return
@10
RedMage: Objects are interactive items placed in the room that are not part of the background image.
RedMage: They can move, animate, appear and disappear, and be interacted with in many ways, all of which can trigger scripts.
RedMage: The frog and the gem in the previous room are objects, and so are both of the doors in both rooms.
RedMage: As you saw, using the mouse in Interact Mode did not open the front door when it was locked, but using the Key inventory item did.
RedMage: These two different interactions triggered two different scripts.
RedMage: Using the Key played a sound, triggered dialogue, and changed the door object sprite from an image of a closed door to one of an open door.
RedMage: It also revealed the entrance hotspot that was hidden behind the door object.
RedMage: The chandelier in this room is an object that has been set on a looping animation.
RedMage: In general, if you have anything that you want to be able to move, animate, or disappear, using objects is a good way to go.
return
@11
RedMage: Inventory items are items that a character is carrying, and so they are not part of a room.
RedMage: You can use them on other characters or on parts of the room, or even change how things happen just by having one.
RedMage: The gem room object on the balcony outside will disappear when you click on it, and a gem inventory item will appear in your character's inventory, which is shown in this game's In-Game Menu.
RedMage: In your own game, you could also add an inventory item that is simply a skill, and you can program your interactions so that having this skill will change things even if you don't 'use' the item.
RedMage: For example, there is a hidden item in this room. If you have it already, I will say one thing. If you don't, I'll say something else.
  if(player.HasInventory(iGem2)){
RedMage: It looks like you found it! Good job.
  }
  else{
RedMage: It looks like you haven't found it yet. Look around and see if you can find it.
  }
RedMage: Every character has their own inventory, and can carry as many items as the game needs. They can also carry multiple copies of the same item.
RedMage: Having the gem on the balcony and having the key are the two conditions needed to 'complete' this demo game.
return
@12
RedMage: We are in a dialogue right now. Dialogues contain options of things to say, and uses a simplified scripting language to make writing them quick and easy.
RedMage: Dialogues can also trigger other in-game actions if you want them to, and any in-game action can also start a dialogue. It's up to you.
RedMage: This game keeps it simple by starting a dialogue when you click on a character.
return
@13
option-off 6
option-off 7
option-off 8
option-off 9
option-off 10
option-off 11
option-off 13
option-on 1
option-on 2
option-on 3
option-on 4
option-on 5
option-on 12
return
@14
RedMage: I hope this was helpful. Looking at this game in the AGS editor will help to make all of this clear.
RedMage: Keep in mind that you can also learn aboout all of these things in the AGS Manual, and the Getting Started with AGS Tutorial.
stop
[close]

They/them. Here are some of my games:

Crimson Wizard

#150
It would be much better to put the game's source in the online repository with source control, such as git or svn.
This way it will be safe, and will allow anyone to clone, download, and suggest changes in organized way.



RootBound

@Crimson Wizard do you mean put the zip file (which contains the uncompleted game project folder) on git, or put the folder itself there uncompressed? And do you mean add it to the official AGS repository or somewhere else? Thanks.

@Danvzare Would you be willing to make a blue cup inventory item that the player starts with? Just for old time's sake.  ;)
They/them. Here are some of my games:

Crimson Wizard

Quote from: RootBound on Wed 10/04/2024 16:23:10@Crimson Wizard do you mean put the zip file (which contains the uncompleted game project folder) on git, or put the folder itself there uncompressed? And do you mean add it to the official AGS repository or somewhere else?

The files should not be compressed of course, that would defeat the purpose of the source control, as it needs to be able to detect changes with each update. Repository would contain simply the contents of a AGS project folder.

When it comes to AGS project, there's a general recommendation to NOT put certain things in repository, as they may be generated by the Editor, and will only unnecessarily increase the size of repository (by a lot). These files need to be added to "ignore" list. This includes:
- AudioCache folder; the project should have a subfolder with original sound/music files instead, referenced by audio clips as "source file".
- acsprset.spr file; the project should have a subfolder with original image files, referenced by sprites as "source files" too.
Both AudioCache and acsprset.spr may be regenerated when the project is opened in the editor, so long as source image file have relative paths inside the project.
- any backup files (.bak), and user settings (*.user files).
- folders with compiled game: Compiled and _Debug.


It does not have to be any official repository at this point, and the source may be cloned to another place anytime later.

Crimson Wizard

#153
Quote from: RootBound on Wed 10/04/2024 15:48:28HERE IS THE UPDATED VERSION: https://www.mediafire.com/file/bbpyfh7a3qb0npm/AGSQuest.zip/file

Unfortunately I do not have much spare time now to comment on the game itself, but I will comment on a project folder organization.

In the long run, and considering the game source will be eventually available for share and modifications, it's essential to have external assets well organized.

AGS saves the paths to source files for sprites and audio items, which allows to fully rebuild the resource "cache", so long as the source files are available. If the files are located inside game folder, then the paths are relative, and kept regardless of where you move the project to (different folder, or different computer).

But if you rearrange source files later, then these paths will get broken. They may be restored afterwards (there are few ways to do this, I think, both from the Editor, and editing project file Game.agf by hand). But this may be a tedious task in case of large number of assets.

For this reason it's best to come to at least basic folder structure early.

My suggestion is to have subfolders inside Assets, at minimum sprites and audio should be separate, and any unused or temporary resources should better be move to their respective folder (files not related to the game which happen to be there should be excluded from repository).

There's no need to overthink this, so any simple rule for the folder structure will do, so long as it's kept throughout the development.

For example:

Assets
  - Sprites
     - Characters
     - Inventory
     - GUI
     - Rooms
         - Room 1 - AGS Logo
         - Room 2 - Main Menu
     ...etc
  - Audio
     - Music
     - Sounds
         - Room 3 - Forest with Treehouse
      ...etc



In terms of the rooms, something that I may mention is that AGS has state-saving and non-state-saving types of rooms, where non-state-saving are assigned a number of 301 and above.
Menus and intro screens do not have to be state-saving, so it may be "cleaner" to have them 301+. This is not really essential, but may hint a person who studies this demo game about this difference.



EDIT: Oh, sorry, another thing that I noticed, is that sounds are made as WAVs, but it looks like they were cut from larger sounds presented as OGG. I think using OGG format is generally better, because the compression is higher, and also AGS had some issues with certain wav formats in the past. It's also better to keep at 44100 Hz, and an average bitrate (I noticed that some sounds there are 96000Hz, which is unnecessarily high).

But so long as the folder and file structure is maintained, it will always be possible to update the source file(s) keeping the filenames, and have it refreshed in the game's item either automatically or by command from Editor's menu.

Danvzare

Quote from: RootBound on Wed 10/04/2024 16:23:10@Danvzare Would you be willing to make a blue cup inventory item that the player starts with? Just for old time's sake.  ;)
Here you go:

I'm rather proud of how this one turned out.

Just tell me if there's anything you want altering.  :-D

By the way, I love the demo.

RootBound

#155
Some updates:

-As Crimson Wizard recommended, I've reorganized the assets into sensible subfolders, reimported the sprites and sounds with these new source paths, and also replaced the .wav sounds with .ogg. I've also removed all of the extra files from the project folder that would not be needed for further development, so as not to waste space in whatever repository the project ends up in.

-I also added custom button graphics and a title image, both of which could easily be changed if people want a different GUI or title. I also changed the cursors to the icons from the BASS template, and added a custom game icon for the .exe. These changes are aesthetic but will make the game more presentable in its current form.

-I added Danvzare's blue cup inventory item, and added more UseInv interactions throughout the game, including making more use of the unhandled_event function for tutorial purposes.

-I've compiled Windows and Linux versions of the game so that it can be easily downloaded and played by interested newcomers.
-I've and also created an optimized project folder with the AudioCache folder removed and other files that can be recreated if a user downloads the project folder. I've tested this to make sure the sprites do in fact get restored from the new source path.

Questions:

1). Is the current demo game actually in a good enough state to make publicly available to new AGS users? I believe it is, so even if the project continues to evolve and change, having a version 1.0 released sounds like a good idea to me. But if people feel like it isn't ready to release, please say so. I'm not sure how many people have even tested it.

As I said, I personally believe the demo game is now fully playable and presentable. If others do agree, I think it would be good if the source could be hosted in the AGS repository so that it's in a permanent and accessible place that several developers already have access to. (The uncompiled project folder is only 2.2 megabytes at the moment, and the the compiled Windows .zip is 3 MB).

2). Should the demo game be made available on the AGS website? If so, should a .zip of both the compiled and uncommpiled versions be available there? If the purpose of the demo game is to make it available to new users, I feel like it should be easy to find and download.

3). Is anyone else interested in further refining and developing this project? I'm personally feeling ready to move on to other things, as I have put in a lot of time and effort, and I expect to have less time available for this project moving forward.
They/them. Here are some of my games:

Crimson Wizard

Quote from: RootBound on Yesterday at 16:13:10If others do agree, I think it would be good if the source could be hosted in the AGS repository so that it's in a permanent and accessible place that several developers already have access to.

This may certainly be done. We have a "organization" on github, which is a kind of a supergroup for AGS-related repositories. It includes templates, old demo game, etc. I can add a new repository there, and grant access permissions specifically to you, and anybody else willing to work on this project (that requires having a github account).

The game releases may be also hosted within the repository, at least for starters (there's a "Releases" page where one can upload an archived compiled game).

RootBound

@Crimson Wizard sounds good. Once that's available, just let me know, and I will upload the compiled and uncompiled versions to the proper pages. I have a GitHub account as RootBoundAGS.

In the meantime, here is the latest version of the project folder, for further testing and comment:

https://www.mediafire.com/file/3lygtdk249how7j/AGSQuestUncompiledProject.zip/file

And here are Windows and Linux compiled versions:

Windows: https://www.mediafire.com/file/1xbathmg8odaqoq/AGSQuestCompiledWindows.zip/file
Linux: https://www.mediafire.com/file/gbrchqvmebm7mx2/AGSQuestCompiledLinux.tar.bz2/file

And here's a screenshot of the new title screen, just for fun:


They/them. Here are some of my games:

SMF spam blocked by CleanTalk