Recent posts

#21
Quote from: GildedSpaceHydra on Yesterday at 21:56:30Additionally, every time the tint changes, it seems to stack (like maybe the previous DynamicSprite isn't being removed before the new tint is added: the more time advances, the darker the screen gets).

That is what I was referring to earlier:

QuoteYou must make a copy of original background when you enter the room and save it in a DynamicSprite variable for using in drawing, because next time you call "DynamicSprite.CreateFromBackground" it will return a already modified background.

It should go like this:
1. Store and keep a copy of original background in a separate dynamic sprite.
2. When updating background:
 a) make a copy of dynamic sprite which has original bg in it
 b) tint the copy
 c) paste the tinted copy to room background.
#22
Okay, my code changed a little and the results have changed a lot.

Time is passing the way I have intended (1 minute at a time when left to wait, 1 hour at a time when clicking on the Clock hotspot).

The screen is being tinted when time passes.  Unfortunately the screen is tinted WHENEVER time passes, so advancing the clock by one minute causes Time Of Day to change and thus the tint.  I suspect there's something wrong in the TimePasses function that is causing this.

Additionally, every time the tint changes, it seems to stack (like maybe the previous DynamicSprite isn't being removed before the new tint is added: the more time advances, the darker the screen gets).

I am currently ignoring the tint problems and trying to fix the issue where the Time Of Day advances every time Time Passes.

HEADER:
Code: ags
// new module header

#define MINUTES_PER_MINUTE 1 // in-game time is 10 times faster

enum TimeOfDay {
 eTODMorning = 0, eTODMidday = 1, eTODEvening = 2, eTODNight = 3
};

import void TimePasses(int minutes);

import int _minutes; //= 600;

SCRIPT:
Code: ags
// new module script

// game starts at 10:00 on day 1
int _minutes = 600;
export _minutes;
int _day = 1;
TimeOfDay _timeOfDay = eTODMorning;
export _timeOfDay;

// background tint stuff
DynamicSprite* bgSprite;
DrawingSurface *bgSurface;

void UpdateScreen() {
    // tint screen,  update label,  etc.
    // display time on label
    int hours = _minutes / 60;
    int minutes = _minutes % 60;
    lblTime.Text = String.Format("%02d:%02d", hours, minutes);
    Display("Displaying time on label.");
    
    // display TimeOfDay
    if (_timeOfDay == eTODMorning) {
      //TimeOfDay = eTODMorning;
      lblTimeOfDay.Text = String.Format("Day %d: Morning",  _day);
      //Tint characters & objects
      SetAmbientTint(64, 64, 0, 50, 75);
      //Tint room background
      bgSprite = DynamicSprite.CreateFromBackground(GetBackgroundFrame());
      bgSprite.Tint(64, 64, 0, 50, 75);
      bgSurface = Room.GetDrawingSurfaceForBackground();
      bgSurface.DrawImage(0, 0, bgSprite.Graphic);
      bgSurface.Release();
      bgSprite.Delete();
    }
    else if (_timeOfDay == eTODMidday) {
      //TimeOfDay = eTODMidday;
      lblTimeOfDay.Text = String.Format("Day %d: Mid-Day",  _day);
      //Tint characters & objects
      SetAmbientTint(0, 0, 0, 0, 100);
      //Tint room background
      bgSprite = DynamicSprite.CreateFromBackground(GetBackgroundFrame());
      bgSprite.Tint(0, 0, 0, 0, 100);
      bgSurface = Room.GetDrawingSurfaceForBackground();
      bgSurface.DrawImage(0, 0, bgSprite.Graphic);
      bgSurface.Release();
      bgSprite.Delete();
    }
    else if (_timeOfDay == eTODEvening) {
      //TimeOfDay = eTODEvening;
      lblTimeOfDay.Text = String.Format("Day %d: Evening",  _day);
      //Tint characters & objects
      SetAmbientTint(0, 0, 128, 50, 75);
      //Tint room background
      bgSprite = DynamicSprite.CreateFromBackground(GetBackgroundFrame());
      bgSprite.Tint(0, 0, 128, 50, 75);
      bgSurface = Room.GetDrawingSurfaceForBackground();
      bgSurface.DrawImage(0, 0, bgSprite.Graphic);
      bgSurface.Release();
      bgSprite.Delete();
    }
    else {
      //TimeOfDay = eTODNight;
      lblTimeOfDay.Text = String.Format("Day %d: Night",  _day);
      //Tint characters & objects
      SetAmbientTint(0, 0, 128, 75, 50);
      //Tint room background
      bgSprite = DynamicSprite.CreateFromBackground(GetBackgroundFrame());
      bgSprite.Tint(0, 0, 128, 75, 50);
      // Now copy it back to the background
      bgSurface = Room.GetDrawingSurfaceForBackground();
      bgSurface.DrawImage(0, 0, bgSprite.Graphic);
      // Clean up
      bgSurface.Release();
      bgSprite.Delete();
    }
    
}

void TimePasses(int minutes) {
  Display("Time passes.");
  _minutes += minutes; 
  // if end of day was reached
  if (_minutes >= 1440) {
    _minutes -= 1440;
    _day++;
  }
  UpdateScreen();
  
  TimeOfDay now = ((_minutes + 240) / 360) % 4;
  if (now != _timeOfDay) {
    _timeOfDay = now;
    UpdateScreen();
  }
}

function game_start() {
  //UpdateScreen();
}


int _frames;
function repeatedly_execute() {
    //Display("Repeatedly exceute.");  
    
    if (lblTime.Text == "") {
      UpdateScreen();
    }

    // increase by one
    _frames++;
    //Display("Frame increased.");
  
    // if a minute of IRL time has passed
    if (_frames >= GetGameSpeed() * 60) {
      _frames -= GetGameSpeed() * 60;
      TimePasses(MINUTES_PER_MINUTE); // advance game time
    }
}

EDIT:
I have to admit, I don't understand the math for calculating "now," so I'm having trouble figuring out whether or not that's part of the problem.
#23
Hi all,

The sticky thread mentions how to use a license like MIT for script modules, but I have questions about how to use it for game templates.

First, do game templates need to have a license included like script modules do? I assume so, but want to be sure.

And second, I remember a warning on the old AGS website that the default AGS fonts may be copyrighted. Is this still accurate? If so, do I mention this in the game template license, since the fonts are technically part of the game template? Or would the game template need to overwrite those fonts with CC0 or MIT-licensed fonts?

I'm hoping to release a game template soon, so I want to make sure I do it right (meaning, in a way that allows people to make whatever games they want with it, without accidentally using copyrighted material).

Thanks very much.
#24
No matter how you structure it: update the options.

- Do not show options that don't make sense, yet (e.g. the PC has not learned that he needs a screwdriver, don't enable the option to ask for a screwdriver)
- Hide options that are not needed anymore (the PC has already obtained a screwdriver, no need to talk about this any longer)

I hate it when games don't do this, it is so sloppy.
#25
Thanks a lot for sharing your experience!

You're right, it's not just about exact names but about how close things feel overall, and the risk of confusion. That's exactly why we're experimenting with alternative names and looks, even if it feels a bit sad to move away from the originals. Better safe than sorry if we want this project to survive.

Of course, we definitely do not intend to charge money for this project; it will remain a free, non-commercial open-source fan project.

For now we're still in the stage of gathering as much of the original FOY material as possible. Once we have everything together, we'll create a proper GDD and that will be the point where we can also make adjustments if needed, to be sure we're on the safe side.

The important part is keeping the spirit alive, even if some details need to shift.

Thanks again for the input!
#26
I think Snarky's answer says it best.
But I want to try and add onto it, by saying how I do things.

When starting a dialog tree, I think about all of the things that I want the main character to learn about, and then I make each of those things a dialog option.
For example, you go into a store, you might wonder what the name of the shop keeper is, what they sell in the store, whether or not they can help with the puzzle you're stuck on. So that would go something like this:
-Who are you?
-What do you sell here?
-Do you know anything about ancient cursed totems?
-Goodbye.

None of those options require knowledge from any of the other options. You don't need to know the shop keeper's name to ask about what they sell at the shop, and you don't need to know what they sell at the shop to ask about the puzzle you're stuck on, so it can all be said in any order. It's up to you as a writer to make sure that no inconsistencies pop-up regardless of the order.
But if something does require prior knowledge, then you have that dialog option unlocked after clicking the relevant options. As an example, the shop might sell guns, but you don't know that until you ask because they're hidden behind the counter, and you might want a dialog option asking to buy a gun, so naturally you'd unlock that dialog option after asking what they sell there.
-Who are you?
-What do you sell here?
--I'd like to buy one of your finest guns.
-Do you know anything about ancient cursed totems?
- Goodbye.

Then I just throw in a dialog option or two for either hints and/or lore building, and I'm done.
As for sub-dialogs. I usually leave those for when a conversation is getting too long, and I want to give the player some sort of control (no one wants to just sit there doing nothing, unless it's getting all emotional), in which case all of the options will lead to the same outcome, just in varying ways (Telltale style). But I also use sub-dialogs for when a more precise conversation is needed.
I'll give an example of both.

Let's say you click "Who are you?" and then the shop keeper starts giving you a long winded explanation about his family tree. That's when I'd give a sub-dialog as such:
-Wow, all I wanted to know was your name.
-That's very interesting, but back on subject.
-Sorry, I kind of zoned out there, could you repeat that?
All of which would give a slightly different response, but all result in the same outcome. That being the shop keeper shutting up about his family tree, and taking you back to the original dialogs.

Now let's say you click on the "Do you know about ancient cursed totems?" option, and the shop keeper asks what you want to know about them. That would be a good idea to give a sub-dialog full of all of the precise questions you want to know.
-What's a curse?
-What's a totem?
-What's considered ancient?
-I can't think of anything from the top of my head.

The trick is to keep things simple, and remember what the primary purpose of being able to interact with the NPC is for. I love a good story, but you're generally going to be clicking on an NPC to get answers to questions you have. In other words, they're basically there for hints (and background information). The more involved story parts, should usually (not always) be saved for cutscenes. No one is clicking on that shop keeper to start a long-winded conversation where both characters have grand revelations about life itself. You're clicking on that shop keeper because you either want to know who they are, what they sell, or if they can help you with the puzzle you're on.
#27
A couple things I learned from making a board game with a trademarked name, in case it's relevant:

-IP laws are unique in different parts of the world, so it's worth checking what's "too close" in any market you want to sell in

-It's less about exact VS non-exact copies and more about the potential for confusing your product with someone else's IP. So retaining the nickname "Indy" might be arguable in isolation, but combined with your sprites, setting, story, etc, is it meaningfully distinct?

-Trademark owners often have a legal requirement to challenge every attempt at infringement, simply because if one person gets away with it, everyone else can use their success as precedent for their own infringement. So the closer to the original IP you stay, the more you can expect a letter.

This all really starts to matter if you charge for the game or trademark part of it. Hopefully this helps!
#28
Why not Lara Jones, Raider of Uncharted Tombs from Indiana?  (laugh)
#29
I think it's a good idea, but you could go a bit further with renaming.

It could be Idaho James or Kentucky Lennox or whatever...
#30
Competitions & Activities / Re: Sprite Jam: Original mean...
Last post by cat - Yesterday at 13:51:12
I vote for jwalt.
SMF spam blocked by CleanTalk