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

#2141
QuoteAnimate the character, maybe using While, to animate until he arrives in his final location, lets say BX, BY. Detect when he changes walking areas, stop him for an istant, just long enough to change speed, and start him toward BX, BY again. I have not tried it, so I cannot be sure it would look good. I'm going to try it now.
I had tried that method earlier but it doesn't look good (at least for me). :-\

Another way is to write you own MoveCharacterDirect() function using character[].x character[].y variables. Since it is 'direct' it wouldn't use the pathfinder at all. Well, checking for walkable area under the character may help a bit. Although it would be like AGS MoveCharacterStraight() function. Not sure it is enough unless you use keyboard to control that char.

-Cheers
#2142
oh, as it's a button (and it doesn't clip the image) then consequently the whole image area should be clickable. Autoresizing! :P

-Cheers
#2143
Suggestion is handy as well as there are maybe a particular situation when autosizing isn't preferable(trying to figure out when  ::)) . maybe an option then? :P

EDIT: or maybe the option is useless in case if the button's bounds do not cut the image(I can't remember now).

-Cheers
#2144
Try placing it into the \Compiled folder instead.

-Cheers
#2145
When I was using the built-in FPS counter it just occured to me that game designer may want to provide his game with a special option to show frames per second (FPS) speed. Using the internal one is possible but there are two events when you can't:

1. Using built-in FPS counter (Debug(4,1);) is possible only if debug mode is turned on. But it should be disabled for finally released game.

2. You want to use another font/color for your game's fps textstring.

NOTE: You can't use GetGameSpeed() as it only returns currently set game speed not actual one.

So here is it:

GetFPS();
Returns current FPS speed.

Next the source script & installation instructions:

Place the next lines into the main global script:
// main global script file

int var_fps=0;
int var_fpslast=0;
int var_prevtime=0;

function GetFPS() {
  return var_fpslast;
}

function FPS_Repeatedly() {
  var_fps++;
  int curtime = GetRawTime();
  if (curtime-var_prevtime>=1) {
     var_fpslast = var_fps;
     var_prevtime = curtime;
     var_fps=0;
  }
}



Place the next line into repeatedly_execute() function:
// main global script file
function repeatedly_execute() {

   FPS_Repeatedly();


}


And finally into the script header part:
import function GetFPS();





Now you may use it to display FPS speed using TextOverlays or something else:

repeatedly execute the next code:
...
string FPS_string;
StrFormat(FPS_string, "Game speed (FPS): %d", GetFPS());
//SetTextOverlay (int overlay_id, int x, int y, int width, int font, int color, string text)
SetTextOverlay (id, 5, 170, 150, 0, 15, FPS_string);
//note: you have to create TextOverlay first: id = CreateTextOverlay(...);
...

or just use GUI labels.

That's all. Have fun ;)

EDIT:Since the GetFPS function calculates the number of calls (for each second) of repeatedly_execute() function it will not update the FPS value if the script is blocked. Just for reference.

-Cheers

Edit by strazer:

To make it update during blocking sequences, you can use repeatedly_execute_always now.
#2146
I was experimeting with bold character[]. variables  ;D and here is a simple global animation command:

=> newAnimationCharacter function [global script source] (ver0.2)


Well it's just a basic implementation and it has some bugs due to the lack of get-view(loop/frame)-data functions.

-Cheers
#2147
Quote from: RickJ on Mon 03/03/2003 15:54:22
Thanks for everything.
you are welcome. :)
The global move command works another way that the one from CCS where I used only AGS movecharacter function and hiding NPCs. The only disadvantage, as I said above, is speed calculatings.

QuoteI have added DoCase() and DoRandomCase() functions.  See my previous post or the text document.
oh, yes that's would be handy statements. Good work!

Another suggestion has just occured to me is (for future) is some sort of export import functions:
aeLoadThread(int ThreadId, string filename);
aeSaveThread(int ThreadId, string filename);
AeLoadThread(int ThreadId, string filename);
AeSaveThread(int ThreadId, string filename);

With these commands it would be possible to change code inside already compiled game. That might be useful. But that's not priority for now.

-Cheers
#2148
Oh, I have found the thread. bump up.

QuoteWhat convention should be used to name constants? Use aeNAME, AENAME, AE_NAME or some other variation?
aeNAME seems fine for me.

Quotewhich name is preferrable aeRepeat() or aeLoop()? aeRepeat is currently implemented to repeat the entire thread and simply jumps back to the beginning the specified number of times. What should I do about this?
I'm voting for aeLoop then.



After reviewing the first version of global move command I optimized it's code. The new version adds separate raw move command as well as global move command:

-  Global move script file v1.01
-  A little test game demonstrates global move in action [25kb]

Well, Rick, this way move command should work fine for AE. There is AGS_CHARACTERS_MAX constant which determines maximum number of characters. You may want to decrease it (originally it's 150) to see single NPC's footprints.

As you already know global move (new move) uses both raw move and AGS move function but there is a problem....
Although raw move command uses the same walking speed as AGS MoveCharacter() it doesn't work properly if there is anti-glide mode turned on. I just can't solve the problem of recalculating walkspeed as it depends on frame skipping speed.

-Cheers

#2149
WOWY! Works fine for me! Thanks a-v-o, that's really great plugin! ;D ;D ;D

... AGS moves on-line, heh ...

-Cheers
#2150
Has tried and it really good. Nice work! ;D

-Cheers
#2151
AGS Snow/Rain plugin 2.02 (original version):

http://americangirlscouts.org/agsresources/AGS%20resources/plugins/ags_snowrain202.zip (supports AGS 3.4.1 - Beta 6 and above; also supports AGS 2.71 and AGS 2.72)

Many thanks to http://americangirlscouts.org/agsresources/ for hosting!



AGS Snow/Rain plugin 3.0.0 ALPHAs (work in progress):

Snow/Rain 3.0.0-ALPHA-2: unavailable at the moment, use v2.02 for now (ONLY supports AGS 3.4.0 - Patch 4, running in Direct3D 9 graphics mode!)

Size: ~2.1 MiB




ORIGINAL VERSION:

Snow/Rain plugin (version 2.02) released.

Update: The version 2.02 has been released. It should solve the problem with the plugin not working with AGS v2.71. This also means it requires AGS v2.71 or above in order to run properly.

I totally rebuilt it so all function names have been changed (sorry). What's new?
- Added rain;
- Improved snow/rain control;
- Added ability to animate snowflakes/raindrops;
- Added ability to set snow/rain transparency (HiColor only);

Note: Since version 2.02 the plugin does NOT require the alleg40.dll library anymore, so you can safely remove it from your game COMPILED folder in case you have upgraded to the latest version.

Some other notes:
You can set the wind speed for the rain but keep in mind that it doesn't rotate raindrop sprites (currently that's not supported), and you then have to change them manually with the srSetRainView() function.
#2152
heh, finished and got 135 of 150. :) is it possible to get 150?
Love all: grafics, animations, story.
Yeah and very nice style music.
Thanks for this game, junc. ;)

-Cheers
#2153
just tried your editor AJA, really cool one! keep a good work! ;D
SMF spam blocked by CleanTalk