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

Topics - bx83

#1
I've once again gone back to completing my loooooong overdue game. I've tracked the problem down to an error which happens in room 301, the title screen. At first it was working, then something somewhere changed, now it's throwing this error:

Code: ags
---------------------------
Illegal exception
---------------------------
An exception 0xC0000005 occurred in ACWIN.EXE at EIP = 0x00421C10; program pointer is +32, engine version 3.6.2.11, gtags (9762,241)

Please help. I have the associated dump file.

Seems to be an error inbetween the room_Load() and room_AfterFadeIn() functions:

Code: ags
function room_Load()
{
  cJulius.Transparency=100;
  gIconbar.Visible=false;
  cJulius.x=2000;
  cJulius.y=2000;
  mouse.Visible=false;
  
  object[0].Transparency=100;
  object[1].Transparency=100;
  object[2].Transparency=100;
  object[3].Transparency=100;
  object[4].Transparency=100;
  
  object[6].Transparency=100;
  object[7].Transparency=100;
  object[8].Transparency=100;
  
  bool AreSaveGames=false;
  for (int cnt=1;cnt<=50;cnt++) {
    if (File.Exists(String.Format("$SAVEGAMEDIR$/agssave.%03d.lociv",cnt))) {
      AreSaveGames=true;
      break;
    }
  }
  
  BlockStartMenuLoadButton=!AreSaveGames;
  
  oSmoke.SetView(345); <-- exception here, or
}


function room_AfterFadeIn()
{
  oSmoke.Animate(0, 2, eRepeat, eNoBlock, eForwards); <-- here, or
  FadeInControls_startup();  <-- here, depending on the compiler's mood
  mouse.Visible=true;
}
#2
Ladies and Gents,

I have an old game with ~200 gigabytes of code and resources. I'm wanting to recompile and run it - with the original editor, original version of windows, etc. For one reason or another, I've lost track of the game. Entirely. I don't know what editor it used.

I've used a hexeditor to find the following info in Game.agf, Block AA-F9:

<AGSEditorDocument Version="3.0.3.2" VersionIndex="27" EditorVersion="3.5.1.11">

I assumed this to mean version 3.5.1.11 of the AGS editor was used to make it.

I went to the editors and engines download page (https://www.adventuregamestudio.co.uk/forums/ags-engine-editor-releases/)
and grabbed version 3.5.1 patch 11.

However, the file downloaded was 3.5.18-P11, and when installed, this info was echoed in it's 'Help->About...' window: "AGS Editor .NET (Build 3.5.1.18)."

How do I actually figure out which version of the downloadable editor to get so it doesn't "upgrade" and do damage to my game? or just say "wrong editor version"?  :confused:
#3
You can easily set a walkable area on or off (restore/remove walkablearea); and you can check to see that the area you're on is walkable area ID <whatever>, but how do you get the *status* of a walkable area?
Eg. if (WalkableAreaStatus(3)==false)  <-- checks if walkable area 3 is not active
#4
I'm thinking of creating a map, visually represented with static tiles, and programmatically with a 2 dimensional array with a bunch of integers representing different tile types.
How might I put graphics on the screen with the following loop:
1. find the next tile on the map from a level description - it's a tile type 55
2. find the type 55 tile graphic in your tile sheet
3. copy+paste the tile from your tile map to the screen
4. move cursor; get the next tile description from the level file (now it's type 120)
?

And ps, anyone know of any pre-done tile-sets, or tile engines?
#5
I want to create a version of Nethack. How complex is tile-based games? We’re talking:
-a small map of where we’re at
-commands through a simple command window
-movement through numberpad

How possible is this?
#6
I have a room which is noticeably slower than usual It only runs at <15 frames per second (out of 40 frames). When I locate a game character in it to another room, it speeds up to normal once again.



What is causing this? Has anybody heard of this problem before?

There's nothing of her in the code, eg. doing something 1200 times a second in repexec():

Code: ags
//----------------------------------------------------------------------------------------------------------------------
// room36.asc
// Room 36 (E Village - Dark Seeds, inside)
//----------------------------------------------------------------------------------------------------------------------

function room_FirstLoad()
{
  BeenToDarkSeeds=true;
  
  cGothGirl.Transparency = 0;
  cGothGirl.Clickable = true;
  cGothGirl.SetIdleView(35, 5);
}

//----------------------------------------------------------------------------------------------------------------------
// Room Load
//----------------------------------------------------------------------------------------------------------------------

function room_Load()
{
  cJulius.ScaleVolume = true;

	RandLoopShirt=Random(1);
	cGothGirl.Loop=RandLoopShirt;
  cGothGirl.SetIdleView(35, 5);
}


//----------------------------------------------------------------------------------------------------------------------
// Room After Fade In
//----------------------------------------------------------------------------------------------------------------------

function room_AfterFadeIn()
{
	//Display("randloopshirt %d", RandLoopShirt);//cheat
	
  if (cJulius.PreviousRoom==RM_E_VIL_DARKSEEDS_OS) cJulius.Walk(527, 584, eBlock, eWalkableAreas);
}

//----------------------------------------------------------------------------------------------------------------------
// Room Repeat Exec
//----------------------------------------------------------------------------------------------------------------------

function room_RepExec()
{
  
	if (ConversationIsOn) ConversationIsOn=false;
  
	//walk of the shop facing away from camera, not down-left
  if (cJulius.x<=645) {
    if (cJulius.Loop==6 || cJulius.Loop==1) {
      cJulius.Loop=7;	
    }
  }
  
	
	if (BeenToAssayer && !dGothGirl.HasOptionBeenChosen(13)) {
		cGothGirl.SetProperty("convodone",0);
  }
  
}

//----------------------------------------------------------------------------------------------------------------------
// Room Leave Left
//----------------------------------------------------------------------------------------------------------------------

function room_LeaveLeft()
{
  cJulius.FaceDirection(eDirectionUpLeft);
  cJulius.Walk(312, 530, eBlock, eWalkableAreas);	
  cJulius.ChangeRoom(RM_E_VIL_DARKSEEDS_OS, 500, 430, eDirectionDownLeft);                             // dark seeds, outside
}


#7
I'm publishing my current game (Lost on Cow Island) - as soon as I find a publisher.
I've got an enormous list, but no easy way to search through it - just have to try every entry.

What's everyone's favourite? Shall we make a master list of publishers?

MASTER LIST

Wadjet Eye
Raw Fury
Application Systems
Screen 7
#8
I've previously used the MouseWheelNorth/South buttons to do this, in which it scrolls 1 page at a time.

Using the same command (invCustomInv.ScrollDown()/Up()) with a key (I'm using eKeyPageUp/Down) it only scrolls 1 row at a time (out of the 4 visible rows).

Is there any way to have the invWindow scroll up/down multiple rows?
#9
I have a clip (aCameraSnap, of the ExtraSounds category) which was fading out/silencing all other clips in a room -- which were also ExtraSounds, hence the error.

I made a category called Special, with only this clip listed in it, and given infinite sound clips to the Special channel. Now, it *doesn't* play, while all the other sounds keep playing as usual -- but *only in this room where the original error above was happening*

What's going on? Is it solvable?
#10
Hi, could anyone tell me why there's an error in this piece of dialogue?

Code: ags
// Dialog script file
@S  // Dialog startup entry point

  if (TigerRedMeatMentioned) {
option-on 6
  }
  
  if (KingRevealsFurstPrize) {
option-on 9
  }

  if (!ButcherIntroduced) {
    cJulius_spk("&1965 You are a fine, utterly huge, *huge* bison. Or bull. What are you?");
    
    cButcher.SayAtBubble(butcher_talk_x,butcher_talk_y,
    "&1 I am a gigantic bull of bison descent.");
    
    cJulius_spk("&1966 What do you call that then?");
    
    cButcher.SayAtBubble(butcher_talk_x,butcher_talk_y,
    "&2 A Cattalo. Or Beefalo. But that is racist.");
    
    cJulius_spk("&1967 Are there many of your kind on this mostly cow-centric - but not enough to exclude horses - island in the middle of nowhere and also you can talk and own a butcher shop? Why do I even ask? Why do I *even* ask?");
    
    cButcher.SayAtBubble(butcher_talk_x,butcher_talk_y,
    "&3 I am the only one of my kind here. \n
    My pappa left me. My mother was destroyed. \n
    I am ashamed...");
    
    //[Spanish guitar sound] 
    cButcher.SayAtBubble(butcher_talk_x,butcher_talk_y,
    "&4 But I am not alone.");
    cDummy.Say("&1");
    
    cJulius_spk("&1968 But you said you were the las--");
    
    cButcher.SayAtBubble(butcher_talk_x,butcher_talk_y,
    "&5 I have my beautiful wife, of course.");
    
    cJulius_spk("&1969 A cow?");
    
    cButcher.SayAtBubble(butcher_talk_x,butcher_talk_y,
    "&6 A duck.");
    
    ButcherIntroduced=true;
  }

return

@1
return

@2  <----ERROR: buffer exceeded: you probably have a missing closing bracket on a previous line
  cJulius_spk("&1970 So that's quite a bit of... a height difference.");
  cJulius_spk("&1991 How do you even... like... you know...");
...


Adding new lines seems to mess up the length of dialogue (it was exactly as you see it here 20min ago, except no \n's and all text was on the same line), somehow. I've tried everything - \n's bad. No idea what's going on or if anyone's tried to space their dialogue like this.
#11
Can you, and if so, how do you make one of these?
There is an older plugin for it; but no .SetView for inventory items, and I'm not sure if it's even possible n 3.5.x?
I'm looking for the easiest way to attach a single ~10-frame loop, repeated, to an item which displays constantly when the inv window's on screen; that's all, nothing fancy.
#12
I have a huge number of variables in Global Variables (like >500), and I was wondering if there was a way to check:
-if any had 0 or 1 only usages (in which case, I can delete or repurpose them)
-if you can count the number of variables?

Thanks!
#13
I have:

Code: ags
if (ovCoords != null && ovCoords.Valid) ovCoords.Remove();
      ovCoords = Overlay.CreateTextual(50, 720, 1366, eFontNormal, 51520, "TEXT"


This create a nice red 'TEXT' on any background. But what if the background's red? I then need a black (or whatever colour) border around the text. How do I add this?
#14
Is there a wonderful way of saying:

Code: ags
#define TIMER_BOMB 1
SetTimer(TIMER_BOMB,GetGameSpeed()*10*60);   //10 minutes
Display("You have %d:%d till bomb explodes",<get how much time in seconds is left from timer 1>);


This is all something I've pulled out of my arse, but you get what I mean. How do we get the current time-out for a timer? Or should I use the module timer, which will take me.... a long time.
#15
I wrote this function:

Code: ags
int GetRowRange(int y)
{
  Display("provided with %d",y);
  switch (y) {    
    case (y>=0 && y<=50):    return 0; break;//return x/row
    case (y>=51 && y<=100):  return 1; break;
    case (y>=101 && y<=200): return 2; break;
    case (y>=201 && y<=300): return 3; break;
    case (y>=301 && y<=400): return 4; break;
    case (y>=401 && y<=500): return 5; break;
    case (y>=501 && y<=600): return 6; break;
    case (y>=601 && y<=700): return 7; break;
    case (y>=701 && y<=800): return 8; break;
    case (y>=801 && y<=900): return 9; break;
  }
}


I plugged in y=156.
It goes through every case, doesn't pick any, and returns 0 - instead of 2, which is what it should return. Do we have ranges? Am I using it properly?

ps I added redundant break;s to make absolutely sure it stopped after the return statement.
#16
I have a script (header/code) for my little Tankman module. In room52, where I have the graphics for the game, I have a game_start() function.
In game_start(), I've put all the initialisation code, and the code for 'theGrid', an array which represents my game-map:

Tankman.ash
Code: ags
Tile *theGrid[];    //dynamic array of pointers


Room52.asc
Code: ags
function game_start()
{
...
theGrid=new Tile[numRows*numCols];  //define it as a new Tile array of size rows*colums
Display("rgarghath");
SetupGridValues();    <------Display output for testing, sets up grid values now it's been properly instantiated
GetTargetRed();   <----- function than generates Display output
}


Nothing displays output, nothing runs.
If I put SetupGridValues() in room_Load(), it runs it, and then says theGrid is a null pointer (obviously never instantiated).

I would've thought that game_start() would be the first and foremost thing to run?

How and where do I run 'theGrid=new Tile[numRows*numCols];' to set it as a global variable (within game/room52), then run all 'setup' code, and then just get to the actual game-loop in room_RepExec()?
#17
Code: ags
vc[0] = Maths.Sqrt( Maths.RaiseToPower(Fcx-Ftmx, 2) + Maths.RaiseToPower(Fcy-Ftmy, 2) );


vc[] is an array of floats, all variables inside expression are floats, RaiseToPower is a floats-only function.

Error: Type mismatch: cannot convert 'int' to 'float'

???
#18
I'm making a Pacman clone.
In it, I want to have unexplored maze be filled with a little circular pill that my main character can eat up. There are 40 objects allowed on screen; no idea how many characters, but probably not 20 I have +200 little pills.
Does anyone have any idea how to solve this problem? How can I get the little round pills in all free squares and then get them to change graphic or destroy() when my Character collides with them?

#19
I'm trying to work out some vectors:

Code: ags
//defs
  int tmx, tmy, cx, cy;       //x,y coords of tankman (tmx,tmy) and yourself (cx,cy)
  float Ftmx, Ftmy, Fcx, Fcy;    //their float equivalents

  float vc[4];           //define direction vectors
  vc[0]=-1.0;
  vc[1]=-1.0;
  vc[2]=-1.0;
  vc[3]=-1.0;  //set to -1 so non-existant directions don't come back as shortest vector ie. 0 distance
  
...

  Ftmx=IntToFloat(tmx);   //get Float values from original ints
  Ftmy=IntToFloat(tmy);
  Fcx=IntToFloat(cx);
  Fcy=IntToFloat(cy);

  if (C.up==1) {     //if we have direction up...
        cy--;
        if(cy<0)cy=9;
        vc[0] = Maths.Sqrt((Fcx-Ftmx)^2 + (Fcy-Ftmy)^2);      <----- ERROR! Type mismatch: cannot convert 'int' to 'float'


Wait what?
I tried putting in ^2.0 instead of ^2, but unsurprisingly this didn't work. Nothing else is not a float :/
#20
I have, in Tankman.ash (trying to make my own Pacman clone):

Code: ags

...

struct Crowd {
  int aX;     //actual x eg. 312
  int aY;     //actual y eg. 472
  int tX;     //target x - target char/tile x coord - '3' for 'tile 34'
  int tY;     //target y - target char/tile y coord - '4' for 'tile 34'
  
  int mode;   //mode, 0=chase, attack=1, scatter=2, scared=3, regen=4
  int timer1; //timer to stay in mode
  int timer2; //timer to stay aggressive
  int waittimer;  //timer for wait between attacks/cooldown time
  int dir;    //0=up, 1=right, 2=down, 3=left  Never Eat Soggy Wheatbix
  int nogo;   //opposite direction to where your pointed; dir/nogo 0/2 1/3 2/0 3/1
  int moving; //1=moving to next coord, 0=not moving, decision/action time
  int id;     //0..4
  
  import void SetupCrowds();
  import void ResetCrowd(Crowd *crowd);    <--ERROR!
  import void ResetTimers(Crowd *crowd);
  import void FindTargetBasedOnMode(Crowd *crowd, int mode);
  import void MoveCrowdToTarget(Crowd *crowd);
};


Tankman.ash(17): Error (line 17): Cannot declare pointer to non-managed type

When I take away the '*' pointer, it compiles fine - but it means it sends a copy of Crowd, then loses it. What am I doing wrong to not use pointers?
SMF spam blocked by CleanTalk