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

#61
It works!!! But my game was made with P3 how can I procede? suggestion pls :grin:

#62
i'm trying this this one from janet branch https://github.com/JanetGilbert/ags/tree/ios-technobabylon
but in xcode 8.3 there's no error only in 9, i think that many things changed, i'm taking alook to all file script
#63
I'm on xcode 9 now and new errors come  "use of undeclared identifier assert" and "invalid use of non-static data member assert string.h"
#64
this is a screenshot made today with xcode 8.3, the same with 9, ac2game.dat is in folder,



i don't pretend the game to run, but why this error? :)

EDIT:

At least the simulator starts now, for whom have the same problem, i don't understand why , deleting under build phase in project settings "bundle resources" let the simulator starts and the game crash :)
#65
now i'm on 3.4.0 and the ide returns an error about ac2game.dat not found.
#66
Hi Janet and thanks for your help, I took a Mac  two days ago so I'm really a noob to Xcode. I'm trying to fill your code with my executable that I renamed ac2game.dat and put all compiled  in technobabilon/game folder, the vox and speech error is solved but it continues to tell me that he cannot find any ac2game.dat, its strange, any hint?
#67
Good to know Crimson so i'll go on gui black to be safe, thanks as always.
#68
Tried both same results
Maybe when i'll return home i can post you a comparing video
#69
v3.4.0, March 2017, direct 3d9

Code: ags

//END OF PREVIOUS ROOM

          Wait(60);
          aPioggia.Stop();
          SetScreenTransition(eTransitionInstant);
          FadeOut(1);
          cEgo.ChangeRoom(3);
          
          OCCHISEGUONOPERSONAGGIO=true;
          PALPEBRESEGUONOPERSONAGGIO=true;
          SPEECHSEGUETESTA=true;
          cAnimazioniOcchi.UnlockView();
          cEgoPalpebre.Transparency=0;
          OCCHITRASPARENZAAUTOMATICA=true;
          cAnimazioniOcchi.UnlockView();
          cEgoBraccia.UnlockView();
          cEgoBraccia.Transparency=100;
          cEgo.UnlockView();
          
          
         
          
          
   }

//NExtROOM
function room_Load()
{
  
 
  closeUp[0]=cGen1;
  closeUp[1]=cGen2;
  closeUp[2]=cGen3;
  closeUp[3]=cGen4;
  closeUp[4]=cGen5;
  closeUp[5]=cGen6;
  closeUp[6]=cGen7;
  
  
  for(int i; i<7; i++)
   {
     //closeUp[i].Transparency=100;
     closeUp[i].ChangeRoom(3);
     closeUp[i].x=320;
     closeUp[i].y=360;
     closeUp[i].ManualScaling=true;
     closeUp[i].Scaling=100;
     closeUp[i].Clickable=false;
     closeUp[i].FaceDirection(eDirectionDown, eBlock);
     closeUp[i].IgnoreLighting=true;
     closeUp[i].SetGetlightlevel(0);
   }
   
  cGen1.ChangeView(77);
  cGen1.Baseline=1001;
  
  cGen2.ChangeView(78);
  cGen2.Baseline=1002;
  
  cGen3.ChangeView(1);
  cGen3.Baseline=1003;
  
  cGen4.ChangeView(2);
  cGen4.Baseline=1004;
    cGen5.ChangeView(5);
  cGen5.Baseline=1000;
  
  cGen6.ChangeView(3);
  cGen6.Baseline=1006;
  cGen6.x=cGen1.x-150;
  cGen6.Scaling=90;
  cGen6.Transparency=100;
  
  cGen7.ChangeView(6);
  cGen7.Baseline=1005;
  cGen7.SpeechView=6;
  
  
  cGen3.Loop=1;
  cGen3.Frame=1;
  
  
  //cGen3.Animate(0, 3, eRepeat, eNoBlock, eForwards);
  
  if (player.PreviousRoom==1)
  MUSICA=aStanzaLovecraftColpi.PlayFrom(MUSICA.Position, eAudioPriorityHigh, eRepeat);
  INVENTARIOPOPOUP=false;
  cAbdul.ScaleMoveSpeed=true;
  cAbdul.SetWalkSpeed(1, 1);
  cEgo.y=300;
  cEgo.ChangeView(10);
  cEgo.SpeechView=17;
  cAbdul.x=-20;
  cAbdul.y=270;
  cAbdul.ManualScaling=true;
  cAbdul.Scaling=80;
  cAbdul.Baseline=1;
  cEgo.FaceDirection(eDirectionDown, eBlock);
  cEgo.SetIdleView(0, 0);
     FadeIn(1);
}

#70
usually before change room and in room before fade in. Thanks a gui it's a good workaround but i'd like to understand the usage of internal functions, and why behave this way, just for curiosity.
#71
Sorry Guys i'm using ags about four years from now and i'm feeling a little stupid about this question :) But...
With my prevoius game i fought with it without ask, now i'd like to clarify something. On change room to have a long fade out in i had often the problem that first image appears than the screen become black and fadeIn, with a prevois version making ScreenTransition instant solved the problem (but not all the time)  but now with a new one i had the problem described above anyway. Are there some rules to avoid that so i don't have to make black object in every room or entire screen black character that change room to have this effect?
Thanks and sorry for noob question.
#72
I think i solved all like i taught using also an old script that i had for npc always look at player in Chronicle of Innsmouth.

Code: ags

function  Angolo(float xgiocatore, float xpersonaggio,  float ygiocatore,  float ypersonaggio)
{
  float x;
  float y;
  float angle;
  float degangle;
  int angolo;
  x= xgiocatore-xpersonaggio;
  y= ygiocatore-ypersonaggio;
  angle = Maths.ArcTan2(x,y);
  degangle=Maths.RadiansToDegrees(angle);
  angolo = FloatToInt(degangle);
  if (angolo<0) angolo=360+angolo;
  return angolo;
}

 String  direzione(int angolo)
{
  if ((angolo>=337&&angolo<=360)||(angolo>=0&&angolo<22))
  return "D";
  else if (angolo>=22&&angolo<67)
  return "RD";
  else if (angolo>=67&&angolo<112)
  return "R";
  else if (angolo>=112&&angolo<157)
  return "RU";
  else if (angolo>=157&&angolo<202)
  return "U";
  else if (angolo>=202&&angolo<247)
  return "LU";
  else if (angolo>=247&&angolo<292)
  return "L";
  else if (angolo>=292&&angolo<337)
  return "LD";
  
}

bool SightBlocked(float fx, float fy) {
  int x = FloatToInt(fx, eRoundNearest);
  int y = FloatToInt(fy, eRoundNearest);
  // check if room pixel x, y is blocking
  return GetLocationType(x - GetViewportX(), y - GetViewportY()) == eLocationObject;
}
 
bool IsVisibleTo(this Character*, Character* enemy) {
  float x = IntToFloat(enemy.x), y = IntToFloat(enemy.y);
  float dx = IntToFloat(this.x - enemy.x);
  float dy = IntToFloat(this.y - enemy.y);
  float l;
 
   l = Maths.Sqrt(IntToFloat(((this.y - enemy.y)*(this.y - enemy.y))+((this.x - enemy.x)*(this.x - enemy.x))));
  //check every 2 pixels
  if (l == 0.0) return true;
  dx /= l / 2.0;
  dy /= l / 2.0;
  int steps = FloatToInt(l / 2.0, eRoundDown);
   for (int i = 0; i < steps; i++) {
    x += dx; y += dy;
    if (SightBlocked(x, y)) return false;
   }
  return true;
}
void VerificaAngolo(Character *giocatore, Character *nemico){
  
  angolus=Angolo(IntToFloat(giocatore.x), IntToFloat(nemico.x), IntToFloat(giocatore.y), IntToFloat(nemico.y));
  dir=direzione(angolus);
  if (distanza(giocatore.x, giocatore.y, nemico.x, nemico.y)<167)
   {
     if (giocatore.IsVisibleTo(nemico))
    {
        if (nemico.Loop==0)
         {
           
           if (dir=="D")
            {
              giocatore.SayBackground("Mi ha visto.");
            }
            else giocatore.SayBackground("");
         }
         else if (nemico.Loop==1)
            {
              if (dir=="L")
            {
              giocatore.SayBackground("Mi ha visto.");
            }
            else giocatore.SayBackground("");
            }
             else if (nemico.Loop==2)
            {
              if (dir=="R")
            {
              giocatore.SayBackground("Mi ha visto.");
            }
            else giocatore.SayBackground("");
            }
             else if (nemico.Loop==3)
            {
              if (dir=="U")
            {
              giocatore.SayBackground("Mi ha visto.");
            }
            else giocatore.SayBackground("");
            }
    }
   }
}


function repeatedly_execute_always() 
{
  VerificaAngolo(cEgo, cGen3);
  VerificaAngolo(cEgo, cGen4);
  VerificaAngolo(cEgo, cGen5);
  VerificaAngolo(cGen1, cGen3);
  VerificaAngolo(cGen1, cGen4);
  VerificaAngolo(cGen1, cGen5);
  VerificaAngolo(cGen2, cGen3);
  VerificaAngolo(cGen2, cGen4);
  VerificaAngolo(cGen2, cGen5);
}

#73
Sorry Khris but my trigonometric knowledge is old and full of dust. Maybe i forgot to tell that the enemies go around screen (so i had with first function some division by zero if you can help me to avoid them). I can't reproduce the triangle with drawtriangle cause i can't do reverse formula. But it seems that the cone this way is strictly connected with enemy-player distance. there are three player and three enemy by now but i will increase enemy presence.

this is the old ones with things overlapping and cone made with sprite. Just to explain the condition.

#74
I'm adding cones like characters that follow enemies directions and positions to check if the player is in line of sight  along with walls check. I tried with isCollidingWithChar but doesn't work cause the check is on baseline i think, are things overlapping works better but alpha channel count as collision, is there an internal function with pixel perfect collision or can you help me maybe in the same function for walls? Thanks.
#75
ahahah perfectly coordinated :)

I saw the answer as soon as i edited the post, by the way it seems to work like a charm, thanks Khris. Just for curiosity in wich way you should work with 2d raycast?
#76


i had this error

EDIT:
Seems to be solved this way
#77
sorry i mean quite complex, now there's only a walkable area mask imported from sketch, put the walls of the labyrinth as an object i think it's the first thing to do, no there's no grid, the movement are based on dinstance from character.x.y. Interesting article about 2d raycasting by the way.
#78
Hi guys maybe you can help me, i'm trying to do a little variant in my game with strategic turn based mechanics. I can't realize an efficient way to make stealth mechanics.For example i have an overhead map with open building, how can i avoid  character to be seen if it's near and in line of sight but on other side of the wall? For one example is simple but the map is near complex. If you need i can post you a screenshot.
Thanks as always.
#79
Quote from: Crimson Wizard on Tue 17/04/2018 15:07:48
Perhaps, you need to disable that label when any blocking action takes place?

One trick I know is based on the fact that repeatedly_execute_always runs during blocking actions, and repeatedly_execute does not run during blocking actions. Also rep_exec_always runs before rep_exec. This means that you may disable your label in in repeatedly_execute_always (set empty string to the label.Text or set Visible = false) and restore it in repeatedly_execute.

Great suggestion, now is allin rep_always, i'll try it asap, it could work with custom dialogue, say, and wait function that disable label. Thanks :)
#80
Hi guys i'm in a new game and i'm changing interface a bit so comes some new problem. now hotspot, object, character and inventory items name appears on cursor, i want to avoid that remains on screen while character talking.
Is there a way to check if any character in game is speaking without list all in an if statement?
i'm also need a check on the wait() command to avoid that label shows again during speech pause.
Thanks again to all of you for response.
SMF spam blocked by CleanTalk