How large can a INT be?
Displaying 1-12 of 12 total.
1
Please enter a numerical value for the importance of this sticky.
Enter 0 to unsticky.
Buckermann

I am creating my level advancement table with this:
	TB_XP_Table[1] = 100;

TB_XP_Table[2] = 200;
for (x = 3; x (less than) 99; x++)
{
TB_XP_Table[x]= TB_XP_Table[x-1] + TB_XP_Table[x-2];
Log("Level "+str(x)+" = "+str(TB_XP_Table[x]));
}

Up to level 35 everything looks good, but then I get into negative numbers
(logfile)
Level 3 = 300
Level 4 = 500
Level 5 = 800
Level 6 = 1300
Level 7 = 2100
Level 8 = 3400
Level 9 = 5500
Level 10 = 8900
[sniped some lines]
Level 33 = 570288700
Level 34 = 922746500
Level 35 = 1493035200
Level 36 = -1879185596
Level 37 = -386150396
Level 38 = 2029631304
Level 39 = 1643480908
Level 40 = -621855084
[snipped the rest]
Is there a way to increase the size of the INTs? Does Verge have DOUBLE?
Decreasing the starting value to 10/20 dosen't help much. Then I get into negative numbers at level 41.

Posted on 2004-06-03 17:25:09

blues_zodiakos

Hmm, I've been having trouble with numbers randomly turning negative on me... Maybe that's why.

Posted on 2004-06-03 17:33:20

vecna

ints can be -2^31 to +2^31. or, roughly +- 2 billion.
There's not really any plans to change that.

Posted on 2004-06-03 17:50:07

mcgrue

Buckerman:

There are flaws to having such drastically increasing XP scale. Your weird fibonacci-alike increase quickly becomes a nightmare, not only in the numbers involved, but the implications of enemies that feasably give enough XP to level in a few turns. This basically becomes a self-imposed cap by the designer that makes levelling beyond the 'suggested level' for a dungeona task for the foolish... which really is no fun at all.

I would suggest studying the XP requirements of each level in your favorite games, and comparing them to teh average XP recieved in the appropriate dungeons for any given level (ie, how much XP do monsters in the first cave give out, when you're supposed to be level 1-4. How many battles does it take to raise a level at that point?)

Just some things to consider.

Also, most console RPGs that use large-scale XP cap at 1,000,000, or to the best of my recollection, 9,999,999. Both numbers are easy to represent in a 32-bit int.

Posted on 2004-06-03 18:16:01

Buckermann

McGrue:
Good points.
I have to say don't intend to keep such a XP table for a real RPG. It's just something I quickly made up for the battle system contest.

But seeing that you dislike it, and you are probably one of the judges for the contest, I'll better make a good advancement table.

Posted on 2004-06-03 19:14:42

mcgrue

Eh... if you have enough content to keep me intrigued in your system past 10 levels of PC advancement, you'll've already impressed me. I doubt I'll be power-levelling to the point where your system breaks.

Posted on 2004-06-04 02:33:26

Gayo

Alternatively, you can take the route followed by Shining Force or .hack: base experience on the relation between the enemy's level and the player's level, so that once he's way above the local enemies in level they only give him 1 EXP per fight.

Posted on 2004-06-04 04:27:57

Buckermann

Quote:Originally posted by Gayo

Alternatively, you can take the route followed by Shining Force or .hack: base experience on the relation between the enemy's level and the player's level, so that once he's way above the local enemies in level they only give him 1 EXP per fight.

You mean something like this?

int TB_GetXPValue(int iEnemy)
{
int iPlrAvgLvl = TB_PartyLevel(); //get the average level of the party
int IEnemyLvl = TB_Enemies[iEnemy].Level; //get the level of the enemy
int iXP = ((BaseXP*iEnemyLvl)/iPlrAvgLvl);
return iXP;
//calculate XP based on difference between party
//level and enemy level. More XP if the enemy
//level is above the party level,
//less if it is below.
}
//Increase or decrease BaseXP if needed
Already implemented it a while ago.

Posted on 2004-06-04 04:55:46

el_desconocido

You could always make your int "roll over", but that can be a pain to track. Case in point: a timer that relies on the cpu's clock has some ugly code like:
    


if(new_perf_count < 0 && old_perf_count > 0) // flip
{
counts_lagging += ((new_perf_count + 9223372036854775808) + (9223372036854775807 - old_perf_count));
}
else
{
counts_lagging += (new_perf_count - old_perf_count);
}


El

PS: Vecna, what do you use for verge's rock solid timer? All the ones I could find lag massively, yet verge can properly loop my loops via your timer while defragging.

Posted on 2004-06-04 05:20:02 (last edited on 2004-06-05 00:36:16)

grenideer

if you base a timer off the system clock, nothing should really lag it, right?

Posted on 2004-06-04 06:21:40

geronimo

is the system clock we query (verge3 system clock) based off the, like, system system clock?

if you animate something frame-by-frame manually, it isn't necessarily synchronized with the system clock if the operations before the query consume mucho time, ci?

tho 1/100 of a second is like a week in cpu time i guess. drawing &c nonetheless...

Posted on 2004-06-06 11:59:29 (last edited on 2004-06-06 12:01:50)

el_desconocido

I have found verge's timing to be very accurate. timer less so but systemtime is almost atomic in solidity. [edit: no time to say why before work... only due to timer being changed by various wait() functions and possibly map switches, entity pausing, etc. Left to it's own devices, it is of course as solid as systemtime, but since tha latter is ever increasing at a steady rate, I tend to use it exclusively.]

The following is not related to verge:

In my very litte experience with the windows syster timer, it can send the timer message late, then send a few in a row to catch up making animations a little stuttery. I was having fun with big numbers and chose to learn about syncing with the cpu, rather than try other methods, and it worked for me. There are other methods, I suspect, which vecna may have used, such as emptying the message pump, placing selected messages in front and/or telling windows that your program has priority over stuff like checking if you just plugged in a new external floppy disc.

El

Posted on 2004-06-06 14:56:59 (last edited on 2004-06-07 02:57:13)


Displaying 1-12 of 12 total.
1
 
Newest messages

Ben McGraw's lovingly crafted this website from scratch for years.
It's a lot prettier this go around because of Jon Wofford.
Verge-rpg.com is a member of the lunarnet irc network, and would like to take this opportunity to remind you that regardless how babies taste, it is wrong to eat them.