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

#41
Quote from: TheFrighter on Wed 01/04/2020 08:21:08
Horray! The good old Fatman is back!  (laugh)

https://www.adventuregamestudio.co.uk/site/games/game/323-adventures-of-fatman-the/

_

Oh my god!
That's so funny!
I didn't even know that game existed!  (laugh)
Gotta check it out later!
#42
No hard feelings ;)

Yeah, a pre-deadline seems a great idea for me!
I'm a very last-minute kind of person, that might get me into trouble sometimes  (roll)
#43
Quote from: Crimson Wizard on Wed 01/04/2020 09:38:19
I'd like to note: everyone has something he or she is more comfortable with, but when we develop a game engine and tools we choose to rely on the known best practices,
It's not only for being more comfortable, I genuinely think it helps to do better audio mixing live in the game.
I doubt that people who are not even able to set a proper volume regulation will be able to do any of the audio assimilation techniques mentioned above.
And I believe there are a lot of private people as well who use AGS to create games, who do not have the same approach as big game companies with an entire team to create games.

So if the suggestion comes up multiple times, of course only then then it might be worth considering to add it.
Not just for me.
I might be off in my assumption on if other people would also find this function useful, but the backlash I had for merely making a suggestion (that would be very useful to me and improve my audio mixing personally), is completely inappropriate and ridiculous.
At least you want to encourage people to say what they think. You can still decide afterwards if it's a bad idea or not, without making a fuss about it.

Thanks for the illustrations, that makes it clearer.
Of course I understand why the clipping could be a potential danger for adding a volume increase function.
Let me know if you have more insights on the DrawingSurface function, Crimson Wizard. There is so much cool stuff you can do with it, if there is a way to fix this.
#44
You do not need a volume unit meter obviously, and that would be a terrible and artificial way to adjust your audio.

The most intuitive way is to experience the game live with the audio.
That's when you can decide best where sounds should be louder, more quiet, when it's all mixed together and happening with all the influences of the game in real time.

When you create your game, it might be an organic process. You don't know yet how much audio you will add.
It's impossible to adjust all the audio volume beforehand.
And editing, re-importing an audio because you cannot make it louder, that is not really a beautiful solution.

That people will misuse it cannot be a serious argument you give?
If people want to mess their games up, the volume might be the least of their problems. Should we maybe remove the volume regulator to to turn the audio volume down as well? Because some people turn the volume too low?
Then we could go as far as to remove all audio functionality in AGS because some people do not add their audio properly and mess it up.

Anyways, having a volume up functionality would be way more comfortable and intuitive.
I still think that.
#45
Aay, I realized there is a major bug once you reach room 4! The entire game breaks down!
Only happens when you play through from beginning, that's why I didn't see it.
Did a quick fix:

outdated link
#46
Both sprites I used have been imported from png.

The surface was created from a dynamic sprite, which itself was created from a normal game sprite.

The sprites I use have a transparent background, simply put.
So when I create one sprite as the drawing surface, obviously there are transparent parts in it.

I just use the simple Draw command, just as I mentioned in the first comment:
My drawingsurface is called Basesurface:

Basesurface.DrawImage(300, 300, 22);

300,300 off set.

No complicated parameters.


So, it only recognizes 100 % Transparency, or 0 %.
When I set the parameters:

Basesurface.DrawImage(300, 300, 22, 99);

The entire area that is not 100% transparent in the original sprite becomes pink, because the alpha channel is not differentiated.

Notice that there is no problem whatsoever with it when I draw a surface with the ID 22 sprite as image unto that previous Basesurface.
The halftransparent parts of the original sprite are beautifully depicted without problem that way.
#47
Sorry, I realized that it already had been mentioned what I wrote.
#48
Quote from: TheManInBoots on Tue 17/03/2020 15:22:59
Yeah, I can imagine it's too much work for what you're trying to do.
Btw. you could trick your way around not being able to click a transparent button, by having one pixel drawn on the original empty sprite (that you use the method Crimson Wizard suggested) with 0.1 opacity/transparency for that one pixel in the image editor you use, and the rest transparent. It's a little bit under the table advice, but in case nothing else works...

Just for correction of what I wrote above:
One can click a button with a completely transparent sprite. As long as one has text written in the button text field, it works. And the text dissappears automatically anyways as soon as one adds a background image to the button.
So I wouldn't advice what I wrote in the quote anymore, and transparent buttons are perfectly possible.
#49
Pogwizd,

if the problem finally was something else other than the walkable area, feel free to share.

Btw., possibly two great strategies for debugging a complicated script are Narrowing Down and Interactive templates.

In your example Narrowing down would mean for example that you focus first on making the pattern work with only two regions.
Get the pattern recognized with two patterns (so 1-2-1 and 2-1-2).
Once everything works you add a third region and make it work, and so on. Step by step.
You could also remove variables like "listHasBeenRead" or "TableHasWalkedAroundThreeTimes", I think you called it, to begin with.

And only once it all works, you add the variables back.
This way you know much better where the problem lies, and you can focus on a small part of the script.

With interactive templates I mean for example next to the labels that you created to track the variables behavior, you add buttons that represent the region.
So whenever you press the button, the correspondent region function is triggered, and you can exactly track the behavior and see how the region functions and variables respond with the labels. You're more in control and way more focused.
#50
Might be both Engine or Editor related, I'll just post it here:

1) This might be long overdue, I'm sure it has been suggested before, but you cannot make audio files louder.
You can only adjust the volume lower. And that is very impractical.
If you have a single audio that is too quiet, you're in for a lot of trouble.
That's a function that would be quite useful.

2) In the Drawing Surface Manipulation I noticed that when you draw a sprite unto the Drawingsurface (using the DrawImage function) the Alphachannels are not properly imported and drawn unto a transparent drawing surface background. The outlines of the transitioning alpha show pink pixels. (And the original png file did not have a pink background at all btw).
The alternative to draw Drawing Surfaces unto Drawing Surfaces also is only very limited because you cannot choose the coordinate where to draw the surface unto. Nor stretch it.
So here the suggestion is to improve Alphachannels for the DrawImage  function and add coordinates and width/height regulation for the DrawSurface function, because their uses are too limited at the moment.
#51
FATMAN-The Survival tale of Jim Woods
Just did this merely for fun.
#52
For the competition I fixed the bugs and that's all in case you didn't notice.

I posted the last link (which is a game profile on the web site in case you didn't notice) after the last day of voting so that people can play a better version of the game in case they want.

I keep working on it for my own pleasure, not for the competition.

So, just to be clear, I only fixed the bugs before the voting deadline (which was evening of March 17 if I remember well), so that the game was playable to the end.

And the latest post, which was after the voting deadline, was just as a notification for the latest link, where people will get updates on any other upgrades of the game.
So, as far as I understood, we're good, aren't we?
#53
Okay, my game's uploading, soon to be seen here:

outdated link
#54
Quote from: Pogwizd on Thu 26/03/2020 15:21:54
Personally, I don’t think that my first message was too long
Oh yes, I don't want to be misunderstood. I don't think your post was too long either, just too long for me to run a proper bug test through it.
That's obviously totally fine if you add a lot of details to it.
Good luck with solving it
#55
Quote from: Retro Wolf on Thu 26/03/2020 08:53:14
It can sometimes take a while for people to reply to a thread because people live in different parts of the world and could be in bed. Also the original post is nowhere near "too long".
Well yeah, that too.

At least for me personally it takes a while to work myself into a long script like the one Pogwizd showed and then find the bug. Especially if it's not an obvious bug one might have to recreate it and test it out. That's what I meant when I said it might be too long and not all people might have the time to do it.
#56
I assume people are hesitant to reply to your thread because it is a lot to read through.
I do not have the time to find out where your scripting problem is, your post is too long.
Maybe you have to take into account that the player can walk onto the same region TWICE, and that messes up the process? (you could avoid that by adding a variable that keeps track if the player walks twice on the same region)
Tbh I actually got carried away by the problem and I had some fun thinking about it, and I will show you how I would script the entire thing you wrote, but in no more than 24 lines and in only one single function :P:

The finished result is in the end, I explained it step by step, in case you wanted to understand what I wrote:
(Note: my variable 'step' corresponds to your 'numberoftrues' and my variable 'plan' corresponds to your 'pathselected')

So first I would create the regions as the first 4 regions of the room, so that their ID numbers correspond (so that their IDs are 1,2,3,4).

Then I would have one int variable "step" that describes on which step you're on
(when step==1 you stepped on the first random region, when step==2 you are on the second random region etc.)

After that I would create  a variable "plan" that describes which number plan you follow.
Because we have 4 different plans:
Plan 1:1,2,3,4,1
Plan 2:2,3,4,1,2
Plan 3:3,4,1,2,3
Plan 4:4,1,2,3,4

So when the player walks on the first region, the variable "plan" is set accordingly
(e.g. player walks on region1 => plan=1;
player walks on region2 => plan=2;)

So to turn it into script, in the region walks onto function you'd write:

Code: ags
function region1_WalksOnto()
{
function region1_WalksOnto()
{
step  ;//step variable grows by one when walking onto the region, so if it was the first step, now step==1
if(step==1)plan=region[1].ID;//so if this is the first step, the plan number becomes the region number (if region==1, plan=1, if region==2, then plan=2 etc.)
}
}



You will use the same pattern for all four region functions.
So whenever the player walks onto a region, step grows by 1, and we now we are on the next step.
So now we have to figure out what happens when it's NOT step one but step 2-5 when the player walks onto region 1.
If we are doing the second step==2, than the plan has to b plan 4, when standing on region 1:
Plan 4:4,1,2,3,4
If it's not plan 4, then the pattern is broken, and the whole thing restarts, by simply resetting "step" and "plan" and setting both variables to 0.

So we add to the function
Code: ags

function region1_WalksOnto()
{
step  ;
if(step==1)plan=region[1].ID;

if(step==2&&plan!=4)
{step=0;
plan=0;}
}
}


And then we do that for the rest of the steps, giving us this function:
Spoiler

Code: ags

function region1_WalksOnto()
{
step  ;
if(step==1)plan=region[1].ID;

if(step==2&&plan!=4)
{step=0;
plan=0;}
if(step==3&&plan!=3)
{step=0;
plan=0;}
if(step==4&&plan!=2)
{step=0;
plan=0;}
}

[close]

If step==5 then you want to trigger the 'Succesevent' if it's the correct plan, and else reset the entire pattern.
When correctly following the pattern, the last region is the same as the first, so if the player started on region 1 and started plan 1, now he has to be standing on region 1 again, so we add below the rest:
Code: ags

if(step==5&&plan==region[1].ID)
{player.Say("I can't believe it, I did it!");}
else if(step==5)
{step=0;
plan=0;}


Giving us the full function:
Spoiler

Code: ags

function region1_WalksOnto()
{
step  ;
if(step==1)plan=region[1].ID;

if(step==2&&plan!=4)
{step=0;
plan=0;}
if(step==3&&plan!=3)
{step=0;
plan=0;}
if(step==4&&plan!=2)
{step=0;
plan=0;}
if(step==5&&plan==region[1].ID)
{player.Say("I can't believe it, I did it!");}
else if(step==5)
{step=0;
plan=0;}
}

[close]

And then we need to do that for every other function us well, and adjust the other numbers as well.

Now, how can you write all that in only one single function?
Let's check out the exact numbers for all functions:

For region one, we said, if step==2, then the plan must be plan 4, if step==3, then plan must be plan 3, if step==4, then plan must be plan 2.

For clarity, here I write it as a diagram:
Region 1:
2-4
3-3
4-2

And those are the diagrams for the other regions:
Region 2:
2-1
3-4
4-3

Region 3:
2-2
3-1
4-4

Region 4:
2-3
3-2
4-1

So if you watch those diagrams exactly, you can notice that there is a certain pattern. The right row has the 1,2,3,4 in reverse, while rotating down one digit for each region and beginning at 1 again after 4.

So we can write that in a function. The variable 'requiredplan' describes the plan that each step needs for each region for it to work:
And if you look at the diagrams and look how to calculate it, you get this:

Code: ags
requiredplan=region[].ID 1-step;//I wrote region[].ID PLUS 1-step
if(requiredplan<1)requiredplan=4-requiredplan;


So notice that I added the if(requiredplan<1) or if(requiredplan<=0) function.
That is so that the rotation of the numbers begins back at 4.

So now you can simply write

Code: ags

int requiredplan;
requiredplan=region[1].ID 1-step;//I wrote region[1].ID PLUS 1-step
if(requiredplan<1)requiredplan=4-requiredplan;

if(plan!=requiredplan)
{step=0;
plan=0;}

And that works for all steps, so you don't need to write a separate if condition for steps 2,3 and 4 anymore.

So checkpoint!, the entire function now would look like this:
Spoiler

Code: ags

int step;
int plan;
function region1_WalksOnto()
{
step  ;
if(step==1)plan=region[1].ID;

int requiredplan;
requiredplan=region[1].ID 1-step;
if(requiredplan<1)requiredplan=4-requiredplan;

if(plan!=requiredplan)
{step=0;
plan=0;}

if(step==5&&plan==region[1].ID)
{player.Say("I can't believe it, I did it!");}
else if(step==5)
{step=0;
plan=0;}
}

[close]

But now, you still have a function for each region. How to you bring all the 4 region function into 1 single function?
By simply letting the function recognize on which region the player character stands, and then run the same function for all 4 regions.
In order to get the current region ID, you need a Region pointer.
You write:

Code: ags
Region*CurrentRegion;
CurrentRegion=Region.GetAtRoomXY(cJim.x, cJim.y);
int RegionID=CurrentRegion.ID;


So then you implement that in the initial function:
Code: ags

function region1_WalksOnto()
{
step  ;
if(step==1)plan=RegionID;
}


And then the entire, FINAL function would look like this:
Code: ags

int step;
int plan;
function AllFourRegions_WalksOnto()
{
step  ;
Region*CurrentRegion;
CurrentRegion=Region.GetAtRoomXY(cJim.x, cJim.y);
int RegionID=CurrentRegion.ID;

if(step==1)plan=RegionID;

int requiredplan;
requiredplan=RegionID 1-step;//I wrote RegionID PLUS 1-step
if(requiredplan<1)requiredplan=4-requiredplan;

if(plan!=requiredplan)
{step=0;
plan=0;}

if(step==5&&plan==RegionID)
{player.Say("I can't believe it, I did it!");}
else if(step==5)
{step=0;
plan=0;}
}


Now you can use that same universal function for every region.
Notice I changed the name of the function to "AllFourRegions_WalksOnto()"
Because what you can do now, in the room editor, for every function, before clicking on the ellipse "..." button for the WalksOnto function in the Eventspanel, you change that name to "AllFourRegions_WalksOnto". And this way every single region is going to be directed directly to that function, and you don't have to write every function separately for every region anymore.


P.S.: If you already have other regions in the room and do not want to delete them to make the four regions IDs 1,2,3,4, you can simply add a substraction to the formula so that it still works. As long as the region ID's are in a continuous row.
#57
I'm curious to see what fun riddles you'll create this time, Jackputter!  :)
#58
Quote from: ManicMatt on Mon 23/03/2020 15:36:33
Quote from: Slasher on Mon 23/03/2020 13:56:06
The Tween Module is a 'must have' for practically all games...

Unless you know something I don't, I wouldn't assume they have Tween installed. Especially if they need help with making a black screen, I think tweening is too advanced for them as it's very code intensive and wouldn't recommend it to anyone starting out or not very good with coding, like myself! Haha.
I'm really glad that there are some people with a healthy common sense.
That's very valuable advice you give ManicMatt: Be aware on what level of knowledge people are on, to best help them!
#59
Quote from: blur on Tue 24/03/2020 13:16:25
you knew why the concierge gave you a discount for this room.
lol
#60
Quote from: HanaIndiana on Mon 23/03/2020 16:06:48
It's funny, this theme seems to lend itself to non-adventure games. I think we may have a few this month.
Ooh, somehow I can't help myself but believe to hear in what you're saying, that you are also creating something a little bit "out of the box" this month.
Awesome!
I was recently experimenting with pixel perfect collision detection to do something a bit different from the usual Adv.-game. It works a bit slow tho, the perfect collision det. :P
SMF spam blocked by CleanTalk