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

Messages - tor.brandt

#41
AGS Games in Production / A Place In The Sun
Thu 01/12/2016 13:15:41

GAME IS RELEASED!!
(click link above to visit the game's release thread)


I'd like to present a game that I've been working on for the past couple of months:
A Place In The Sun


About the game:
A Place In The Sun is a short game (can be completed in 30-45 minutes, probably less for some) with a classical SCUMM-like interface.
You play the protagonist in his "quest" for just making some damn coffee to survive yet another night of overworking, while trying to handle his complaining ex-wife as well as bear the burden of bad conscience about a neglected daughter.


Some screenshots:










Development progress:
Story: 100%
Scripting: 99%
Graphics: 100%
SoundFX: 100%
Music: 100%

Expected completion: Sometime during December 2016


Development diary:

December 1st 2016:
I've had a handful of great testers trying out the game, and have made some improvements based on their feedback.
Right now I'm conversing with my music composer about the soundtrack, which is almost the only thing still missing.

December 4th 2016:
Almost done with the SFX design; only need a couple more sounds, and a little bit of editing.
Also did a little bit of additional scripting.
Now pretty much all still missing is the music track (and probably a little fine tuning here and there while I wait for the music).

December 15th 2016:
I've had one last tester try out the game, and made some great tweaks and finetunings based on the feedback.
Also, I've finished the SFX design, and I decided to throw together some music myself; I'm very satisfied with the overall result.
Now all that's left for me to do is play through the game some more times in the hopes of tracking down the (hopefully non-existing) remaining bugs.
I expect to release the game before the end of this week!

December 16th 2016:
After playing through the game a couple of times, I decided it was finally time to release.
The game is now available from the game entry page!
#42
Hmmm, I never thought of it that way, but it actually makes good sense.
It seems to work as long as I keep the walk sounds at very low priority, but I might end up removing them altogether just to be sure, since I will be having both a music track and an ambience track running throughout the game, and I wouldn't want any of them to stop accidentally.

Thanks for your help!
#43
Quote from: pakolmo on Sun 27/11/2016 23:37:53
No, it doen't work.

I think the problem is for using wait functions...

Code: AGS


Wait (400);


The mouse.Mode command WILL change the mouse mode if used correctly.
The wait command has nothing to do with the mouse mode as such, but while the wait is running the interface is disabled, including the cursor.

Could you post the script where you are attempting to change the mouse mode?
#44
Use
Code: ags
mouse.Mode = eModeWalk

where you replace "eModeWalk" with whivhever mode you want to switch to.
#45
Quote from: dayowlron on Sun 27/11/2016 21:20:37
This is just a guess...
What happens if you change the priority of that sound? Possibly it is playing the sounds from the walking and one of them starts to use the last channel available then when another sound comes in it unloads that sound. Try changing the line to:
  NightAmbience = aOutside_ambience.Play(eAudioPriorityHigh, eRepeat);

That actually worked, thanks!:-D
I still don't see WHY it did, though... As mentioned, it was only if I had assigned sounds to more than one frame in the left loop that the sound would stop.
AND it would only stop if I skipped the cutscene, but not if I let the cutscene run through.
AND there are no other sounds in the game yet, so even if the two walk sounds should overlap (which I don't think they do, because the sound clips are quite short), there should be at most three sounds playing simultaneously, whereas AGS has 8 channelse, so no matter the sounds' priorities, there should be no problem, right?

Anyway, I set my NightAmbience to very high priority, and the walk sounds to very low, and now it seems to work.

If anyone has an idea WHY this should be necessary, please share :-\
#46
So, in room 1 script I have:
Code: ags
function room_Load()
{
  NightAmbience = aOutside_ambience.Play(eAudioPriorityNormal, eRepeat);
  NightAmbience.Volume = 35;
}


NightAmbience is an AudioChannel* global variable.

First time room 1 is loaded, a cutscene starts (Cutscene1).
Cutscene1 ends with changing to room 2.

First time room 2 is loaded, another cutscene starts (Cutscene 2).
Cutscene2 ends in room 2.

In room 2 script I have:
Code: ags
function room_Load()
{
  NightAmbience.Volume = 10;
}


Now, if I let Cutscene2 run through on its own, NightAmbience keeps playing on a loop as it should, but if I SKIP Cutscene 2, the sound stops and is not resumed at any point.
If I skip Cutscene1, the sound keeps playing as it should - so there must be something going on with Cutscene2 specifically.
Both Cutscene1 and 2 are eSkipESCOnly, if that could weirdly have anything to do with it.

There is nothing in Cutscene 2 that should affect neither sounds nor the global variable NightAmbience.

Does anyone have an idea what could cause this problem?

EDIT: I've narrowed the problem somewhat down to something a bit weird...
The only other sounds in use in my game at the moment are two sounds that I associated with certain frames in my character's walk view.
I found that if I removed all the sounds from these frames, NightAmbience does NOT stop if I skip the cutscene.

I then tried adding the sounds to the walk frames one by one, and it seems that if the walk sounds are added to more than three frames, NightAmbience is stopped when skipping the cutscene.
I have four walk loops (up, down, left right), and if I e.g. add sound to two of the frames in the down loop and one of the frames in the left loop, there is no problem, but if I add sound to one more frame in the left loop, NightAmbience is stopped when skipping the cutscene.

Could this be some kind of audio channel problem? And why would it depend on how many of the walk frames have sound??

2nd EDIT: Actually, now I've narrowed it even more down.
It seems it's only if I add sound to more than one frame in my character's walk view's left loop.
This seems so weird! What could be the problem?
#47
Quote from: Crimson Wizard on Sun 27/11/2016 13:21:25
WAVs may be different. Some WAVs may even work as containers, having MP3 inside them.
I was working in a company that produced audio-editing software, and over few years we've met number of cases when certain WAVs did not play correctly in our program, or in the programs people tried to use alongside ours.

AGS is using very old sound library, which WAV support is outdated by many years. I believe that is why it cannot play some WAVs properly.

I see, thanks!
I'll just leave it at that then :-D
#48
Hmmm, you're right... :-D

I guess I was thinking that AGS would somehow compress the WAV files when building the EXE, but on second thought why would it? :-X

I tried now making a new export of my sound file in OGG, and that works fine too, so I guess I'll just go with high quality OGGs then.
I'm using Reaper because I'm not just coverting formats, but also editing the sound files, as well as creating them myself from scratch.

Still, just out of curiosity, I'd like to know why it won't play WAVs, as it should be a supported format...?
#49
I have this code:
Code: ags
function hHotspot_Interact()
{
  player.Say("Play sound.");
  aSound.Play(eAudioPriorityHigh, eOnce);
}


The sound file is imported to the Audio -> Sounds folder, and its script name is aSound.
This is the first sound file I use, so it can't be interferring with other sounds.
The Sounds folder is set to default volume 100, and aSound is set to volume -1.

The sound file plays fine in the editor, but when I run the game and perform the interaction with the hotspot, no sound is played.
The player.Say command runs fine, so the function IS called.

I have tried running game setup, and select both Default DirectSound Device and Default WaveOut Device, and then running the game.
If I select WaveOut, my speakers make a little click/pop when I start the game, but neither DirectSound nor WaveOut yield any sound.

What could be wrong?

EDIT: Okay, now I've learned the problem is related to the format of the audio file.
aSound is a WAV file. I tried importing an MP3 file, and that one works fine.
Still, I'd like to be able to use WAV files...
I tried importing the WAV file into Reaper (a sound editing application) and make a new export of it (in case there was something with the original format that made AGS unable to work with it), but it still won't play.
Any ideas?
#50
There is not one standard way of doing this, it is something you should put in your script.
If you are satisfied with keyboard movement a la King's Quest, you can simply use the "Default game" template when starting your game, since that template already has code for tap keyboard movement.

If you want "while key pressed" movement, you can either:

Use the module by Khris:
http://www.adventuregamestudio.co.uk/forums/index.php?topic=42843.0

Or the code by monkey424:
http://www.adventuregamestudio.co.uk/forums/index.php?topic=48167.msg636453360#msg636453360

These are just options found with a quick search of the forums - I think a more thorough search should yield a lot of other options as well, but one of the above should work just fine.
#51
Recruitment / Looking for testers
Wed 23/11/2016 13:12:23
I an nearing completion of the visual and scripting parts of a short game called "A place in the Sun" I've been working on for a couple of months.
Now I'd like to have some players test it, such as to spot eventual bugs, glitches, story Logic errors, etc., as well as give a bit of critique, before moving on to the sound design.

The genre is kind of comedy drama-ish, I guess.
I estimate the game can be played through in 15-30 minutes.
If you'd like to test the game, please reply to this thread or drop me a PM, then I'll send you a compiled copy of the game in its present state.

Thanks!
#52
Quote from: Danvzare on Mon 21/11/2016 11:44:18
Hmm, I can't quite see why it isn't working. If everything else is being displayed correctly, that should too. ???
Can I see the code you're using for the scroll buttons.

Thanks for your reply!

Actually, while I was copying the code for the scroll buttons, it suddenly struck me what I had done wrong.
I had this:
Code: ags
function repeatedly_execute_always() 
{
  if (invMain.TopItem > 0)
  {
    btnInvUpNA.Visible = false;
    btnInvUp.Visible = true;
  }
  else
  {
    btnInvUp.Visible = false;
    btnInvUpNA.Visible = true;
  }
  
  if ((invMain.TopItem == 0) && (invMain.ItemCount > 14))
  {
    btnInvDownNA.Visible = false;
    btnInvDown.Visible = true;
  }
  else
  {
    btnInvDown.Visible = false;
    btnInvDownNA.Visible = true;
  }
}


which I then replaced with this:
Code: ags
function repeatedly_execute_always() 
{
  if (invMain.TopItem > 0)
  {
    btnInvUpNA.Visible = false;
    btnInvUp.Visible = true;
  }
  else
  {
    btnInvUp.Visible = false;
    btnInvUpNA.Visible = true;
  }
  
  if (invMain.ItemCount > invMain.TopItem + 13)
  {
    btnInvDownNA.Visible = false;
    btnInvDown.Visible = true;
  }
  else
  {
    btnInvDownNA.Visible = true;
    btnInvDown.Visible = false;
  }
}


and now it's working as it should.

Don't know how I could overlook that total bummer (or what I was thinking when I wrote the original code)...
Thank you for helping me indirectly :-D
#53
I have an inventory window with height 46 and width 196.
Each item is set to have height 23 and width 28, such that there is room for two rows of 7 items at a time.
The sprites I use for the inventory items have height 22 and width 27, because I want there to be one pixel between each item.

I have scroll arrows to scroll the inventory window up and down.
The inventory window shows the first three rows of items without problems, but if the player has more than 21 items (I have 23 items total in my game at the moment), it doesn't make a fourth row.

I tried setting the item height (of the inventory window) much lower, and then it could show all the items (of course then they became overlapping).
I just thought that if the height was the problem, it should be a problem with three rows as well.
I don't understand why it becomes a problem at fourth row - and I don't understand why it's a problem at all, since the dimensions should fit ???

Any ideas what could cause this problem?
Let me know if you need to look at the code for the scroll buttons or something (don't know if that could be the cause of the problem?)...
Thanks!
#54
Okay, so just for the future interest of anyone wanting to do the same, here's what I ended up doing:

* Uncheck "Automatically walk to hotspots in Look mode" in General Settings.

* Specify WalkToPoint for each hotspot in each room in room editor.

* Make a custom number property called "propFaceDirection" that applies to both hotspots and objects.
propFaceDirection can then have the values 0, 1, 2, or 3 - corresponding to eDirectionDown, eDirectionLeft, eDirectionRight, and eDirectionUp.
For each hotspot and object, I then set its number to correspond to the direction I want the player to face when interacting with it.

* Make two custom number properties called "propOWalkX" and "propOWalkY" that apply to objects.
For each object I then set the propOWalkX value to the x-coordinate I want the player to walk to before interacting with it.
I set the propOWalkY to the corresponding y-coordinate.

* Then in my on_mouse_click function I put:
Code: ags
if (GetLocationType(mouse.x, mouse.y) == eLocationHotspot)
{
  Hotspot* h = Hotspot.GetAtScreenXY(mouse.x, mouse.y); //makes a pointer called "h" that points to the hotspot in question
  player.Walk(h.WalkToX, h.WalkToY, eBlock, eWalkableAreas); //gets the WalkToPoint coordinates for h, and walks the player there
  player.FaceDirection(h.GetProperty("propFaceDirection")); //gets the value from h's propFaceDirection property, and makes the player face that direction
  h.RunInteraction(mouse.Mode); //runs the function entered in the interaction function for h
}
if (GetLocationType(mouse.x, mouse.y) == eLocationObject)
{
  Object* o = Object.GetAtScreenXY(mouse.x, mouse.y);
  player.Walk(o.GetProperty("propOWalkX"), o.GetProperty("propOWalkY"), eBlock, eWalkableAreas); //gets the values from o's propOWalkX and -Y properties, and walks the player there
  player.FaceDirection(o.GetProperty("propFaceDirection"));
  o.RunInteraction(mouse.Mode);
}


You could of course do the same for characters, but then again you will probably want to make entirely custom functions for interactions with characters anyway...
Anyway, the above does the job, and thanks Retro Wolf for putting me on track about this :-D
#55
Oooh right, no, that was just me bring stupid.
I was thinking of putting the line in the unhandled event function, but yeah, if I put it in the mouse click function it should work for both handled and unhandled events :-D
#56
Quote from: Retro Wolf on Thu 17/11/2016 18:31:48
Turn off "automatically walk to hotspots" in general settings.
Then put this line of code before your face direction code.

Code: ags
player.Walk(h.WalkToX, h.WalkToY, eBlock);


EDIT:Use eBlock for .FaceDirection too.

Thanks!
But then I'll have to manually put the player.Walk command into all the handled event functions, right?
#57
For all handled hotspot/object event functions I specify a FaceDirection command as part of the function.

What I'd like is to make FaceDirection commands for all unhandled hotspot/object events.
I thought of making an int property for hotspots and objects, storing either 0, 1, 2, or 3 (i.e. I would have to specify a value 0-3 for each hotspot and object), and then put into the on_mouse_click function for hotspot interactions:
Code: ags
Hotspot* h = Hotspot.GetAtScreenXY(mouse.x, mouse.y);
player.FaceDirection(h.GetProperty("propDirection"));

and likewise for object interactions.

But then I realised that if I put the FaceDirection line before the ProcessClick line, then obviously the player faces the direction before he even walks to the hotspot WalkTo coordinates, whereas if I put the line after the ProcessClick line, he won't face the direction until after the unhandled event function has been carried out, which is too late. :~(

Is there some way to put the FaceDirection line "into" the ProcessClick line, such that the player first walks to the hotspot WalkTo coordinates, THEN faces the direction, and THEN carries out the rest of the unhandled event function?

Or is there another way to achieve the same result?

All suggestions appreciated!
#58
Thanks for the replies!

I'll check those things when I get home.
And yeah, it would be nice if the timers could be inherently named, although I guess it would be fairly easy to name the timers in some custom way...
#59
I have this code in my room script:
Code: ags
function room_FirstLoad()
{
  SetTimer(2, 100);
}

function room_RepExec()
{
  if (IsTimerExpired(2))
  {
    cSoundEffects.SayBackground("RIIING RIIING");
  }
}


If I change "2" to "1" (i.e. if I use timer ID 1 instead of ID 2, it doesn't work.
What could be the cause of this?

PS. I'm using a couple of modules I didn't write myself, but I've searched through them and they have no instances of "timer", so I take it they are not occupying timer 1 for some other purpose...
#60
Quote from: Crimson Wizard on Wed 16/11/2016 08:14:40
If you are using AGS 3.4.0, the dialog options API changed there. To make the old one work you need to enable "Use old style custom dialog options API" option in Backwards compatibility section.

Ahhh, I see, that explains it.
Thank you!
SMF spam blocked by CleanTalk