Home    LittleBigPlanet 2 - 3 - Vita - Karting    LittleBigPlanet 2    [LBP2] Help!
#1

Advanced Logic Help

Archive: 17 posts


Hi I seldom ask for help concerning logic but there is something that has been plaguing me for a while now.

And that's carrying stats or information from one level to another.

He's is my scenario I'm building an RPG type game, and the player levels up 0 to 20. I decided to use score as XP so data transfer was simple and worked in a series like way. Everything works perfectly like this and even the story is tied to your XP level.

However I would really like to add another variable to the mix and that is continues. Continues are collectable through out a level I decided to have a 6 continue cap, so 0 to 6.

Combining the two I figued I would have to use a binary anding system to try and cover the variables. I ain't no math wiz but isn't that 7 to the power of 21 (that's including the zeros) which goes way beyond binary anding that LBP allows! (besides I wouldn't want to go above 8bit as there would be too many passwords to have enterable 8bit =256) plus there is the xp inbetween the levels that is also a variable.

e.g level 3.33

Is there a possible way of covering these variables using a method I can't see, or do I ask the impossible here?..
2011-08-08 09:52:00

Author:
clarkdef
Posts: 138


No, it's not to the power of, it's just mulitplication. 7 possible values for continues times 21 possibles values for levels gives 147 possible combinations. Dividing the maximum score of 4,000,000 by 147 leaves a maximum of 27210 XP per level.2011-08-08 10:31:00

Author:
Rogar
Posts: 2284


No, it's not to the power of, it's just mulitplication. 7 possible values for continues times 21 possibles values for levels gives 147 possible combinations. Dividing the maximum score of 4,000,000 by 147 leaves a maximum of 27210 XP per level.

Ah yep multiplied. so I can fit 147 in there. But still a problem of the points in between the levels. It could just have a state for every 1/4 of any level. So that will then be 21x7x4+588 which would need 10bits. Not ideal but an option...
2011-08-08 10:54:00

Author:
clarkdef
Posts: 138


But still a problem of the points in between the levels. It could just have a state for every 1/4 of any level. So that will then be 21x7x4+588 which would need 10bits. Not ideal but an option...

Not sure what you mean by this. Are you planning to support multiplayer?

Another option is to use a cumulative XP system, and infer the player's level from their score, e.g. 0-999 = level 1, 1000-1999 = level 2, etc. - then you don't need to store it in an independent variable.
2011-08-08 15:16:00

Author:
Aya042
Posts: 2870


Not sure what you mean by this. Are you planning to support multiplayer?

Another option is to use a cumulative XP system, and infer the player's level from their score, e.g. 0-999 = level 1, 1000-1999 = level 2, etc. - then you don't need to store it in an independent variable.

That is exactly what I am doing. But I wanted to carry additional information over also. A pickup of 0-7. No multiplayer also.

I think that it's not possible.
2011-08-08 22:40:00

Author:
clarkdef
Posts: 138


That is exactly what I am doing. But I wanted to carry additional information over also. A pickup of 0-7.

So just add (pickup x 100,000) before changing level, then subtract it afterwards.

Have you watched Comph's vid?


http://www.youtube.com/watch?v=pLF_GsQmPdU
2011-08-08 23:22:00

Author:
Aya042
Posts: 2870


So just add (pickup x 100,000) before changing level, then subtract it afterwards.

Have you watched Comph's vid?


http://www.youtube.com/watch?v=pLF_GsQmPdU

That's the anding method and does work. But because there is not enough bits to get the inbetweens on the leveling up system.

e.g If you were level 3 and 3/4 with 4 continues and you finished the stage. All you can convert in the link is level 3 with 4 continues the (3/4) will not carry over, keep in mind that it would be impossible to cover those >inbetweens< the >level< and the >continues< with only 1,000,000 points and the player needs a password per variable.

I might be missing something here.

I wish I could draw a picture

0...1......2............3........................4 ..........................................5 and so on

the varibles in the leveling up system are the numbers and the dots. Doing this in series works perfect like when each step is (L0 0pt)- 10pt 10 pt 10pt - (L1 30pt)- 10pt 10pt 10pt 10pt 10pt 10pt - (2 60pt) and so on

doing the series method means you ain't dealing with variables which is GREAT! But you can't take another variable on to that.

So the other method is the one in the video which can't fit all them dots in, it's just too much. So what i'm looking for is a completly new way, one that I can't see.
2011-08-09 02:33:00

Author:
clarkdef
Posts: 138


could you do this?

Score 123456

The numbers break down into sets

Set 1, 12 represents the player level.
Set 2, 345: represents the player's progress through the current level (e.g. if the player is level 12, then we know what the XP to progress to 13 is by default. All we need to know is that he has 90% of those points in order to calculate actual values).
Set 3: 6 represents number of continues left.

Since things like level XP value requirements never change, they can be stored as static items in each level. If level 12 always requires X amount of XP whether you are playing the first part of the story, or the last part, there is no need to encode/decode it each time.
2011-08-09 07:09:00

Author:
tdarb
Posts: 689


Or... Keep it simple and have it auto level up at the end of the stage. In essence rounding up. I've been thinking about this myself and don't think it ruins anything doing it. Keeps it to two digits, a third digit could be used as a basic ten count 1 being 10% 9 being 90%.

This then becomes a decision of 'if they get to the end with 93% do I level them up or round them down?'
2011-08-09 08:13:00

Author:
Mr_Fusion
Posts: 1799


could you do this?

Score 123456

The numbers break down into sets

Set 1, 12 represents the player level.
Set 2, 345: represents the player's progress through the current level (e.g. if the player is level 12, then we know what the XP to progress to 13 is by default. All we need to know is that he has 90% of those points in order to calculate actual values).
Set 3: 6 represents number of continues left.

Since things like level XP value requirements never change, they can be stored as static items in each level. If level 12 always requires X amount of XP whether you are playing the first part of the story, or the last part, there is no need to encode/decode it each time.

Actually worth a good though cheers man


So you're saying keep every level up count the same? This would not be an option as it's a free roaming thing and you could just farm the first level.

No I don't want it rounding up but thanks for the suggestion .
2011-08-09 11:10:00

Author:
clarkdef
Posts: 138


...there is not enough bits to get the inbetweens on the leveling up system.

Well, don't (necessarily) think in terms of bits. Bit-encoding only works efficiently when the variables you want to store have an exact power-of-two number of possible values.



If you were level 3 and 3/4 with 4 continues and you finished the stage. All you can convert in the link is level 3 with 4 continues the (3/4) will not carry over, keep in mind that it would be impossible to cover those >inbetweens< the >level< and the >continues< with only 1,000,000 points and the player needs a password per variable.

0...1......2............3........................4 ..........................................5 and so on

the varibles in the leveling up system are the numbers and the dots. Doing this in series works perfect like when each step is (L0 0pt)- 10pt 10 pt 10pt - (L1 30pt)- 10pt 10pt 10pt 10pt 10pt 10pt - (2 60pt) and so on

Maybe I'm missing something here, but I thought you said the player's score is their XP, so that automatically gets transferred. Let's see if I can explain a bit better...

First, though, there seems to be a fundamental problem with your maths. Based on your diagram it looks as if the idea is that to get to level 'n', you need (2^(n-1) x 30) points, which would mean to get to level 20, you'd need 15,728,640 points which ain't gonna work.

Let's assume there's only 12 levels instead...

Level 1 = 30 XP
Level 2 = 60 XP
Level 3 = 120 XP
Level 4 = 240 XP
Level 5 = 480 XP
Level 6 = 960 XP
Level 7 = 1,920 XP
Level 8 = 3,840 XP
Level 9 = 7,860 XP
Level 10 = 15,360 XP
Level 11 = 30,720 XP
Level 12 = 61,440 XP

Ignore the 'continues' for now, and just use these values to set up a simple level-detection system which you'd put in a every level, so if you set up a number of Score Sensors at values 30, 60, 120, 240, etc., feed each one into consecutive ports on a Selector, then the Selector's active output tells you which level you're at.

With a simple system like that, you already have score (XP) transferred, and you know what level the player is at by looking at the Selector output, so if I understand correctly, all we need to do now is transfer the number of continues, and given that any score over 100,000 isn't possible, you can encode that in multiples of 100,000.

Encoding is simple, if you store the number of continues in, say, a five-port selector, then just add (continues x 100,000) to the score before entering the level link.

Decoding is a little more complex, due to the maximum Score Sensor value being 100,000, so you'll have to do it iteratively. After travelling through the link, you'll need a setup like...

Start with the 'continues' Selector at zero.
If the player's score is less than 100,000, finish.
Subtract 100,000 from the player's score, and cycle the 'continues' Selector.
Goto 2


So, if the player has 1,234 XP and 3 continues before the level link, the encoded score would be 301,234, and upon entering the next level, 300,000 would be subtracted, leaving 1,234, from which level 6 is automatically inferred by the other Selector.
2011-08-09 16:25:00

Author:
Aya042
Posts: 2870


Wow, now that's how you answer a question. Even I understood it, where are you guys when I post my brain twisters?2011-08-09 17:46:00

Author:
Unknown User


That was just an example. The actually system is like this

100
200
300
400
600
800
1000
1200
1800
2000
2400
2800
3600
4400
5200
6000
7600
9400
11000
12600

That's actually a good idea you had there Aya, I think I could get that to work. I was working on it last night and I figued a way of using the tens to hold the continue info but having it higher might be easier.

I should go have a play with it.
2011-08-09 22:34:00

Author:
clarkdef
Posts: 138


Thanks everybody with your advice I motivated myself and came up with a system 2011-08-10 15:03:00

Author:
clarkdef
Posts: 138


Thanks everybody with your advice I motivated myself and came up with a system

Good for you!!!
2011-08-11 00:23:00

Author:
zzmorg82
Posts: 948


Actually worth a good though cheers man


So you're saying keep every level up count the same? This would not be an option as it's a free roaming thing and you could just farm the first level.

No I don't want it rounding up but thanks for the suggestion .

I have no idea what solution you came up with but I figured I would throw this out:

you could just make the experienced earned from a given kill inversely proportional to the player's level. So that if someone tries to farm, they hit a wall of diminishing returns that makes it way too time-consuming to bother with.
2011-08-11 03:51:00

Author:
Speed Racer
Posts: 156


I have no idea what solution you came up with but I figured I would throw this out:

you could just make the experienced earned from a given kill inversely proportional to the player's level. So that if someone tries to farm, they hit a wall of diminishing returns that makes it way too time-consuming to bother with.

That's kinda like Borderlands. In that lower class enemies give you less and less until they are give 1xp.

Is that what you meant? I found the right solution for me, but there are otherways to explore too.
2011-08-12 09:49:00

Author:
clarkdef
Posts: 138


LBPCentral Archive Statistics
Posts: 1077139    Threads: 69970    Members: 9661    Archive-Date: 2019-01-19

Datenschutz
Aus dem Archiv wurden alle persönlichen Daten wie Name, Anschrift, Email etc. - aber auch sämtliche Inhalte wie z.B. persönliche Nachrichten - entfernt.
Die Nutzung dieser Webseite erfolgt ohne Speicherung personenbezogener Daten. Es werden keinerlei Cookies, Logs, 3rd-Party-Plugins etc. verwendet.