[Suggestion]"Random Switch"

General Mar0 discussion has been moved to this subforum!
Post Reply
User avatar
HansAgain
Posts: 1111
Joined: 03 Feb 2012, 18:51
Contact:

Post » 03 Jan 2014, 23:15

First, does LÖVE (and Lua) accept random variables?
If not, stop reading and reply "Not".
If yes, continue reading.

Something that activates things randomly.
Ex.:
You connect three lasers to the "random switch", then connect it to a push button. If you push the button, the "random switch" will activate one of the lasers, if you push it again, it will deactivate the laser and activate another (being random, i think there would be a possibility of activating the same laser again).

If you connect only one thing to it, it will activate it and keep it activated even if you push the button a lot of times.

If you only connect it to a NOT gate, when the level is just loaded, the random switch already had activated one of the lasers.

If you connect it to a squarewave, it will activate one thing for x seconds, then another thing for x seconds, and then another...

Should be noted that it don't have an OFF (if someone thing it should have, suggest it), it has an ON and another ON. (i don't know how to explain it better)
^This mean that if you connect it to a floor button it won't work efficiently.

Thanks for reading (if you read it).

User avatar
Automatik
Posts: 1073
Joined: 20 Jul 2012, 17:54
Contact:

Post » 03 Jan 2014, 23:24

Yes, Löve can have random variables.(math.random) And yes, that idea is possible.

User avatar
Sašo
Stabyourself.net
Posts: 1444
Joined: 06 Jan 2012, 12:07

Post » 04 Jan 2014, 00:25

I'm sure you could have great fun in a level where there's a switch which has a chance to completely stop you from finishing a level or just slow you down pointlessly.

User avatar
HansAgain
Posts: 1111
Joined: 03 Feb 2012, 18:51
Contact:

Post » 04 Jan 2014, 00:37

I was planning doing something like in Hermie Hopperhead. The final boss (link) randomly throws dead enemies, so i was thinking i use the randow switch and the enemy spawner (SE), to do a boss battle like in that game.

Also, giving the possibility to the player to start with different powers.

Or, do like in a roulette wheel and put different prizes to receive in different paths.

Camewel
Posts: 2996
Joined: 02 Feb 2012, 21:32

Post » 04 Jan 2014, 01:42

Sašo wrote:I'm sure you could have great fun in a level where there's a switch which has a chance to completely stop you from finishing a level or just slow you down pointlessly.
classic straw man fallacy

the idea is pretty good, but needs polish. I'm thinking when you power the input, it powers a random output until you unpower the input. each time you turn the power on to the input it picks a new random output (can be the same) so it's easy to program (probably) and also functional

User avatar
BobTheLawyer
Posts: 2232
Joined: 01 May 2012, 21:00

Post » 04 Jan 2014, 02:31

I'm thinking just give us random variables in custom entities or I'm going to kill someone

Camewel
Posts: 2996
Joined: 02 Feb 2012, 21:32

Post » 04 Jan 2014, 02:35

you can make enemies spawn at "random" times

User avatar
Sašo
Stabyourself.net
Posts: 1444
Joined: 06 Jan 2012, 12:07

Post » 04 Jan 2014, 02:40

Camewel wrote:
Sašo wrote:I'm sure you could have great fun in a level where there's a switch which has a chance to completely stop you from finishing a level or just slow you down pointlessly.
classic straw man fallacy

the idea is pretty good, but needs polish. I'm thinking when you power the input, it powers a random output until you unpower the input. each time you turn the power on to the input it picks a new random output (can be the same) so it's easy to program (probably) and also functional
My point is that the entity lacks a specific scenario of usage. Though in this case it could be sort of half hacked together using buttons and goomba spawners.

My point is that using it for any kind of puzzles would be more irritating than anything else. If you played Portal you'd know that everything that was happening automatically in Portal (especially before you get the portal gun when you have to bring a block to a different room to open the door), it was happening based on a pattern.

Randomness, as much as you can achieve with it, isn't always good. Especially in the case of Mari0 puzzle levels.

User avatar
BobTheLawyer
Posts: 2232
Joined: 01 May 2012, 21:00

Post » 04 Jan 2014, 02:43

Camewel wrote:you can make enemies spawn at "random" times
Not what I want.

More of a boss that may do one of 3 things, either a, b, or c.
Which one he does is random. Makes him unpredictable and less easy to beat.

Camewel
Posts: 2996
Joined: 02 Feb 2012, 21:32

Post » 04 Jan 2014, 02:43

Sašo wrote:Randomness, as much as you can achieve with it, isn't always good. Especially in the case of Mari0 puzzle levels.
You're forgetting platformer levels, where randomness can be very useful.
You could also make some nice mazes with it or something probably.

Post Reply