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

#1
I also offer my help with storyline/puzzles, I have the complete (Italian) dvd collection so I can actually rip-off the entire series plot/scripts if you want to replicate the best episodes.

There is a wide pool of possibilities... like... choose an episode and choose to be one of the main characters involved in the plot and see the same episode from different point of views (Picard role or Troy role or Data...) i.e.

Just PM or email me
#2
I came up with someting that works fine (at least in theory).

I explain:

My project takes place on a virtual grid that has 300 sectors, from 1 to 300.

In each one of theese sectors you can perform a variety of actions (simple or queued) by clicking on them with the appropriate cursor mode/image, carried on by npcs (one or more). Something like popolous, powermonger or sim city...

I have a routine that constantly checks wich sector the player interact with by passing its id# to a global, from top left to bottom right (1 -> 300).

So 255 means a general action performed on sector 255, and so on...

The problem I had was that ags 'performed' the actions in the order in wich it checks the sectors and NOT in the order the player clicks them.

I thought about a correct way to explain ags that it has to follow the order decided by the player, but this morning I realized the following (not in details):

I need an actions struct to have several related varibles/strings/functions.

I need an array for storing actions.

I need a Queuing function that queue clicks into this array.

I need an Execute function that execute the oldest click.

I need a Check function that check if the action has finished and refresh things.

With theese things working as a team I will solve the problem.

Since I can explain this to myself I will surely can explain it to ags.

Thank you Khris for your (usual and appreciated) interest.
#3
I'm looking for something like:

go there(1), do this animation(1a), call this function(1b) then go there (2), call this function(2a), do this action(2b) and then go there (3).

In this exact order.

For today I came up with something like:
When phases 1 2 3 are true, phase 1 comes before, then 2 and then last 3
But I wanted them to be 2, 1, 3 (the order in wich I clicked them)

Or more precisely I obtained:
2, 1, 1a, 1b, 2a, 3

because I have a loop that checks conditions from 0 to 300 and execute them in that order despite me clicking 255, 121, 65, 300

It result always in doing
go to 255, then go to 65 and execute, go to 121 and execute, go to 255 (again) and execute and finally go to 300 and execute...

I'm triyng to figure out how to explain AGS that click #255 comes before #121 just because i clicked them in that order (and after the functions are finished, clear my inputs from storage).

EDIT: with blocking functions I will obtain this, but just because I can select functions just one at a time, I would like to be able to select multiple of them (while selected are running or by make them run with a run button, it doesn't really matter, but I prefer the real time instead of turn based in making this)

The actions we are talking about are mostly walk there and draw dynamic sprite, or check that parameter and draw a dynamic sprite, mostly...
#4
Hi everyone,

I would like to know if there is a way to 'store' actions in a chronological sequence (the sequence the player input them) and than have the character execute them in the same order, possibly in a non blocking way.

Thanks in advance.

#5
Quote from: NickyNyce on Mon 05/03/2012 15:12:25
Also...you have a typo with SetIdelView.

It's "SetIdleView" ;)

Cheers :)
#6
Hmmm...

I also had troubles re-setting the same timer that has just expired in the IsTimerExpired call, so you can have an easy workaround with this:

Code: ags


int time = 0; //in the Room_Load function so the time will be set to 0 each time you enter the room

//It's not a bad idea also to set the normal cSabine view each time you enter the room
//just in case you leave the room while cSabine is animating...

function room_RepExec()
{
  time++;
  if(time > 450)
  {    
    if(!cSabine.Animating && Sabine_first_anim == true) //The first animation has played
     {
      cSabine.Animate(0, 0, eOnce, eNoBlock, eForwards);
      Sabine_played = true;
      }
    
     if(!cSabine.Animating && Sabine_first_anim == false && time) //The first animation hasn't played
    {
     cSabine.LockView(VSABINE);
     cSabine.Animate(1, 0, eOnce, eNoBlock, eForwards);
     Sabine_first_anim = true;
    }
    
   if(!cSabine.Animating && Sabine_first_anim == true && Sabine_played == true)// Both animation have played
     {
      Sabine_first_anim = false;
      Sabine_played = false;
      time = 0;
      cSabine.UnlockView(); //if UnlockView doesn't work for some reason just replace with cSabine.LockView(the_normal_view)
     }
  }

}



Maybe this is better.

Let us know

Cheers
#7
Hi WHAM,

first of all, congrats, it's a very addicting game.
I always loved this kind of games and your make no exception.

I have faced a bug that crashes the game:

I selected the maximum amount of loan and North America as starting region.
I hired a staff member (this occur with every kind, agents, technicians, researchers and so on..)
The 'team member ready to operate' gui popped up, then I pressed spacebar, and then:



Cheers.
#8
I think that this is your main problem

Quote from: Caracal on Sun 04/03/2012 18:38:59

cSabine.Animate(1, 0, eOnce, eBlock, eForwards);


but if you insert the eNoBlock AGS will play the second animation in the same loop so you will actually see only the second animation.

Try something like this, you need two booleans and you need to check if your cSabine isn't actually animating before starting a new animation loop:

bool Sabine_first_anim = false;
bool Sabine_played = false;

Since you need them only in the current room you can insert them at the top of the room script (instead of the global variables panel)

Code: ags

function room_RepExec()
{
  if (IsTimerExpired(1)){
    if(!cSabine.Animating && Sabine_first_anim == true) //The first animation has played
    {
     cSabine.Animate(0, 0, eOnce, eNoBlock, eForwards);
     Sabine_played = true;
     }
    
    if(!cSabine.Animating && Sabine_first_anim == false) //The first animation hasn't played
     cSabine.LockView(VSABINE);
     cSabine.Animate(1, 0, eOnce, eNoBlock, eForwards);
     Sabine_first_anim = true
    }
    
   if(Sabine_first_anim == true && Sabine_played == true)// Both animation have played
     {
      SetTimer(1, 450);
      Sabine_first_anim = false;
      Sabine_played = false;
      cSabine.UnlockView();
     }
   }
}



I didn't tested it but this should do.

Another hint I cand lend you is to envelop those line in a function outside the room repeatedly execute and make a function call inside repeatedly execute, so your functions won't become to messy ;)

Let us know

Cheers
#9
Hi everyone,
I am really close to a demo release, but there is a question that popped up in my mind:

Since the demo release will be in Italian, is there someone who can actually play it (here around)?

Otherwise I will include an ENG translation (that I have yet to do) BEFORE the release... (and not after a while) :)

Two more pics for you:

Title screen



Our hero's workshop



Cheers!
#10
since it's not locked yet, I throw my two cents in...  ;D

While reading all this stuff I had the feeling that you (Draft) ask things before actually writing the code, maybe I'm wrong, maybe not but this isn't the point.

The point is that you have to notice that this forum is 'particular' in several ways and have many different rules than other 'lighter' forums (if you haven't noticed while reading the rules before register, because you did it right? Have you asked yourself why this forum put you questions that you have to answer right before you can register? :)).

People like Khris are here in their spare time and put all their efforts in many things and one of them is to keep this forum polished and clear (so it will be easier to search in it)  :)

I would like to share with you what I do before asking here around:  ;)

1. Check the dynamic help inside the editor
2. Check the on-line manual
3. Write my code and check if it works and if not
4. Check the dynamic help
5. Check the on-line manual
6. Stare at my code for at least half an hour wondering why it doesn't work and trying to have it written in a different way
7. Do something else (draw game graphic) while thinking about my code
8. Check again the day after, steps 1 - 2 - 3
9. Post here
(waiting for Khris or someone else, but usually Khris, to answer WHILE I keep going on in searching my solution...)

Cheers  
#11
Hi guys,

I want a function to loop through a Gui buttons checking if one of them has a given graphic.
If so, switch the graphic with a second given graphic, for a sort of 'what-to-do-notepad-GUI'
with a better look than a GUI list box.

Here's my code

Code: ags

function Assegna_appunto(int imagineA, int imagineB)
 {
 int i=0;
 Button *bottone[30]; //Max number of buttons allowed in one GUI
 while(i<=gBlocco.ControlCount)
   {
    if(bottone[i].Graphic==imagineA)
      {
       gBlocco.Visible=true;Wait(40);
       bottone[i].NormalGraphic=imagineB;Wait(40);
       gBlocco.Visible=false;
      }
    else i++;
   }  
 }


But when the game calls the function I receive a 'null pointer referenced'.
What exactly am I doing wrong?

Thanks in advance.

EDIT:

Meanwhile I brainstormed and came up with this working code:

Code: ags

function Assegna_appunto(int immagineA, int immagineB)
{
 int i;
 while(i<gBlocco.ControlCount)
  {
   if(gBlocco.Controls[i].AsButton.Graphic==immagineA)
    {
     gBlocco.Visible=true;Wait(40);
     gBlocco.Controls[i].AsButton.NormalGraphic=immagineB;Wait(80);
     gBlocco.Visible=false;
     return;
    }
   else i++;
  }  
}



Cheers
#12
Oh... oooh... oooohhhh... !

*sigh*  :'(

It's a pity and a relief at the same time.

A pity because I can do nothing about it (except lowering the cha.movspd around 6 maybe).

It's a relief when I hear you say I didn't mess up things, really.

Thank you khris for the amount of your (spare) time you spent around this issue.

#13
I'm trying to upload the file there, but it seem I have problems because it doesn't move on...

Meanwhile I sent you an e-mail to the address I found in your profile informations with the archive attached (2,45 MB).

If netload moves on with my upload I'll edit with the link.

EDIT:

After several trials I uploaded to Mediafire

http://www.mediafire.com/?k43dq9x1l2c0857
#14
Ok.

I followed your suggestion and got rid of unnecessary things, then I quick-searched for a free file hosting site and uploaded the remains at:

http://www.filefactory.com/file/c27f556/n/Gli_alieni_mi_han_fottuto_la_birra!.rar

According to the terms of use this link will be valid within 90 days from the latest download of the file itself

#15
Quote from: Khris on Tue 07/02/2012 14:55:35
Could you release a stripped version with just the room and character for us to test? Maybe this doesn't occur on every system.

I guess this can be true, my system isn't the latest for sure, but I can't try out the game on a powerful system...

No, I won't spend time to export - repacking - adjusting - re-coding a single room version (I'm lazy enough with this project) BUT if you are kindly willing to go deep into this issue I will be glad to .rar and mail you the entire game folder.

The major issues you'll face will be:
- most of the code (obj names, functions etc...), comments in the code and the game itself are in Italian...
- my personal indentation method that you already faced (learned somewhere in the italian Inform beginner's guide... lol) which will surely make you dizzy... (and angry...)
- beginner's scripting and (probably) messy and redundant code all around!

Meanwhile I wil try different settings for my cha (atm speed 10, delay 4).

I didn't realize all the implications around movement speed and animation delay, in particular the ones you mentioned in your previous post.
Probably a movement speed of 10 is too high compared with the sprite size, and maybe this is the main cause of the 'shifting effect' of the walk/scrolling, 10 pixels are simply too much (didn't tested yet but I guess I'm not too far from the truth).

Why I (arbitrarily) set it to 10?
In my ignorance I wanted my char to walk at a good peace without rushing around and I adjusted the animation delay accordingly 'at sight'...  :-[

And then you rightly made me notice that behind a decent walk cycle there are much more rules than one would expect (and that one is me! lol).
And that made me think that the major cause of this strange beahviour is my hideous view and its settings...

The truth is that I drawn the sprite in the old fashioned style (with tracing paper) and then scanned them; slightly corrected them (removed anti-aliasing with photoshop and windows paint), imported them in the editor, and left them at their fate... (not the best work eh?)...
#16
Quote from: Snarky on Mon 06/02/2012 21:40:04
OK, so system.vsync only works in DirectDraw in full-screen. If you're running in any other setting, it won't work.

Check out Calin's plugin to see if it helps you work around the problem: http://www.adventuregamestudio.co.uk/yabb/index.php?topic=41669.0

Bad news here, I'm actually using Direct Draw 5 and I usually test the game by launching it via the compiled .exe (in fullscreen), and I really noticed nothing different with System.Vsync true or false, I also verified if it was true with the line:

if(System.Vsync==true){gMYGUI.visible=true;}

The gui was visible (a small rectangle in the top left corner of the screen) but there were no significant changes in the game behaviour, no less tearing, no fps drop...
I'm wondering if setting S.Vsync to true really does something 'inside the engine'...
Maybe something gone wrong with the latest update (I'm using AGS 3.2.1)?
I've seen Calin's thread last night or so, and it seems his plugin is dedicated 'only' to Direct3D 9 because S.Vsync doesn't work with that setting, but as far as I can see it doesn't work the same with Direct Draw 5.

I found a couple threads with a similar issue, but both of them haven't been solved yet.

Regardless, thanks for the link Snarky ^_^

Since my game (like all my games) will be a non-commercial game, I might consider the option to leave things as they are and move on, or I'll never release it!! lol
I belived that this was an easy fix overlooked by my inexperience with AGS engine but it seems I was wrong...
#17
Hmmm, I'll try to look at it...

EDIT:

I tried to set system.Vsync to true ( in game_start() ) but I noticed no changes at all.
I checked the general settings, the preferences and winsetup, but I found nothing related to video sync.
I also checked all my monitor osd options but I found nothing.

Atm I'm clueless...
#18
Quote from: Khris on Thu 02/02/2012 16:59:30
... the walk-cycle should be drawn in a way that a foot touching the ground moves back a constant amount of pixels in between frames. This amount is then entered as the walking speed...

Oh, this is something I really didn't know (I'm no animator at all and poor coder as well, but I'm a decent musician... ^_^), I will take this in consideration for my future walk cycles.

I'm uploading 2 short videos of what I'm talking about (on youtube), as soon as they're up I will edit with the links.

With 'flickering' I mean... err... flickering like a malfunctioning neon tube.

EDIT:

This video shows the character flickering while walking in a static room

http://www.youtube.com/watch?v=4aZ4TYgmDBA

And this shows how the charcter stop flickering in a scrolling room when it's scrolling (but is the background that actually flicker -- look at the door when bg is scrolling)

http://www.youtube.com/watch?v=GlA5qMawb8Q&context=C3d739dcADOEgsToPDskLrPRONWC0dHfmpqEJOMm2I

As I said before the view sprites are already centered, so no left-right shifting while the animation is playing, and I have no 'empty' sprites in the loop.
This happens with all my character views (also with the dog that moves around on a skateboard, but as said before, no legs no MLTA).
When I 'preview' the animation inside the editor it looks 'crystal clear and perfect' (in its hideousness --- also w/o the 'center pivot' flag).

#19
No, I don't have any empty frames

No, I have only 4 direction set and only 4 loops (0, 1, 2, 3).

I played around with the char settings pane, and set/unset option like movement linked to animation and that sort of stuff.

I played also around char movement speed and animation delay, and after a while I noticed that setting MovementLinkedToAnimation to false (tweaking again speed and delay, because the same values have 'changed' their result into 'faster than the previous setting') have 'quite' solved my issue.

It seemed to me that, with MLTA==true, my char 'jumped' some pixels while walking (w.speed 6 - a.delay 4 - loop frames 0 to 10) giving the impression to flicker, actually being 'stuck' at a certain x during the walking frame and reappearing like 4 - 6 pixels further with the next walking frame...

Now the char don't flicker while walking, it's only a little blurred and a tiny bit transparent... ???

Could it be due to my computer (Intel Celeron 2.80 Ghz - 512 MB RAM - Radeon 9800 pro)?

#20
Hi everyone,

I was improving the walk cycle of my character, in particular I was centering the position of all frames (in the transparent rectangle) because I noticed that, when walking, my char seem to flicker.

After the centering procedure, well, it's still flickering, but only when the room is NOT scrolling.

Better said:
when the char walks across a static room (i.e left -> right) it flickers but when the room is scrolling while the char is walking it doesn't flicker.

It's clear that I do not have 'empty' frames in the walk cycle and, when checking the preview animation inside the editor the char doesn't flicker.

What can be the cause?

Any ideas?

Thanks in advance.
SMF spam blocked by CleanTalk