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

#581
The Rumpus Room / Re: Name the Game
Thu 25/02/2016 15:31:10
Puzznic?
#582
I haven't read the codes (and this thread thoroughly) but when you put "import something" into the script header, you're importing something defined in the Global script into rooms.
Since in your codes, InitBattle() is imported to the rooms in the header(I don't know whether it's defined in the Global script since it's not shown), it will generate an error when it is defined again in a room.
I'm not sure what you're after, but:
1. If the function InitBattle() is intended to be accessible to all the rooms, move the definition of the function from the room script to the Global script; or
2. if the function is only to be used in that single room, just remove that "import" line from the header.
#583
I've just received a PM from WHAM about his current status and why this thread is inactive ATM.
I'd rather not talk about what happened, unless he decides to post details here himself.
Anyway, he may still continue this game later but for the time being I'll lock this thread to avoid it being bumped up.
#584
The Rumpus Room / Re: Name the Game
Tue 09/02/2016 07:14:35
I thought it was Zombie Games. :grin:
#585
Looks nice, but the screenshots are HUGE! Especially when I'm still using a CRT with a desktop resolution of 1024x768.
It will be more readable if you use the [imgzoom][/imgzoom] tag instead of [img][/img] to post the images(if you're using the icon bar to insert the images, use the button with 4 red arrows pointing into its four edges).

Or, even better, the game seems to be meant to run in a low resolution anyway, and so screenshots in the game's original resolution is preferred.
#587
I don't remember whether you can use colour 0 to draw stuff on a surface to make it transparent, if this is the case, one simple way is to draw a smaller circle filled with colour 0 inside the original circle to puncture it, otherwise you may whip up a function like:

Code: ags

function DrawHollowCircle(DrawingSurface* surface, int ox, int oy, int radius){
  int dd, ii=0;
  int limit = FloatToInt(IntToFloat(radius)/Maths.Sqrt(2.0));
  while(ii<=limit){
    dd = FloatToInt(Maths.Sqrt(IntToFloat(radius*radius - ii*ii)));
    surface.DrawPixel(ox-ii,oy-dd);
    surface.DrawPixel(ox+ii,oy-dd);
    surface.DrawPixel(ox-ii,oy+dd);
    surface.DrawPixel(ox+ii,oy+dd);
    surface.DrawPixel(ox-dd,oy-ii);
    surface.DrawPixel(ox+dd,oy-ii);
    surface.DrawPixel(ox-dd,oy+ii);
    surface.DrawPixel(ox+dd,oy+ii);
    ii++;
  }
}

Edit: This should now work.
Edited again: Just saw the original DrawCircle() function doesn't include the colour either, so I just exercised the colour parameter for simplicity.
#589
As you already moved the viewport from x = 0 to 200, why don't you just do the reverse?

Code: ags

x=200;
while (x>=0) 
{
  SetViewport(x,0);
  Wait(1);
   x--; 
}

#590
Try to experiment with the speed parameter of the function until there is a value that fits you.
In particular, try a negative number.

From the manual(located at  Tutorial -> Setting up the game -> Characters, which unfortunately is a bit well-hidden):
QuoteThe "MovementSpeed" option allows you to control how fast the character moves when walking. Here, a larger number means he walks faster. If you find that a movement speed of 1 is still too fast, you can use negative numbers (eg. -3) which will move even more slowly. The lower you go, the slower the movement speed.

#591
The Rumpus Room / Re: *Guess the Movie Title*
Tue 22/12/2015 02:25:23
Piranha: Land Conquerors :grin:
#592
There are a number of ways to do this.
Below is a (probably not so good but) simple way:
Code: ags

//Put this in repeatedly execute always of the room:
if (!object[2].Moving){
  object[2].X = 0; object[2].Y = 100;
  object[2].Move(640, 100, 2, eNoBlock, eAnywhere);
}
#593
Quote from: Alen101 on Thu 17/12/2015 04:50:14
but it wont work with tint.

Yeah, it would work, depending what you really want:
Code: ags
cEgo.Tint(Random(255), Random(255), Random(255), 100, 100);


#594
Nice topic! And quite creative in using an AGI tool for drawing original SCUMM sprites. :grin:
Unfortunately I probably won't enter as I'm too lazy busy ATM.

Anyway, lemme spam this space with some of my old joke images: :=
[imgzoom]http://i488.photobucket.com/albums/rr249/gilbot/bj5agi.png[/imgzoom]
[imgzoom]http://i488.photobucket.com/albums/rr249/gilbot/AGIOS.png[/imgzoom]
(They are, of course, not entries as they don't fit the SCUMM requirements, but they're genuine AGI projects, just without any interactions.)
#595
IF it is possible that the engine can decide which algorithm to use itself then it's fine, and neither as a game option nor an extra function parameter would be necessary.

If this is not the case, however, remember the main reason(at least for now) for confusingly bringing up two different algorithms here is performance, and that's rarely a concern when DrawLine() is not used extensively. It's only when many long(and off-screen/off-surface) lines being drawn at once will this become an issue, so being able to switch the algorithm used at once for subsequent function calls would be more useful than having to tell the function to use the alternate algorithm(by means of the additional optional parameter) every single time it is needed.
#596
Of course I know the parameter is optional, but contrary to your idea, I think it is preferable to have all (or rather, a bundle of) DrawLine() calls to have the same algorithm.

For example, you may add an option to the game, so that the players may toggle which algorithm to use, depending on how powerful their rigs are. And this will not affect an already existing project, in which all the DrawLine() functions are not affected.
#597
Hmmm. Instead of adding an optional parameter, while not get/set the algorithm to use with a separate property?
(We already have a lot of cases like that, one example is the game-wide variable Speech.Style
and if we think it's not important enough to have its own enum and variable name, we may just add this feature to SetGameOption() and GetGameOption().)
So that when once set in code, the remaining DrawLine() calls will stick to one single algorithm, until it is changed again.
This makes no change in codes for existing projects. For example:
Code: ags

SetGameOption(OPT_DRAWLINEMODE, 1); //Say 0 for original(default) algorithm and 1 for fast algorithm
s.DrawLine(blah);
s.DrawLine(blah bla);
...
#598
From the Wiki:
Quote
Two good choices of such programmes are Deluxe Paint ][ Enhanced (DP2E) and Grafx 2, as they're 8-bit pixel graphics editors and they won't do foolish things automatically (like "friendly" sorting and trimming your palette, merging slots with similar colours, dithering you images, etc.).
Anyway, if one seriously need to use 8-bit images use only real 8-bit editors. :=
#599
The Rumpus Room / Re: Name the Game
Fri 13/11/2015 16:17:23
Oscar: GTFA (Grab The F... Flying Automobile) Edition
#600
The Rumpus Room / Re: Name the Game
Fri 13/11/2015 02:31:27
Oscar: GTA edition?
SMF spam blocked by CleanTalk