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

#361
Hi Zyndikate,

That's a good idea...I tried it on my game, and unfortunatly it didnt change the results...doh!

Is anyone else getting these results or is it just an isolated case?
#362
Well I do have VSync turned off (I disabled the plugin), and I wont get 100fps unless a media window is opened...which is weird, no?

60 is good, but thats when nothing is moving. Ive got a GUI with fullscreen effects and other things, so when the mouse cursor is moving, animations running, etc, in that heavy zone, that 60 drops to around 35. When VLC is open and 100fps, in that same heavy area, it drops to around 50...a gain of 15fps in that heavy area (and I wont have an area heavier than that for the whole game...its a good place for me to test what the lowest fps for my game might be).

#363
haha! Wow I forgot about that, 2 years ago when I was just starting out...man Im glad I stuck with AGS!

Well atleast we're 2:
http://forum.dead-code.org/index.php?topic=4353.0  ;)
#364
It would be great if the Edit Custom Properties window could be resizeable...right now you cant modify its size so you are forced to scroll up or down when the window is too small for all the items.
#365
Ok well I did this test this morning:

I have the AGS D3D VSync plugin installed...when it isnt activated and VLC player is open, my fps is 100. If I activate the VSync plugin, the framerate doesnt go up to 100, it stays at 60fps.

The question is, if I dont have this plugin activated, how can I keep my 100 fps without needing to open a media player?

@Kweepa: I checked performance and either way the cpu is between 1-3%...no difference. Also using Direct Draw or Direct 3D doesnt change my test results. This is quite important for me to debug since I can potentially gain 40 fps...which is freakin awesome :)
#366
I tested this at home and I get the same results...also, I found something interesting:

I tested an older version of my game at home with "Enforce new-style audio scripting" set to false, and when Windows Media Player (or VLC player) is open, the fps stays at 60...however, if I set "Enforce new-style audio scripting" to true in that very same game, then the fps jumps to 100 with either of  those media players opened.

I believe the  "Enforce new-style audio scripting" has something to do with this bug....


**EDIT: Ok , with further testing "Enforce new-style audio scripting" doesnt seem related...

I tested it on my very first version of my game back in 2009 and if VLC player or WMP is open, the FPS jumps up 40 frames per second no matter what setting.


I also reproduced this bug with a fresh newly-created test game:

STEPS:
01) Create a fresh new game (any resolution)
02) Make sure SetGameSpeed is set to 100 everywhere in GlobalScript
03) Make sure in game_start you have Debug (4,1)
04) Run the game (any setting)
05) Open up VLC player
06) Notice the FPS goes up 30-40 fps
07) Close VLC media player
08) Notive the FPS goes back down about 30-40 fps.

...hopefully it can be reproduced on someone else's computer!
#367
This is awesome...works perfect!
#368
@calin: hmm, interesting! So is it worth indexing large sprites to limit the amount of different pixel colors?
#369
Ive tested this multiple times on my computer to be sure it wasn't a fluke...if its isnt, well I hope it can be fixed for the next release :)

My game (up until I accidently discovered this possible bug) has been running at about 60 fps. I started Windows Media Player with an audio cd, pressed "stop" and minimized it. I then pressed F5 to run my game. The FPS is now 100 fps!! A gain of 40 fps, incredible...
I then closed Windows Media Player and the game. I pressed F5 again, and this time the FPS has returned to 60. So if the WMP is opened, my game runs 40 fps faster...


-Windows 7, x64
-Windows Media Player (version 12.0.7600.16415)
-Direct3D9 mode
-No graphics filter
-Side Borders On
-Smooth Scaled Sprites On
-Run the game windowed

Can anyone else reproduce this?

**EDIT: I tested this with VLC Media player aswell (version 1.1.7 x32) and I got the same results...
ps: (oh, and of course, if this bug could be fixed so that even without a player running the game still runs at 100fps :P)
#370
QuoteOh... I guess I wasted some time then, saving each file in different format and cropping blue edges of the sprites....

I feel your pain...I did the same thing, converting all my bmp's into png's, and then using pngGauntlet to further compress my png's...to only find out later that it's useless to do that!

What Im wondering is how well does AGS compress files? As in, how much does a 900kb sprite weigh in AGS after it compresses it? Is there a formula we can use to guess ourselves before importing?
#371
This works nice, I was doing my anims in rep_exec and with this script its much better/compact. I had to write the timer manually (setTimer doesnt work while the game is paused) cause its for a GUI anim...but now I know I can use SetTimer in this way for non-paused anim moments.

Thnx Ben!
#372
Viewframe.Speed is read-only...I checked around and it seems nothing much can be done with this...
(example)
http://www.adventuregamestudio.co.uk/yabb/index.php?topic=42696.0

Is there a "dirty" hack-way I can change this on the fly? Ive got a loop where I'd like the randomize the last frame's delay (without creating more loops if possible).

If this isnt currently possible, I'll add a request to making viewFrame.Speed not read-only if/when the engine goes open-source.  :)
#373
Hi Khris,

Ok, I need some time to look at all of this and think some more...Your code might be saving me HUGE amounts of time, but I need to rethink/restructure a few other related things which is a bit daunting cause its connected to quite a few custom scripts I already wrote...doh!

I'll keep you posted though  :)
#374
ahh, well excellent then.  ;D
#375
This seems pretty nice...Im going to try it as soon as I get home tonight.
#376
QuoteThis DOES NOT APPLY to Character and InventoryItem objects
Looks really cool but unfortunately if I understand correctly the above line from your link I won't be able to use your plugin since I mostly use custom properties for inventoryItems! Did I understand correctly? ...or does that line mean that when the ResetRoom function is called, it doesn't apply to characters or inventoryItem objects?

Thanks for clearing that up for me because it looks cool!
#377
I was wondering if anyone else here thinks this could be a good idea:

When we create custom properties, if you want to access them, you need to click on the "..." button at the bottom then a window pops up showing you the custom properties. If you have to manage lots of objects with properties, its kinda annoying having to click there, do your stuff, close it, reselect a new object, reclick the "..." button, etc...

How about if the AGS editor detects what's in the custom properies list and adds them into the column...that way, the only time you need to click on the "..." button is when you want to modify a property's definition or add a new one/delete one.

BEFORE:



AFTER:
#378
Ive got this line that I call when I want to add a certain amount of an inventory item:

Code: ags
iPatrolClip.AddInventory_Quantity(1, 8);


So it will add 1 item to whatever amount I already have of it. If I already have 9 clips, it wont add anymore and give me the "maximum message".

Wow, I just realized though I need a "check" to the iAmount cause if I entered:
Code: ags
iPatrolClip.AddInventory_Quantity(500, 8);

that would not keep the maximum at 9...(8 here means 9)

The "8" number actually translates to 9 max (not sure why, maybe because I have a while loop set at 0 and not 1 or something)...this number will change depending on the item, so the max number of patrol clips could actually be 4, the benzalkonium wipes 5, etc...

I just havent worked out those numbers yet since I rather lay down my system first (I only have a few items that can have multiple copies, but that list isnt complete yet). Once I know it works, I can set the maximum to any number I want to any item.




**EDIT:

I just thought about it a second...the maximum quantity of items should always be 9...forget what I said above.

**2nd EDIT:
Also, the global variables "iPatrolClip, iBusinessCard", etc...need to exist because I need to store their previous values so I can compare those values with updated ones with the "player.InventoryQuantity[this.ID]" later on in other scripts.
#379
Ok, I've been working on this on my own and so far so good, but I've run into a problem I've ran into before...I'm sure Khris you'll see its the same kind of problem I run into often in AGS (because I still have a hard time undoing my old ways of seeing variables). Here is what I have, it's a system to update item quantities and playing random messages when the player has reached the maximum amount for that item:

Code: ags
void randMaxMessage(String sThisItem)
{
  int iRand = Random(4);
  if (iRand == 0) Display("You've got as many %s as you can possibly carry...", sThisItem);
  else if (iRand == 1) Display("You can't hold anymore %s...", sThisItem);
  else if (iRand == 2) Display("That's enough %s...", sThisItem);
  else if (iRand == 3) Display("You dont' need to carry any more %s...", sThisItem);
  else if (iRand == 4) Display("You've got enough %s...", sThisItem);
}
  
void setMaxQuantity(int iItemQVar, int iMaxQuantity, int iThisAmount, String sItem)
{
  if (iItemQVar <= iMaxQuantity) iItemQVar = iItemQVar + iThisAmount;
  else randMaxMessage(sItem);
}

void AddInventory_Quantity(this InventoryItem*, int iAmount)
{
  //Display("Current clipQuantity is: %d...add %d to that number", iClipQuantity, iAmount);
  if (this == iPatrolClip) setMaxQuantity(iClipQuantity, 8, iAmount, "magazine clips");
  else if (this == iTaserCartridge) setMaxQuantity(iTaserCartridgeQuantity, 8, iAmount, "cartridges");
  else if (this == iAlcoholPrepPad) setMaxQuantity(iAlcoholPrepPadQuantity, 8, iAmount, "prep pads");
  else if (this == iBenzalkoniumWipe) setMaxQuantity(iBenzalkoniumWipeQuantity, 8, iAmount, "wipes");
  else if (this == iBusinessCard) setMaxQuantity(iBusinessCardQuantity, 8, iAmount, "business cards");
}

int Quantity(this InventoryItem*)
{
  if (this == iPatrolClip) player.InventoryQuantity[this.ID] = iClipQuantity;
  else if (this == iTaserCartridge) player.InventoryQuantity[this.ID] = iTaserCartridgeQuantity;
  else if (this == iAlcoholPrepPad) player.InventoryQuantity[this.ID] = iAlcoholPrepPadQuantity;
  else if (this == iBenzalkoniumWipe) player.InventoryQuantity[this.ID] = iBenzalkoniumWipeQuantity;
  else if (this == iBusinessCard) player.InventoryQuantity[this.ID] = iBusinessCardQuantity;
  
  iQ = player.InventoryQuantity[this.ID];
  return iQ;
}


The problem area is when I reach this line:  iItemQVar =  iItemQVar + iThisAmount;
I want to set my global variable (that is "inside" a variable iItemQVar) to its amount plus a new iThisAmount...

The problem is, of course, iItemQVar doesnt store the name of  the global variable, it would be the same as saying "8 = 8 + x"...how do I do it so I can store the value of the global variable (ex, iPatrolClipQuantity) AND its name so it can be used in that fashion? grrrr. I wish I could use variables in AGS this way, sniff sniff  :'(

I still have trouble grasping this concept, so be please be easy one me...it'll eventually sink in! :P
#380
hehe, yah, itz got a ssAA-wwweet yellow key in my 1 room, and I recently added a cool feature where the player can clicks on it and shitz...its so swouit.

SMF spam blocked by CleanTalk