Official Everybody Edits Forums

Do you think I could just leave this part blank and it'd be okay? We're just going to replace the whole thing with a header image anyway, right?

You are not logged in.

#1 2015-04-12 05:05:31, last edited by TiKen (2015-04-12 05:06:47)

TiKen
Member
Joined: 2015-02-24
Posts: 298

Pseudo-random number generator

I recently made a topic about a calculator that could be used to create awesome systems, and only based on switches.
Thinking about all the great RPG style maps that were created using a non-bot driven combat system I had an idea:

The problem with such map (except that it must be a real pain in the neck to build [even though the result is completely worth it]) is that the battle succession is hard coded and is the same, no matter how many time you play the map (At least for the one I played).

But what if one could generate a pseudo-random succession of states? With that the battle could only be dependent on the player and won't be entirely hard coded.



To test the concept, I created a demo-map here [ PWgpuL4dYTbEI ]. (Yes, it's the map of the calculator... I deleted the latter because I couldn't finish the subtraction anyway).

The concept is based on a succession of states which initialisation is done when the player join the room. However, this is still very crude and I'll list below the pros and cons I found while creating it:

Pros wrote:

- It is only based on spawns, switches and portals.
- Du to the switch implementation, the number of states can be really high: 2 to the power N, N being the number of switches you want to use!
- It doesn't require a lot of space: I created a 16 states one in the map.

Cons wrote:

- It uses a lot of switch and portals: O(2^(N+2)) and O(N) for 2^N states.
- Using spawns to initialize the generator requires some players. If you are the first to open the room, you will always have 0 as the seed.
- Since the succesion is, in the end, still hard coded, the states will move on a predefined successions of 2^N states. And it will restart once the end reached.
- Other stuff that I might have forgotten.

I though of differents improvement that could be done using time doors/gates (see world for visuals):

Possible improvments wrote:

-1: If the time between to states is long enough, you could use time d/g to decide whether to take the next state or a state situated X times after. In the world the exemple is not really good since I built an increment and a decrement. But you can get the idea.
-2: The second increment could be at the initialization: using time doors to decide between two different seeds. Will not work for the very first player if the time d/g are dependent on the room and not on the whole game.

I didn't build these improvements due to lack of time (real time, not time d/g) and switches d/g. (The improvment #2 uses a check point because I ran out of spawns T_T)

Any comments or ideas on how to improve it ?

Offline

Wooted by: (6)

#2 2015-04-12 05:18:58

TiKen
Member
Joined: 2015-02-24
Posts: 298

Re: Pseudo-random number generator

Wait, it's a functionnal demo map but kind of a tutorial... Should it be place in "level-creation"?
If yes, could a mod move it please?

Offline

Wooted by:

#3 2015-04-12 14:03:10, last edited by skullz17 (2015-04-12 14:04:10)

skullz17
Member
Joined: 2015-02-15
Posts: 6,697

Re: Pseudo-random number generator

Can you explain to me how you would make it, and exactly how it works? Also, I would like to use this for one of my worlds, if you don't mind giving permission.


m3gPDRb.png

thx for sig bobithan

Offline

#4 2015-04-12 15:33:23

ZeldaXD
EE Homeboy
From: Cyprus
Joined: 2015-02-15
Posts: 1,539
Website

Re: Pseudo-random number generator

This is really cool!


gLjTZE1.png

Offline

#5 2015-04-13 19:02:06

TiKen
Member
Joined: 2015-02-24
Posts: 298

Re: Pseudo-random number generator

skullz17 wrote:

Can you explain to me how you would make it, and exactly how it works? Also, I would like to use this for one of my worlds, if you don't mind giving permission.

After a quick chat with MIHB, I might upgrade the system and will do a complete tutorial on it. However it require some time and I don't know if I'll have any this week =S

And of course you can use it, It would actually be awesome if someone uses that stuff in a map!

Offline

#6 2015-04-13 20:32:22

Aaro54
Member
Joined: 2015-02-21
Posts: 163

Re: Pseudo-random number generator

For me, it seems to just go in order from lower to higher number.

Offline

#7 2015-04-13 22:46:22

TiKen
Member
Joined: 2015-02-24
Posts: 298

Re: Pseudo-random number generator

Aaro54 wrote:

For me, it seems to just go in order from lower to higher number.

Right now, yes it does ^^". A pseudo random generator works like this: you pick a seed, then every time you pick a random number, you simply take the next one in a list that can already be pre-determined from the seed.

However, if I mix the numbers displayed in each box (as it was initially), they will appear as if they were random, until the succession starts again. Then they will occur in the same order. Of course, right now, every one has the same succession of states, but starts at a different moment.

I'm thinking about a lot of different improvments that can be made according to others blocks and various conditions, but as I said, I don't really have time this week to develop those ideas. You are still highly welcome to propose improvements if any comes to your mind //forums.everybodyedits.com/img/smilies/wink

Offline

TiKen1428961582494505

Board footer

Powered by FluxBB

[ Started around 1711653191.9682 - Generated in 0.176 seconds, 12 queries executed - Memory usage: 1.45 MiB (Peak: 1.56 MiB) ]