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 - RootBound

#1
Hello all,

@Mandle and I have settled of the following theme:

After the Fire

Something has burned. A meal? A house? A forest? Perhaps simply a piece of pottery in a kiln?
Or has it burned metaphorically - burning your bridges, torching your relationship, or anything else where a "burn it all down" metaphor would be appropriate.

The caveat is this: whatever type of fire event you choose, the story must take place after that event. The focus should be on aftermath, repercussions, fallout... whatever comes "next."

Bonus points if you can avoid a big dump of exposition, but those points will be up to the voters, of course.  ;)

My understanding is that the hosts may also write entries, but we'll see whether I have enough time.

Deadline is November 30.

#2
Hello all! Here's my newest game, an entry for this month's MAGS contest.  :)

SUPER AUTHOR SIMULATOR 2023

DOWNLOAD HERE:
https://rootbound.itch.io/super-author-simulator-2023

AGS DATABASE ENTRY HERE (please leave a rating if you play it!):
https://www.adventuregamestudio.co.uk/site/games/game/2702-super-author-simulator-2023/


Can you make it to 500,00 words without losing your sanity--or your payday? Can you brave the finishing of abandoned chapters with random openings? Can you bear the heartless feedback of a condescending literary agent?

With all these drawbacks and almost no benefits, why would anyone ever want to be an author? It's baffling.  At the end of the day, it may be that only a clever combination of hard perseverance and supernatural power-ups can save you. Maybe just the supernatural power-ups, to be honest.

Made by me and playtested by @Nahuel . Also uses NormRnd module by @eri0o and Shuffler module by @Gurok .





FEATURES:

-Short or long playtime, depending on your endurance

-Random chapter prompts combined from strange sentence parts

-Fun and dangerous power-ups

-The ability to export the wacky things you'll end up writing

-Endless screaming

-The dulcet tones of Antonio Vivialdi

Have fun! Or don't! You've been warned!
#3
Hey all,

I'm just beginning to develop another first person game, and I have some really big design decisions to make. The main one is how to avoid, wherever possible, having to redraw the same background from multiple angles when the player travels in different directions. The most obvious example would be the same hallway drawn twice, one from each end, but that's not really what I'm concerned about.

To illustrate, here are two screenshots from MYST:




This is the same staircase, seen from the top and from the bottom. I'm wondering if there's a way to compose backgrounds in ways that work in both directions.

What do I mean by that?

Here's another MYST example:



I feel like this image could do "double duty" in that, once you reach the bottom of the stairs, it works both as a "reached the bottom" image and as a "starting from the bottom" image. No need to draw the bottom of the stairs from both a "looking down" and "looking up" perspective.

However, the staircase itself would still need a background image for each direction. That feels unavoidable. But is it?

Another option would appear to be skipping the staircase itself altogether and having no "liminal" or "transitional" spaces like that, which would always need to be drawn from both directions. But that seems like it would make the world a lot smaller and thus greatly reduce immersion.

I could also do a "map" between each location like @lorenzo just did with "A Stranger in Utopia" (good game, you should play it), but I'm going for a more "walking between each place" feel.

Perhaps it's impossible to compromise on this (it may simply be an inherent component of the first-person POV), but I feel like there must be creative ways around it.

For example, with a ladder, facing the ladder itself instead of facing up or down it would save the need for multiple perspectives. It's vertical movement only rather than forward/backward. But that doesn't work with staircases or, e.g., forest paths. I can't make it vertical movement everywhere.

And to be clear, I'm certainly not opposed to drawing *some* backgrounds from multiple perspectives (it seems futile to attempt to avoid this altogether). Rather, I'm trying to find a balance between full immersion and not doubling or tripling the amount of backgrounds I need to draw. If it was all pre-rendered like MYST, this wouldn't be an issue, but alas, I am a drawer and not a modeler.

Any ideas or advice? Any first-person games that handle this well? I'd love to see more examples of well-composed first-person backgrounds that allow for traversal in multiple directions with one image, but it's hard to know where to start looking for that.
#4
Just wanted to share and discuss tools and results from upscaling and downscaling low-res images or pixel art using various tools, because I've had interesting results. I was starting with a resolution of 320x180, with a target resolution of 480x270.

This is the image I started with (320x180):



I upscaled it 400% using the free AI upscale tool at https://www.iloveimg.com/upscale-image. I know there are much better upscaling algorithms out there, but this one was free and done quickly online. This is the result (1280x720):



I then downscaled it to my target resolution using MSPaint (why MSPaint's downscaling algorithm is still so good, I don't know, but I have yet to find a better one). This is the result (480x270):


Obviously the "pixelated" look is completely gone, so I used GIMP's dithering function to reduce the number of colors:


Much better, but it's obviously been indexed from a 16- or 32-bit image.

Finally I used LibreSprite's Jumble Tool to shake up the green fade a bit. This is the final version:



What do you all think of these tools/methods, and about upscaling/downscaling in general, and the use of AI to do so? The algorithm I used actually had TERRIBLE results when upscaling very very low-res assets.

Original (pretty awesome if I do say so myself  :-D :


Upscale (SO BAD)  8-0 :


As the technology develops (I know there are already much better algorithms out there), it could be possible to have options like toggling between pixel art and high-res in the same game. What other possibilities might there be? Drawbacks? Ethical concerns? I find the whole topic pretty fascinating.

#5
Winner announced below! :)

Hey all,

For this month's background blitz I was looking through old prompts and really liked both "vertical scrolling" and "you can't get there from here." I seriously considered reusing one of those until someone asked a question on discord about having multiple rooms visible simultaneously. Aha! Now that's a way to combine both prompts!

This month's prompt is BUILDING CUTAWAY. Make all the rooms in a building visible at once by "cutting away" one of the exterior walls. Could be tall enough for vertical scrolling--or not. Could have secret passages or other rooms that you can see but can't get to--or not! Draw whatever interests you.

EDIT: forgot the voting criteria! Whoops! Once we start voting, please evaluate entries based on the following:
-Concept
-Playability
-Artistic Execution

Deadline September 14 followed by a week of voting. Have fun!







#6
Hints & Tips / Tunnel Vision Walkthrough
Mon 21/08/2023 02:32:55
It seems like a number of people are getting stuck in various places, so here's a walkthrough for anyone who finds the game frustrating. The hardcore among you should feel free to disregard.  :)

I'm also happy to provide hints here if that's preferable. :)

Puzzle 1:
Spoiler
Patch the stab wound:
1. Use pain reliever and then lipstick on arrow.
2. Pull out arrow.
3. Use hand sanitizer and then tissues.
4. Use tissue wrapper and then phone charger.
[close]
Puzzle 2:
Spoiler
Open the locker:
1.Use lipstick on poster and on left-side window.
2. Use lipstick/screwdriver on locker door.
3. Use arrow on locker door.
[close]
Puzzle 3:
Spoiler
Pull out the wrench:
1. Use Windex on wrench.
2. Use fire extinguisher on wrench.
3. Collect crowbar and pliers from locker.
4. Pull lever.
[close]
Puzzle 4:
Spoiler
Escape the train car:
1. Use crowbar on left seat.
2. Use pliers on left seat.
3. Use locker door on far-right floor hatch (using it on center aisle will go nowhere).
4. Use cushion on locker door.
5. Use wrench on roof hatch repeatedly until it opens.
[close]
Puzzle 5:
Spoiler
Get down from the roof:
1. Use crowbar on mystery component.
2. Use wires on hatch handle.
3. Use pliers on wires.
4. Use lasso on passing pole with horizontal beam repeatedly until it catches.
[close]
Puzzle 6:
Spoiler
Open the suitcase:
1. Use crowbar on floor vent.
2. Use pliers or arrow on seat rip.
3. Use necklace on floor vent.
4. Find suitcase in top left corner.
5. Use key on suitcase and collect suitcase contents.
[close]
Puzzle 7:
Spoiler
Open the door to the cab:
1. Use screwdriver on ceiling electrical panel.
2. Use pliers on ceiling electrical panel.
3. Go back up to roof and use wires on electric sparks.
4. Go back down and use t-shirt on live wire.
5. Use crowbar on flaming t-shirt.
6. Use flaming crowbar on ceiling sprinkler head.
7. BEFORE GOING INTO THE CAB, DO THE FOLLOWING:
Spoiler
Collect the wires. If you do not do this, there is NO WAY TO WIN once you are inside the cab!
[close]
[close]
Puzzle 8:
Spoiler
Stop the train!
1. Wedge left window open with wad of cash.
2. Tie wires to lefthand emergency brake.
3. Tie gun or crowbar to wires.
4. Use screwdriver on damage under console.
5. Prop broken brake with gun or crowbar.
6. Pull righthand emergency brake.
7. YOU WIN!!  :)
[close]
#7
Completed Game Announcements / Tunnel Vision
Sat 19/08/2023 22:59:19
It's finally done!  ;-D  I've been working on this game for a year (I started it before both of my MAGS entries), and I'm excited it's time to share it! It's been so much work, but I am very proud of the result.  :)
-------------------

Trapped on a sabotaged train speeding toward a tunnel with a bomb, an heiress struggles to stop the train in time. Save the passengers and escape the train car before it's too late! A first-person game with nostalgic low-res CGA 4-color graphics.

TUNNEL VISION is a first-person point-and-click action adventure puzzle survival game.

FEATURES:
-Multiple animated cutscenes
-All original artwork and music
-Short-to-medium playtime (30-60 minutes)
-Simple one-click interface
-Toggle timed puzzles on or off
-Save points

AGS Database Entry with Download Links

Special credit goes to @Nahuel for very thorough playtesting and MacOS conversion. Huge thanks!





#8
Advanced Technical Forum / Ctrl+[ pauses game
Sun 13/08/2023 16:31:29
Odd discovery here. @Nahuel found while playtesting my game (AGS 3.5.1) that pressing Ctrl+[ pauses the game.

This combination does not even seem to be an option in the drop-down list under on_key_press, and there also doesn't seem to be a game.pause_key listed in the game variables like there is with game.abort_key.

Is this a hard-coded debug feature? Ctrl+P is one of my pause keys in the game, and the [ key is right next to P, as Nahuel pointed out to me, but maybe that's unrelated.

This isn't necessarily a problem, but I couldn't find an explanation for it anywhere, so I figured I'd ask in case it needs to be documented somewhere.

Thanks!
#9
Hey all,

I searched the forums and couldn't find an answer to this.

Let's say, for example, that I have a zombie game with 50 zombies in a room, and when the player makes a noise, all the zombies simultaneously move toward the player.

Is there any way to do this more efficiently than using cZombie.Move 50 times, once for each zombie?

I feel like if I could access the character.ID integer array, I could do it easily with a "for" statement, but there doesn't seem to be a way to do that anymore since the script now uses name pointers instead of ID numbers.

I could put all the character name pointers into an array and assign them all a number that way, but that seems superfluous if the character.ID integer array already exists.

What are my options here?

Thanks very much. :)
#10
Hey everyone,

I'm been coming back to this piece on and off for a few months, and I really like some aspects of it but not others.

Two questions:

1. I know I need to put SOMETHING on the left edge so that the landscape doesn't look like a flat pool table, but I also don't want the composition to feel too crowded there, so I don't really know what to do with it.

2. Stylistically, it feels inconsistent - The train and tracks and sky feel very clean (and I like them that way), but the water and marshlands look more impressionistic and brush-stroke-y. I'm not sure how to reconcile the two (or maybe just not sure how to draw marshlands using clean lines?).

Any advice would be appreciated.

#11
Finished my MAGS entry for this month. Hope you enjoy!  :-D

DOWNLOAD HERE: https://rootbound.itch.io/mad-jack-breakdown

AGS DATABASE ENTRY: https://www.adventuregamestudio.co.uk/site/games/game/2676-mad-jack-breakdown-shakedown

MAD JACK: BREAKDOWN SHAKEDOWN is an action comedy achievement-based puzzle game.

In a post-apocalyptic free-for-all desert wasteland where everyone still somehow has gasoline (a world not remotely like that of a beloved film franchise) Mad Jack's muscle car breaks down. Using only items from a junkyard, Jack must find a way to escape being stranded and continue his thrilling, heartwarming journey to his destiny (presumably somewhere else in the desert).

Features:
*Zany vehicles
*Fire
*Car wrecks
*Perfectly believable and irreproachably realistic inventory combinations ;)
*Rollicking rock music by @Eric Matyas
*Multiple ways to "win" or "lose" (but is this really the point?)
*Tons of achievements and inventory to unlock (this could certainly never be the real point, definitely not)
*One (1) playable room
*Breathtaking ultra-HD 480x270 resolution
*Endless hours of gameplay (if you decide to never stop playing)



#12
Hey all,

I started a game using the blank template. Made a GUI with an inventory window in it. Gave the player inventory items. They display correctly in the GUI window, but do not activate when clicked on.

I triple-checked all of the following conditions:

-"Override built-in inventory window click-handling" is set to FALSE.
-"Use selected inventory graphic as cursor" is set to TRUE.
-Parent GUI is set to "clickable"
-"Inventory window" GUI control is set to "enabled" and "clickable"
-There are no other invisible GUIs on top of the inventory window
-Inventory item width and height in the gui editor are the appropriate sizes for the sprites, which display exactly as intended.
-When I press ` for debugging and click on the window, it says "Mouse click over GUI 1"
-in Room_RepExec I placed a block that says
Code: ags
if(player.ActiveInventory != null"{
  Display("Huh.");
  }

This block of code never runs.

I'm just about tearing my hair out over this.

Any ideas would be appreciated.
#13
MY SIBLINGS, THE STONES is a short story-driven adventure game.

A dropout mage arrives by portal to a village whose water has been diverted by a troll. In order to find her way home, she must help the villagers solve their predicament.

Can't wait to share it with all of you!

FEATURES:

-Backgrounds adapted from photographs (thank you OpenGameArt.org)
-Music by Eric Matyas
-Character-driven puzzles
-A subtle mood
-Short-to-medium lentgh

PROGRESS:

-Coding: 50%
-Animation: 10%
-Puzzle and story design: 100%
-Dialogues: 70%
-Game areas: 100%




#14
CONGRATULATIONS to @Pinback, the winner of this month's Sprite Jam! Fantastic entry. It's up to you now to set the theme for the next Sprite Jam. Have fun! ;-D

This month's Sprite Jam theme is UNEXPECTED INVENTORY.
------------------------------------------------------

Wait, wait, I can pick this item up?

I can actually add it to my inventory and carry it around? Holy cow!

I'm not sure how I feel about this item!

What is it?? Only your entries can answer the question!



Have fun!  :-D
#15
Hey everyone:

Just for fun, I modified the default Roger sprites into a mage (Mager?) and Tron (Troger?). I also made red and yellow versions of the default blue cup. (I didn't make a right-facing version of the Tron one, but the left-facing frames can be flipped for that.

Have fun! Hope you enjoy.










#16
Completed Game Announcements / Elevation
Fri 12/05/2023 21:37:21
Hello everyone,

Here's the refined and polished version of the first game I completed with AGS! This game won the March MAGS competition (theme: "Uplifitng"), so some of you are familiar with it already.

AGS game databse entry with download links here:

https://www.adventuregamestudio.co.uk/site/games/game/2671-elevation

In this short adventure survival game, you help a small robot
trapped in a space-elevator shaft to find rescue. 

All original art, fonts, and music.

Built with Adventure Game Studio 3.5.1.

Playtime: 20-60 min.






Updates since the MAGS version include:

-Lots of bug fixes
-Greatly improved GUI
-Some improved animations
-More polished dialogue and pacing (especially the ending)
-Slight refinements to puzzle experience
-End credits

Thanks so much to everyone who played and commented and voted during MAGS March. It means a lot to me.  ;-D

If anyone who plays would leave a rating in the AGS database, I'd be very grateful! ;-D
#17
UPDATE: CONGRATS to this month's winner, @lorenzo!

We have 5 entries, below:

@Creamy : Museum
@Hannah_Banana : Mayan-style sacrifice
@newwaveburritos : The bar
@lorenzo : Church
@Volcan : Artifact

Please pick your favorite in each of the following categories:

Concept: What is the background about? What sort of mood does it spark? What is, as it were, the big idea?
Playability: What is its opportunity for gameplay like? Walkable areas, hot-spots, dialogues, and so forth?
Artistic Execution: How well does the picture convey an atmosphere? How well is it executed?


-------------------------------------------------------------------
I thought of an idea quickly, so here we go -- RITUAL / CEREMONY. Trying to keep it vague in hopes of more entries.

It could be religious, magical, creepy, sentimental, celebratory, heroic. Anything goes.

Background can be a place where these things happen, a view of it happening, a set of items to be used in it -- whatever you like.


#18
UPDATE: VOTING CLOSED. WINNER BELOW.
-----------------------------------

Hey all - my first time hosting Sprite Jam. This should be fun!

This time the theme is BIRDS - it could be a character, an enemy, a part of a setting's mythos, a detail of an animated background, a logo for a secret organization - think as far inside or outside the box as you like.

Contributions open until FEBRUARY 18TH, followed by a week of voting.

Looking forward to seeing all of your entries!

#19
Hey all. Wish I weren't posting for help again so soon after the last time, but here we are. :(

I have been testing out small blocks of code in a mostly empty default template game, and those block work perfectly there. Unfortunately, when I write the same code in my actual game, they don't work anymore.

Here are the issues, which I theorize are related because they both have to do with the custom inventory GUI:

1. I have a speech-based countdown timer running. In the test game it works perfectly. In my real game it causes the inventory GUI to flicker once per second as the timer counts down. I know it's the timer that causes it because when I remove the timer block, the blinking stops. There's no such behavior in the test game, however.

2. There's also a hovering text label that follows the cursor and gives the name of whatever inventory item is under the cursor. It runs perfectly in the test game. In the real game the hover text does not show up at all (the label is marked enabled, visible, and clickable in settings).


I have scanned the code multiple times trying to figure out what the discrepancy is. The settings for the inventory and hovertext GUIs are identical. The code itself, other than character names (cTimer vs. cRoger), inventory item names (iKey vs. iTest1) and GUI label numbers (Label1 vs. Label11), is also nearly identical. The timer is nested within an if statement in the real game (if dying == true), but removing that made no difference.

I then commented out every piece of the room script until I was left with only the relevant code, which still looks identical.

I am well and truly stumped. :(

I honesty can't find where the two rooms are significantly diverging, or what could be causing these issues. Many thanks and a place in the game credits for anyone who can help me solve this.

This is the room script where everything works perfectly:

Code: ags

// room script file

int min;
int sec;
String TimerText;
bool timeout;

function room_load()
{
  min = 2; //set number of minutes before timeout
  sec = 15; // set number of seconds before end of current minute
  timeout = false; //timer has not run out yet
    
  SetGameSpeed(40); // game loops per second
  
  SetTimer(1, 600);  // set minutes timer (seconds * 40) and whether initial minute expires in less than 59 seconds
  SetTimer(2, 40);  // set seconds timer
  
  cRoger.y = 100;
  
  cRoger.AddInventory(iCup);
  InvItemTotal ++;
  cRoger.AddInventory(iKey);
  InvItemTotal++;
}

function repeatedly_execute_always()
{
if (IsTimerExpired(1))                              //check minutes timer
  {
  min -=1;   // decrease counter by 1 minute
  SetTimer(1,  2360); //reset timer for another minute
  
    if (min == -1) // keep minutes from going below 0
    {
    min = 0;
    }
  }
  
  if (IsTimerExpired(2))   // check seconds timer
  {
    sec -=1;
    
    if (sec >=10)
    {
      TimerText = String.Format("%d:%d", min,  sec); // countdown from 60 to 10
      cRoger.SayBackground(TimerText);
      SetTimer(2,  40); //trigger next code block
    }
    else if (sec <10 && sec >-1)
    {
      TimerText = String.Format("%d:0%d", min,  sec);   // count from 9 to 0 and switch format from "9" to "09" etc.
      cRoger.SayBackground(TimerText);
      SetTimer(2,  40);
      if (sec == 0 && min == 0 && timeout == false)
      {
        sec +=1; // cancel out seconds countdown
        timeout = true; // time has run out
        SetTimer(3,  180); // how long to display final second of timer (0:00)
      }
      if (sec == 0 && min == 0 && timeout == true && IsTimerExpired(3) == false)
      {
        sec +=1;
      }
      
    }
    if (sec == -1 && timeout == false)
    {
    sec = 59;  // reset to keep seconds from counting into negative numbers and change format back to 2 digits
    TimerText = String.Format("%d:%d", min,  sec);
    cRoger.SayBackground(TimerText);
    SetTimer(2, 40);
    }
  }
  
}
function room_AfterFadeIn()
{

}

function oHandbag_AnyClick()
{
  if (gInventory.Visible == false)
    {
        gInventory.Visible = true;
        gInventory.Y = oHandbag.Y;
        gInventory.X = (oHandbag.X -1) - (InvItemTotal * 26);
    }
  else if (gInventory.Visible == true) 
      {
        gInventory.Visible = false ;
      }
}

function room_RepExec()
{
  InventoryItem *InvUnderMouse;
  InvUnderMouse = InventoryItem.GetAtScreenXY(mouse.x, mouse.y);

  if (InventoryItem.GetAtScreenXY(mouse.x, mouse.y) == null)
  {
    gInvLabel.Visible = false;
  }
  else
  {
    gInvLabel.Visible = true;
    gInvLabel.X = mouse.x;
    gInvLabel.Y = mouse.y - 20;
    Label1.Text = InvUnderMouse.Name;
  }
}



And this is the code from the room with problems:

Code: ags

// room script file
int min;
int sec;
String TimerText;
bool timeout;

function room_Load()
{
  Mouse.Mode = eModePointer;
  
  min = 1; //set number of minutes before timeout
  sec = 31; // set number of seconds before end of current minute
  timeout = false; //timer has not run out yet
    
  SetTimer(1, 1300);  // set minutes timer (seconds * 40) and whether initial minute expires in less than 59 seconds
  SetTimer(2, 40);  // set seconds timer
  
  cRoomController.AddInventory(iTest1);
  cRoomController.AddInventory(iTest2);
  cRoomController.AddInventory(iTest3);
  InvItemTotal +=3;
}

function repeatedly_execute_always()
{
 
  
    if (IsTimerExpired(1))                              //check minutes timer
    {
      min -=1;   // decrease counter by 1 minute
      SetTimer(1,  2360); //reset timer for another minute
  
      if (min == -1) // keep minutes from going below 0
      {
      min = 0;
      }
    }
  
    if (IsTimerExpired(2))   // check seconds timer
    {
      sec -=1;
    
      if (sec >=10)
      {
      TimerText = String.Format("%d:%d", min,  sec); // countdown from 60 to 10
      cTimer.SayBackground(TimerText);
      SetTimer(2,  40);
      }
      else if (sec <10 && sec >-1)
      {
        TimerText = String.Format("%d:0%d", min,  sec);   // count from 9 to 0 and switch format from "9" to "09" etc.
        cTimer.SayBackground(TimerText);
        SetTimer(2,  40);
      
        if (sec == 0 && min == 0 && timeout == false)
        {
          sec +=1; // cancel out seconds countdown
          timeout = true; // time has run out
          SetTimer(3,  180); // how long to display final second of timer (0:00)
          DisplayAtY(10, "Crap, what is... Feels like I'm falling.");
        }
        if (sec == 0 && min == 0 && timeout == true && IsTimerExpired(3) == false)
        {
        s  ec +=1;
        }
      
      }
      if (sec == -1 && timeout == false)
        {
        sec = 59;  // reset to keep seconds from counting into negative numbers 
        TimerText = String.Format("%d:%d", min,  sec);  //change format back to 2 digits
        cTimer.SayBackground(TimerText);
        SetTimer(2, 40);
        }
   
    }
  
}




function oHandbag_AnyClick()
{
  if (gInventory.Visible == false)
  {
    gInventory.Visible = true;
    gInventory.Y = oHandbag.Y;
    gInventory.X = (oHandbag.X -1) - (InvItemTotal * 28);
  }
  else if (gInventory.Visible == true) 
    {
      gInventory.Visible = false ;
    }
}

function room_RepExec()
{
  InventoryItem *InvUnderMouse;
  InvUnderMouse = InventoryItem.GetAtScreenXY(mouse.x, mouse.y);

  if (InventoryItem.GetAtScreenXY(mouse.x, mouse.y) == null)
  {
    gInvLabel.Visible = false;
  }
  else
  {
    gInvLabel.Visible = true;
    gInvLabel.X = mouse.x;
    gInvLabel.Y = mouse.y - 20;
    Label11.Text = InvUnderMouse.Name;
  }
}
  



What am I missing?  ???
#20
Hi scripters,

I know there are modules for countdown timers out there, but I wanted to see if I could script my own based on the background speech of an invisible character rather than a GUI. It seemed simpler, but evidently is not.

The problem is this: I can't get the countdown to update - it will display the initial value of the min and sec variables but never change. I've read the "string formatting" and "string.format" sections of the manual several times, and my "repeatedly_execute_always" function is running other things like looping animations perfectly well.

I have tried reordering the lines of code several different ways, and changing the frequency of updates to the timer (for example, updating only every 3 seconds), as well as substituting "if" statements for "while" statements. Nothing changes. I feel like I must be missing something obvious but cannot figure out what it is.

Any help would be hugely appreciated. Relevant code is below (I haven't coded what to do at 0 yet because this problem has gotten in the way):

Code: ags

int min;
int sec;
String TimerText;

function room_Load()
{
  min = 2;
  sec = 60;
  TimerText = String.Format("%d : %d", min,  sec);
  SetGameSpeed(40);        //40 loops = 1 second
  SetTimer(1, 2400);       //2400 = 40*60 = 60 seconds
  SetTimer(2, 40);         // 40 = 1 second
}

function repeatedly_execute_always()
{
  if (IsTimerExpired(1))
  {
    min -=1;
    SetTimer(1,  2400);
  }
  if (IsTimerExpired(2))
  {
    sec -=1;
    cTimer.SayBackground(TimerText);
    SetTimer(2,  40);
  }
}

SMF spam blocked by CleanTalk