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

#1
Recently finished a project for a client.
Original game had real photos as character faces, which are replaced with 2D drawings for a public release.


Your Dad has lost his important Red hat, help him find it for his show!
It's a short adventure game, less than 30 minutes, can probably finish in 5 if you know what to do.

Supported languages: English, Georgian.

Link: https://tarnos12.itch.io/red-dad-redemption

Making the post so I can put it into game database as it's one of the links it asks for :D
#2
Hello,

I am trying to import a Georgian font which from what I've read is "Cyrrilic" font that should be supported by ttf(256 max characters)
But when I import any of the fonts I found so far, they are not usable(sometimes some of the characters look good, but most of them are squares or some other weird characters)

This is the font I tried just now:
https://fonts.google.com/selection?query=Georgian&lang=ka_Geor&script=Geor

Those are the results:(from some of the fonts)
https://gyazo.com/6c5928a68b4bda4d0b56e4edb66a5d20

The game by default is set to use UTF-8 for Text.

What am I missing and how can I import the font properly?

This is meant to be used with in game translation where I can change the game language from English to Georgian.
But if it's necessary I am fine with making a separate build for each language.

Thanks!
#3
Hello,


This is a recent game that Jermaine and I have worked on.
It comes with higher quality art/animations compared to previous game as well as Voice Acting!

I did programming/AGS work.
Jermaine did everything else(art/music/animations/design etc)

Jermaine forum profile: Jermaine_GameDev

Game link: https://jermaine-mcgee.itch.io/big-trouble-in-little-river
Database link: https://www.adventuregamestudio.co.uk/site/games/game/2822/

This game is also with Karina as the main character, this time her car got stolen :D
(Seriously what's going on with her car issues!)

Follow Karina story as you try to uncover the truth behind her stolen car as well as some other secrets!
#4
Completed Game Announcements / Painted Hills
Sun 19/01/2025 22:52:52
Hello,


Jermaine and myself have worked on this game about 2 years ago.

I did all the programming/AGS work and Jermaine did everything else including design/art/sound/music etc.

Jermaine forum profile: Jermaine_GameDev

Game link: https://jermaine-mcgee.itch.io/painted-hills
Database link: https://www.adventuregamestudio.co.uk/site/games/game/2701-painted-hills/

The game is about Karina and her broken car, help her fix the car so she can leave the town :)
#5
Hey,

I've been trying different things, but all came down to keeping track of an integer which goes up as you do things related to the story.
This number then can be used in your dialog(and other places) to change characters dialogs based on how far the story has progressed etc.

Recently I've made a small module that keeps track of multiple numbers and I am using an enum to represent those numbers.
This allows me to do:
Code: ags

enum StoryProgression
{
    eStory_Hallway = 1,//start at 1, because the "default" story uses index 0
    eStory_Drawer,
    eStory_KitchenSink,
    eStory_John
}
StoryProgress.SetId(1);//default story with index "0"
StoryProgress.SetId(1, eStory_Hallway);// Set hallway scene/story to ID 1.


Code: ags

//John Dialog
if(StoryProgress.GetId() == 1)
{
 cJohn.Say("The game just started");
}
else if(StoryProgress.GetId() == 2)
{
   if(StoryProgress.GetId(eStory_Hallway) == 2)
  {
    //Hallway story is 2 and general story is 2.
    cJohn.Say("Talked to the John, progressed the story, hallway story allowed this conversation to happen");
    StoryProgress.SetId(3);//general story is 3
  }
  else
  {
     cJhon.Say("Go to hallway and do your thing");
  }
}

//Dialog in a hallway, like interacting with a Vase or something
if(StoryProgress.GetId(eStory_Hallway) == 1)
{
  cPlayer.AddInventory(iVaseKey);
  cPlayer.Say("Found hidden Key behind the Vase");
  StoryProgress.SetId(2, eStory_Hallway);//progress the story, so you can't obtain the key multiple times 
}
else if(StoryProgress.GetId(eStory_Hallway) == 2)
{
  cPlayer.Say("Nothing to find here, already got the key");
}


Unfortunately this gets harder with larger story and more pieces.
So my next idea is to use enums for the story ID as well.
So instead of following the number, I can use the name.

If you click on the door at the start of the game it will do certain thing/character will say something specific, but when you do it again later in the story, the door might just open and/or character say something new and other things may happen.
I don't want to write multiple if statements to check the conditions, the idea of using the story ID is to not think about conditions such as having an inventory item or being in a correct room or having talked to Peter, after eating the breakfast, taking a nap and the game being on Day 5.
This could be achieved with some numbers(or enums if the story gets too complicated and you can't keep up with the numbers)

This is used together with a script that is executed each time a story Id is changed, so you can change the state of characters/world when you reach certain story point.

What kind of systems do you use in your games?
How do you change the state of various objects/characters in the game?

EDIT:I should add that one of the ways of simplifying it is to use the general story ID as a way to separate the game into Chapters which helps, but the issue is that some characters/objects won't change their dialogs with a new chapter, so you either have to duplicate the dialog or not use chapters for those special cases.

This comes down to this:
1) Too many numbers for every little thing that keeps track of the state of the game("main quest") and optional stuff("side quests")
2) Use enums/strings instead of numbers so it's less arbitrary and has some meaning?
3) Other solutions? A way to make a character say different things based on multiple conditions without actually writing down those conditions in a big if statement?
#6
Hello,

I came to the forums to seek some help regarding code design in ags.

My goal is to take advantage of built in events to setup my own event system in order to create modules.
The idea of a module as far as I know is to make it easy to copy paste to a new project since it should work on it's own(unless it has a dependency)
The module itself should not be dependent on the "user script".

For example if my module has a property
Code: ags
.isReady = true;
user script should NEVER set the value directly like
Code: ags
.isReady = false;

This destroys the purpose of a module.
The module itself should set the property to true/false after some conditions are met(usually 1 frame passes, so on next update)
At least in case we want to make custom event system for the module.
There are cases where we want user to change the state of a module with functions etc.(but this make it so module can be used in 1 place only usually)
The event system allows 10 different scripts to use
Code: ags
.isReady
and on the next frame it will automatically turn itself off(set to false) and no other script needs to worry about it.

Here is my example(I cut extra code) for input and movement scripts:

Code: ags

// Input script

function repeatedly_execute()
{
  if(mouse.IsButtonDown(eMouseLeft))// mouse is down
  {
     input.wasMouseDown= true;
  }
  else if(input.wasMouseDown)// mouse is not longer held down, but it was down last time(so a click happened)
  {
     input.wasMouseDown = false;
     input.isClickReady = true;
  }
}

function repeatedly_execute_always()
{
  if(input.isClickReady) inputManager.isClickReady = false;
}


Code: ags

// Movement script

function repeatedly_execute()
{
  if(input.isClickReady) HandleMovement();//prevents movement if GUI is visible.(Important)
}


Code: ags

/// global script

function gOverlay_OnClick(GUI *theGui, MouseButton button)
{
	gOverlay.Visibility = false;
}



Order of execution in ags is as follows(doesn't include everything, only the relevant bits)
rep_exec_always > late_rep_exec_always > rep_exec > gui events
This means my code executes in this order:(on mouse click, those event fire regardless, but the results will be different if I dont click the mouse.(like gui event wont fire, since its an onclick event)


  • input rep_exec_always(nothing happens)
  • movement rep_exec_always(nothing happens)
  • input.wasMouseDown = true(rep_exec)
  • gui click
  • input rep_exec_always(nothing happens)
  • movement rep_exec_always(nothing happens)
  • input.isClickReady = true(rep_exec)
  • HandleMovement(rep_exec)
  • input.isClickReady = false;(rep_exec_always)
  • movement rep_exec_always(nothing happens)

Once again to clarify where the issue is and how I fixed it(dirty fix imo, I'd rather not rely on it)
The order of execution is as follows = input rep_exec(1st phase) > movement script rep_exec(nothing happens yet) > gui click(gui becomes invisible) > input rep_exec_always(nothing happens) > input rep_exec(2nd phase, click happens) > movement script rep_exec(click happens, gui is not visible so we are are "ignoring" the gui click and the code assumes that there is no GUI in front of the mouse which allows character to move towards clicked location(not what I want)

The idea is that `input.isClickReady` is set to `true` for 1 frame, then on next game loop it will be set to `false` so other scripts won't execute twice for 1 mouse click.

My current "fix" is to call
Code: ags
input.Clear();
on GUI Click which basically sets all properties to false meaning no input/movement/interactions happen.
This is needed for this specific gui click, it wouldn't be a problem if the click happened before rep_exec this way my movement script would be aware that the GUI is under the mouse.


I am looking for ideas, how to improve this and overall how to write better code and modules.
What kind of solutions do you use in your code?
#7
Hey,

Anyone who wants to, feel free to share your editor layout.
I am curious to see how everyone else is working on the code.
Where do you put all the windows etc and perhaps your editor theme(I guess most of the people are either using default or the dark theme, but maybe there are more?)

Here is mine:(I will release this module once it's complete in few days probably)
https://i.gyazo.com/2b8bf4a264d26feff7d79067bbcd7cae.png

I just started using "Notes" script to keep track of important variables that I work with in the current module(probably a better idea to use dialog if there is a way to remove the "options" on the left side since you can edit it at runtime)

For a long time I actually had the "Explore Project" on the far right for some reason...Just moved it to the left side recently so my code is more centered.
#8
Hello,

I am trying to achieve a "window" effect using a mask.

Anything "outside" a window should be transparent(sprite not visible, but room and other objects should still appear)
I am using DynamicSprite.Create attached to GUI as a drawing surface.

The window will move together with few other sprites(all of them have to be "masked" by the "window".

An example:
https://i.gyazo.com/7ea0268d3ca725087637efa1b0e38ce7.mp4

The horizontal black line is the "edge" of the viewport(so anything above it is not visible)
The red border box is a "mask"/window(I guess that a mask is everything around it, not sure how that works exactly hence why I am here) that moves(so half of the background is actually inside a room at the start viewport, just hidden beneath the mask, until the mask moves down as you can see on the video)
So, all parts move together at various speed.

I am using Tween Module for the x/y values, but everything is being drawn inside repeatedly_execute_always()
SMF spam blocked by CleanTalk