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

#1221
Haven't read the second part, but for the int-float part, since you're only going to use an integer result, you may try to simply the formula and see whether it can be done with only integer arithmetic.

The formula can be simplified as:
percentage = experience/(level*10)

The trick is, make sure that integer division operations are done at the very last moment (which already is the case in the above formula). So:
Code: ags

lbExp.Text = String.Format("%d%",experience/(level*10));

Note that since it now uses integer division, the result may deviate a tiny bit from what was done with floating point division and then have the result truncated.
#1222
Well, the car that my family used some 20 years ago did have its license plate starting with CJ...
#1223
What anti-virus software are you using?
It's most like a false alarm.
#1224
To be honest, pretty much no people will thank you for your friendly reply here. Just let the mods handle this. :P
#1225
Or you may call it the ASCII number (or slot) of the character.
#1226
Or, use my solution as described here if you don't mind slight difference from the actual "pure" blue ones.
#1227
As far as I know, AGS can only display symbols #0-127 if it's a SCI font, and #0-255 if it's a TTF.
So, if you're not using TTF yet, switch to TTF, and if you're already using TTF, make sure the extra characters weren't added to indices beyond #255.
#1228
The reason is that, sprite data in an AGS games are not compressed by default, and are RLE encoded when the "compress sprite data" option is checked.
Since each and every single pixel of this image is of a different colour, the retarded RLE sprite compression wouldn't help at all (and possibly even bumps up the size a bit due to overheads).

An alternate way that may help is to make this image a room background (as room background images adopt a better compression scheme than sprites), load this room when the game starts and create a dynamic sprite from its background for this purpose. It still wastes a large amount of memory in game, but at least hopefully the increase in file size of the game won't be that huge.
#1229
Edited: Swapped back x and y for the correct order.

I'm halfway through your codes, not finish reading it yet, but one obvious problem is that you calculate the slope wrongly.

No matter what (x1, y1) and (x2, y2) are, the slope is defined by: (y2-y1)/(x2-x1) (or (y1-y2)/(x1-x2), which is essentially the same thing). Note that if you subtract x1 from x2 in the denominator, then you have to subtract y1 from y2 in the numerator, that is, the numbers in the numerator and the denominator have to be subtracted in the same order.

In your codes you choose to use x2-x1 or x1-x2 according to which is larger. This is fine, but the y's in the numerator should be subtracted in the same order, not according to which of the y's is larger, so this part:
Code: ags

    if(y1 > y2) rise = y1-y2;
    else rise = y2-y1;
    
    float slope = rise/run;

should probably should be
Code: ags

    if(positive) slope = (y2-y1)/run;
    else slope = (y1-y2)/run;
    

There may be other errors in the remaining codes but I'm in a hurry atm.
#1230
Change (3/4) to (3.0/4.0) or 0.75 . I'm not sure, but it's possible that .75 won't work. You need to use 0.75.
#1231
Either use the dialog object name you have set in the editor (default names are something like dDialog0):
Code: ags
if (floor==2) dDialog0.SetOptionState(2,eOptionOff);

or, if you want to use the array to refer to it:
Code: ags
if (floor==2) dialog[0].SetOptionState(2,eOptionOff);

(Note that the d in dialog is in lower case.)
#1232
Did you create the variable tag within a function? Try putting the declaration outside of the function, as it's possible that the sprite is destroyed once the pointer to it is destroyed, after the function ends.
#1233
While nobody actually cared, what I wrote here served as a form of screen transition, which was actually part of the silly tests that I conducted some time earlier.
#1234
 >:( STOP humiliating each other for their habits on formating. This is OT for this topic and pointless. I'll consider locking this or deleting posts if this continues.
#1235
I can see it, at least ATM.
#1236
TBH I've never heard of it. Guess it's more or less a western thingie. :P
#1237
This actually belongs to the Critics Lounge than this forum.
#1238
This is because it is not a convention for Sprite Jams to have the winners decided by voting. The methods of deciding the winners are actually decided by the hosts themselves, and in fact, most SJ rounds had the winners decided directly by the hosts, rather than by voting.
#1239
No, if there is a single line of code you don't need the braces (though adding them there wouldn't hurt).

Also, your line shouldn't work either, as you've added a semi-colon that shouldn't be there:

if (oFruit.Visible == true); {
  Display ("There is no need to climb the tree.");
}
#1240
I don't know, but I think the thumbnail version looks fine, apart from the colour. The brownish colour makes the treasure look more like soil to me. I'd expect it to be more yellowish in colour, and since you're going for a "stylish" palette, if you don't want to change it, at least add more glitters to make it more shinny, just like the treasure in the dragon cave in Loom.

The smoothness of the large version (I know, it's lacking details atm) makes it look even more like piles of sand or soil. Possibly help in making them more grainy.
SMF spam blocked by CleanTalk