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

#7121
It's just common problems with your monitor not set to that resolution before, just mess with your monitor's controls (usually knobs/buttons in front of it, or sometimes they even provide softwares for it).
#7122
Woot.
#7123
Well... villagephotos has a limit of about 5MB transfer/day or so, if your avatar is frequently accessed in a popular forum (hint hint: here) you'll have it exceeded VERY easily...













(That's the reason I removed my avatar after 1 day :P)
#7124
Actually I like that style, that makes your game's graphics stand out from others.



Heh reminds me of the good old time when there's no flood fill function in Whiteboard...
#7125
If you just use a fix index, you can just use the blah[15] method, but the getstat() functions would make your codes more readible actually, moreover if you use a variable indices, it would be better to use the get/set stats too, eg:

setstat(row,column); when row and column are 2 variables that may have their values changed in your game.
#7126
Right, let's illustrate it as an example:

Say, we want an array of 3*6 elements, so we define it by:
int blah[18]; // 3*6=18
Then, to refer to element [ x ][ y ], we use the formula:
(x * 6 + y) to find it from our array.
Actually the indices are arranged like:


Where the red numbers are the real indices of in the 1D array you created which correspond to each of the elements.

For example, to find element [ 2 ][ 3 ] you can calculate:
2*6+3=15

ie it's blah[ 15 ]
#7127
That's the problem:
Code: ags

function getstats(int x, int y) {
return stats[x*4 + y];
}
function setstats(int x, int y, int value) {
stats[x*4 + y] = value;
}
#7128
hmmm are you sure you are using the correct formula for the indices in setstat and getstat? Seems that you're grabbing values from outside the array boundary.
#7129
Right
#7130
:p

Just declare the chance on top of that script:
int chance;

Hmm I didn't read the codes carefully, but if you're making 2*4 arrays, the correct formula to get the index from [ x ][ y ] is:

x*4+y
#7131
Ditch Windows, DOS worked best anyway.


Hmmm did you run cwsdpmi on command line yourself? You don't need to, just throw it in one of your paths (most of the time just the DOS directory) and it should work. Maybe there're some problems with configurations of the CWSDPMI extender, but that's a quite technical thing to do...
#7132
Damn I missed so many released.

Just had a quick test with the alpha demo:

640x480fullscreen: 62-64FPS

P4 2.4GHz
Some onboard Intel Extreme graphics card (or whatever)
#7133
Didn't see the problem to fuzz's code, maybe there're more missing stuffs in other perts of the code, you may need to post the whole function here.

Hmmmm I don't know, unless it is your intention, as you called Random(20) twice, so, if the player didn't "hit", due to that extra random(20) in the else part, it would randomize again, and probably won't give you the "missed" response most of the time.I suggest it to be:
Code: ags

//character attack------------------------------
chance=Random(20); //define this variable first of course
if(chance<(getstats(1,4)-(getstats(2,1)))
{
setstats (2,2,getstats(1,3)-Random (3));
Display ("You swing and hit");
}
else if (chance>(getstats(1,4)-(getstats(2,1)))
{
setstats (2,2,getstats(1,3)-Random (3));
Display ("You swing and miss");
}


And currently the code would od nothing if chance equals (getstats(1,4)-(getstats(2,1)), if that's not what you want, the simplest code would be just:
Code: ags

//character attack------------------------------
chance=Random(20); //define this variable first of course
if(chance<(getstats(1,4)-(getstats(2,1)))
{
setstats (2,2,getstats(1,3)-Random (3));
Display ("You swing and hit");
}
else
{
setstats (2,2,getstats(1,3)-Random (3));
Display ("You swing and miss");
}

#7134
Advanced Technical Forum / Re:2d arrays....
Mon 17/11/2003 03:19:17
Quote from: Guybrush Peepwood on Thu 13/11/2003 20:34:42
var[2*(1+1)] would be exactly the same to var[4*(0+1)]

Well, I don't really know how you came up with these indices. When you have fixed the dimensions of a 2D array, the formula is fixed.
Example, to make an array of 3*2 (=6) elements, you do:
int blah[6];

So to refer to element [ x ][ y ], we use the index:
x*2+y

So to sum up, the respective indices are:
[ 0 ][ 0 ] should use index 0*2+0=0
[ 0 ][ 1 ] should use index 0*2+1=1
[ 1 ][ 0 ] should use index 1*2+0=2
[ 1 ][ 1 ] should use index 1*2+1=3
[ 2 ][ 0 ] should use index 2*2+0=4
[ 2 ][ 1 ] should use index 2*2+1=5

So there won't be any clash in indices.
#7135
<-- Well I think I don't need to explain about my avatar, it explains itself.










...Wait! When did I take it away?2?



Alright my original avatar is here:
#7136
Heh calm down everyone, he's just praising the marvelous product from our all mighty GOD and furthermore, he's not TEH 1337 member!





However the only thing I want to say here is:
I won't download more than 100 game engines in one single day!
#7137
General Discussion / Re:Presenting "La Zucca"
Thu 13/11/2003 08:37:47
What?2? 91MB? That must be crazzzzzzzzzy, only insane f00 would download that!1!




* Gilbot V7000a starts teh download.
#7138
Just modify that character's inventory content direct via the character[...].inv[...] variables. For example, to add inv. #3 to inventory of character BLAH, use:

character[BLAH].inv[3]++;

You can do any arimetic manupulations with these variables.

if you want to display the inv. contents, just change to that character temporily before displaying an inv. GUI.
#7139
No, currently you need to use dummy characters if you want more than one inventories.
#7140
Actually the link should work, at least while dragging it to the address bar, the only problem was that his site had the max. transfer bandwidth exceeded, so you (I) may need to try again later.
SMF spam blocked by CleanTalk