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

#21
Thx, i will use that and keep it in my toolbox.  :)
#22
thx for your suggestions OneDollar this should work,  :)
its a bit costly, but i suspect theres no easier way in doing this. 
#23
This is tricky (for me)


As you can see on the picture, when a guard is knocked out he falls to the ground in Top Down View.
The problem is to ensure that he lies only on a walkable area and dont cover a wall (regions).
With monkeys code i know how to measure the sprite, but i need two calculations which i dont know how to start.
The first one is to determine, if there is a region underneath a single pixel of the sprite, and when yes
to find the nearest spot from the npcs origin on the walkable area, where i can place the sprite.

#24
Quote from: dkh on Tue 26/06/2012 16:00:53
1.) You're looping through all the characters in your game. Maybe it would be better to check if the character is actually in the same room as the player first.

2.) What's wrong with the commented code? It should work well in most cases and be a LOT faster.
Thx, checking for the npcs in the current room, brings a lot of performance, i think it could work this way.  :)

@Khris: Your modules are also running in the back (POV and NoMouse) you know ;), so i guess there is too much going on with the innefficient while loops..
Thx for your suggestion, i will merge all the ideas and see if i can make this construct working.

@Crimson:
Code: AGS
function ROC_FUNC_Get_Distance_From(this Character*, Character*c) {

  float dx = IntToFloat(c.x - this.x);
  float dy = IntToFloat(c.y - this.y);
  float dis = Maths.Sqrt(dx*dx + dy*dy);
  return FloatToInt(dis, eRoundNearest);
}


edit:THX, it works now, without stucking.  :)
#25
well my construct looks like this:
(the critical section is commented right now, so it works smooth) 

Code: AGS

function room_RepExec()
{
  int i = 0;
  
  while(i < Game.CharacterCount)
  {
    if(Guard[i].alerted)
    {
      
      /*
      int j = 0;
      while(j < Game.CharacterCount)
      {
        if(i != j)
          if(Guard[j].alive)
             if(character[i].ROC_FUNC_Get_Distance_From(character[j]) < 300)
                   character[j].ROC_FUNC_Guard_Alerted();
            
     */

       if(character[i].IsCollidingWithChar(player))
         if(thief.guards_alerted > 1)
         player.ChangeRoom(5);        
         else
         {

            character[i].ROC_FUNC_JB_Startfight(); 
         } 
         
        // j++;
         
      //}
       
    } 

    i++;
  } 
}



but its obivious when the other section isnt commented, it brings the PC down to his knees.
i thaught about a gamecycle counter, only execute this code every 3rd frame or so, but i guess this isnt a convenient solution either..
And suggestions how to solve this?
#26
no you didnt -> http://www.adventuregamestudio.co.uk/yabb/index.php?topic=37906.msg498141#msg498141
and i neither, it was just for quicktesting, so i didnt mess around with unnecessary parenthesis. :) :P
cause i made a function of it:

Code: AGS
function Get_Character_Height(this Character*)
{
  ViewFrame *frame = Game.GetViewFrame(this.View, this.Loop, this.Frame);
  return Game.SpriteHeight[frame.Graphic];
} 


Quote from: monkey_05_06 on Wed 20/06/2012 21:12:33
Blast! That guy's always leaving code snippets laying around. :P
This is the greatest thing about AGS, codesnippets are laying around everywhere. :-D
#27
I need the sprite height from the current character.Frame.

edit:
ok found the solution from monkey in another codesnippet somewhere: :)
Code: AGS

ViewFrame *frame = Game.GetViewFrame(cGuard_1.View,cGuard_1.Loop, cGuard_1.Frame);
int sprite_height = (Game.SpriteHeight[frame.Graphic]);


#28
perfect, big thx.  :-D
Code: AGS
function khrismuc_knows_everything_always()


and if i read the manual more attentively next time, i would too.  :P
Quote from: AGS-HelpTo create repeatedly_execute_always, you can simply paste it into the script as above -- but you can also paste it into room scripts.
#29
i would need a room function
Code: AGS
function room_RepExec_always()

cause when the player performs an additional animation with LockView and animate....
some things that are going on in the background stucks meanwhile.
Is there a an similar function like the normal repeatedly_execute_always() function for rooms?
#30
AGS Games in Production / Re: Jailbreak
Wed 13/06/2012 13:11:58
Thanks for the comments.  ;-D
Yeah seems that i'm into my great top down period. :) 
but not limited, cause for the Beat 'm up part it changes to sideview.

WIP-Screenie (GUI has been disabled for beauty reasons)


I'm happy to say, the game is nearly featurecomplete, and i can slowly start now to focus on the actual gameplay.  :P 
#31



An intrigue has brought you to prison, so your goal is to escape and find the evil who brought you in this mess.


Game Facts:
- Stealth Game -
- 4 Levels -
- Beat'm Up Mingame -
- Driving Sequence -

Game Technics:
800x600 32bit
Top-Down View
Keyboardcontrol (Mousecontrol optional)


WIP Screenies:






WIP-Music Snippet:
Short Jailbreak Credits Screen - Single String Demo


additional Infos:
The Game is intented to be part of the Summerbatch Bundle, so if i can hit the Deadline, its my first Game who will be sold worldwide, commercial..... Wohoohooohooooo
Its also the first time (ok, the first and a half considering Airbreak  :P), where i try to combine my ambitions to make games and music.
So i try to compose and record the whole gamemusic bymyself, which is a frightening task, cause differently to work with AGS where i'm roughly know what im doing (or where i found Khris PN-Button to make him mad ;)),
i'm a relative unexperienced in homerecording, so we will see or better hear what comes around.






(Mods edit - fixed broken link)
#32
I'm trying to use this module, but the ChainId and ChainPosition values gets screwed somehow.
The first chainposition is executed and the NPC(s) walks to the first waypoint, but when they reaches the first chain position they are stucked and don't execute the next chainpositions.
When i trace the ChainId i get values like 105466709 and for the ChainPosition similar ones like 106843457, and all CC_controlled have the same values for ChainID and Chainposition.
Dont know what causes this bug.  :cry:
I have 33 chars, and try to use the Module for Char 27 and 28, maybe this causes the strange behavior?

EDIT;
Quote from: placyd on Fri 20/08/2010 08:59:08
I've read back and found this quote by Tanique, that he had the same problem, when not even numbers was used as coordinates.
If I use 624 instead of 625 in the script it works perfectly!  ;)

Quote from: Tanique on Mon 16/11/2009 01:02:06
I know this thread hasn't been used in a while but I think it makes more sense to post it here than start a new one.  I was playing with this module for my game (monkey's .85 version using AGS 3.1.2) and I've noticed what might be a bug in the WALK scripting.  If I ever program my background character to walk to any x,y coordinates with odd values, she'll walk there, but won't continue the rest of the script.  As long as her WALK coordinates are even numbers, the script runs smoothly.  Is this a known bug?  I'm thinking it may have something to do with AGS 3's ability to run high resolution coordinates in the script.....but I'm really not sure. 

Oh man, cost me a sleepless night (and day) to figure that out bymself.  :P
It works fine with even values, maybe a hint in Monkeys posting could prevent others from the same scenario....



#33
I would need nonblocking speechbubbles, instead of the saybackground command.
Can this module do that?
I noticed the Hypertext.Say function in the documtation, i suspect this works with blocking.
#34
i can't serve you with Dr. Freds currently state, but there is short interview up here -> http://jcwigriff.com/2012/03/23/interview-with-edison-interactive-about-maniac-mansion-remake/
#35
I dont know if wintermute was mentioned before, -> http://dead-code.org/home/
Its a really good engine with allows 2.5D Adventure Games.
I know the goal was real 3D Games, but maybe this is worth a look.
#36
;D
i managed to buy it now, but it was not easy.
dont know what was wrong, after switching a few times between FF and chrome window,
it was possible to select paypal.
But for the ease of use, its maybe not a bad idea to look over this transaction site again.
The adventure shouldn't start on this point.
#37
i want to buy the bundle, but the purchase script is somehow buggy.
I tried with Firefox and Chrome, but cant choose PayPal.
When the Payment Method Popup is showing up, every action reloads the site.  :-[
#38
very interesting project, the deadline is very close,
but maybe its possible to make a little heist game, based on my scaffolding i did for City of Thieves.
#39
For your Consideration:
City of Thieves: Rescue Sandy

Burglar Simulation




Story:
Dave Miller, an retired burglar is forced to burglarize until his depts are paid off.
The syndicate boss underlines this special pressure by hijacking and imprison Sandy, Daves beloved Girlfriend.
Only successfull burglarys can avert the evil events.

Mingames:
- Picklock
- Alarm deactivation
- safe cracking




* Released for MAGS 04/2011


Download the game HERE.
Go to the Games Page.

It should be nominated in:
*Best Non-Adventure Game Created with AGS
*Best Programming
#40
i do that with one variable and an enum for easier readability:

Code: ags

// globalscript.ash
import int gameprogress;

enum eGameprogress
{
  eProlog     = 0, 
  eMiddle     = 1,
  eFinal       = 2, 
};

Code: ags

// globalscript.asc

int gameprogress;
export gameprogress;

function game_start() 
{   

  gameprogress = eMiddle;
} 

Code: ags


// Roomsript
function room_Load()
{


  if(gameprogress == eProlog)
  {

      StartCutscene(eSkipESCOrRightButton);
      cKlaus.ChangeRoom(10, 423, 119);
      cMichael.EnterRoom(10,460, 139, eDirLeft);
      .
      .
      
    }
    else if(gameprogress == eMiddle)
    {
      //StartCutscene(eSkipESCOrRightButton);
      cKlaus.ChangeRoom(10, 423, 119);
      player.Walk(325, 127, eBlock, eWalkableAreas);
      .

   
    }
     
}


and so on.
And for debugging, set the gameprogress variable at gamestart and you can play the room at any state of the game.
(eventuelly need to give the player some inventory items manually, which he should have at this point)

SMF spam blocked by CleanTalk