Menu

Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Show posts Menu

Topics - brewton

#1
Completed Game Announcements / Signal Loss
Sat 29/01/2022 16:50:42


SIGNAL LOSS
a game by brewton

An entry for MAGS January 2022

itch.io game page
AGS game page

You and your team have just launched a new space telescope.
Everything goes according to plan... until the signal mysteriously cuts out.
Can you help re-establish the link and finish the work?

Everything (except music) by brewton
Uses my custom Kyrandia/BASS hybrid interface.

Music
Symphony No.7 in A major op.92 / II, Allegretto by Ludwig van Beethoven (arrangement unknown)
Retro Adventure Theme #1 by Andrey Sitkov
#2
Hello, all.
I've been working on this for a few days. I'm pretty proud of it, and I'm looking for some feedback.



This AGS interface template combines my favourite interface features from the BASS template and The Legend of Kyrandia.
Initially based on the BASS template by Ghost and the AGS team. Features a heavily modified TwoClickHandler script.
Intended to serve as a template with the full functionality of the interface used in The Legend of Kyrandia by Westwood Studios.

INTELLECTUAL PROPERTY NOTE
The compiled version uses assets from the Legend of Kyrandia for demonstration purposes ONLY.
These assets have been removed from the template.
Sorry for the uggo asset replacements.

The scripts in this project are released under the MIT license.

FEATURES
Single click on inventory items to pick up or pop out of slots.
Single click on screen to drop items in a room.
Retains useful right-click and left-click handling from BASS template.
Custom room text in the status until timeout.
Kyrandia style - Player can carry items between rooms without having to slot them in inventory.
Kyrandia 2 style inventory scrolling (non-looping)
Custom cursors for displaying room exits on mouseover.
Dummy item generation.

Requires AGS version 3.5.0 or higher.

Project page: https://github.com/brewtonian/ags_kyrandia
Documentation: https://github.com/brewtonian/ags_kyrandia/blob/master/documentation.pdf
Demo Game: https://github.com/brewtonian/ags_kyrandia/tree/master/Compiled
#3
Hi, I'm not sure how to ask this. It might be a two-part problem. If anything I'm just articulating the problem so I can understand it better myself.

First, here's a link to my project on GitHub so you can see what I'm trying to do.

I'm working on something that requires a dynamic array of dummy characters that I can reuse with different names and sprites and properties.
I haven't worked much with these concepts so please let me know if I am mistaken in how they function. I've read the manual and searched the forum but I think I'm kind of lost.

So far with my three test characters it works, but these are not dummy characters and are hard-assigned to inventory items.
The dummy characters are for visible inventory items in a scene, so all use the same view and are locked to a frame according to a custom property CharID assigned to inventory items.
Similarly, characters are assigned a custom property

This is the code I would like to replace.

Code: ags

  void drop_held_item()
  {
        InventoryItem* Item = player.ActiveInventory;                          // initialize the held item
        int CharID = Item.GetProperty("CharID");                               // what's the character?
        character[CharID].ChangeRoom(player.Room, mouse.x, mouse.y   offset);  // move the character to where the mouse was clicked - 'dropping' it.
        RemoveWalkableArea(2);
        character[CharID].PlaceOnWalkableArea();                               // stops the object being stuck on a wall or something        
        
        int InvFrame = Item.GetProperty("InvFrame");                           // what's the inventory frame ID of the item?      
        character[CharID].LockViewFrame(1, 0, InvFrame);                       // locks it to the item's sprite            
        
        RestoreWalkableArea(2);
        player.LoseInventory(Item);
        player.ActiveInventory = null;
  }

  void pick_up_item(InventoryItem* item, Character* itemChar)
  {
      itemChar.UnlockView();                          // no longer locked to the item sprite
      player.AddInventory(item, invSlots);            // places it in the cursor
      player.ActiveInventory = item;                  // makes it active
      itemChar.ChangeRoom(0);                         // sends it to the inventory room      
  }


I haven't worked with dynamic arrays or dictionary lists before but I think they could provide a solution.

What I want to do is write a function that handles:

Part 1: When an item is dropped on the screen:
- create a new dummy character
- create a dictionary key with the character's array value (ex cDummyItem[22])
- add values:
  . Inventory item number
  . Inventory item name
  . inventory item sprite number
  . inUse bool = true **
- use LockViewFrame to lock cDummyItem[22] to the sprite number assigned in its dictionary key
- assign the inventory item name to the character name

Part 2: When an item (character) is clicked
- retrieve the inventory item number and return the value
- reset the character instance
- reset the character dictionary key

So my initial code would become something like (not tested)
Code: ags

  void instance_dummy(InventoryItem* Item)
  {
      // Part 1 pseudocode from above
  }

  function destroy_dummy(Character* dummy)
  {
      // Part 2 pseudocode from above
      // returns inventory item      
  }

  void drop_held_item()
  {
        InventoryItem* Item = player.ActiveInventory;                          // initialize the held item
        instance_dummy(Item);
        player.LoseInventory(Item);
        player.ActiveInventory = null;
  }

  void pick_up_item(Character* itemChar)
  {
      *InventoryItem Item = destroy_dummy(itemChar);
      player.AddInventory(Item, invSlots);         // places it in the cursor
      player.ActiveInventory = Item;                  // makes it active
  }


I guess my questions are: would this work and is this a smart way to do this?
Also, would it be better to just keep creating new characters, or is it better to search through the array for the next available "inUse == false" character and reinitialize them with new values?
#4
Hi, everyone.
Here is an experimental side-scroller that we have made based on S03E08 of Twin Peaks.

game by brewton
graphics by SecretFawful

Entry for Minimalist Jam 2017.

http://www.adventuregamestudio.co.uk/site/games/game/2178/

https://brewton.itch.io/got-a-light



EDIT: Added game to AGS database and added link.
EDIT 2: misspelled minimalistic
#5
Hi. I've got an enum set in the header of my global script. I'm modifying 9verbs template.
In guiscript I'm not able to use these enumerated values, getting an "undefined symbol" error.

Here's how I have it set up in my global header.
Code: ags
enum pc_char { // differentiates playable versions of characters from others
  pc_eOne,
  pc_eTwo,
  pc_eThree,
  pc_eFour,
  pc_eFive,
  pc_eSix 
};


Here's the code in the other script that throws the error.
current_kid is a global variable that is checked via a function called in repeatedly_execute.

Code: ags

    else if (action == eGA_Ability) { // ability verb setup
      if (current_kid == pc_eOne) tresult = "SPOILER %s";
      else if (current_kid == pc_eTwo)  tresult = "SPOILER %s";
      else if (current_kid == pc_eThree)  tresult = "SPOILER %s";
      else if (current_kid == pc_eFour)  tresult = "SPOILER %s";
      else if (current_kid == pc_eFive)   tresult = "SPOILER %s";
      else if (current_kid == pc_eSix) tresult = "SPOILER %s";
    }


I've tried importing the enum to guiscript, but that didn't work.
What am I doing wrong?
SMF spam blocked by CleanTalk