This site requires JavaScript, please enable it in your browser!
Greenfoot back

Report as inappropriate.

Kartoffelbrot
Kartoffelbrot presents ...

2013/5/15

Electricity

In this game it is the aim to turn on the lamp, by using your mouse to drag the cables and forming a wire from the generator to it.
I have only this first level yet, which is a bit buggy, too. Thanks to Busch2207 for help with the getIntersectingObjects()-methods.
Try it out!

2170 views / 14 in the last 7 days

7 votes | 0 in the last 7 days

Tags: mouse game simulation physics with-source electricity

open in greenfoot
Your browser does not support the canvas tag.
KartoffelbrotKartoffelbrot

2013/5/15

danpost is right!
KartoffelbrotKartoffelbrot

2013/5/15

Ok i will do. My last comment refers to your comment before.
Game/maniacGame/maniac

2013/5/21

The bulb does not light up when I connect the wires up
KartoffelbrotKartoffelbrot

2013/5/21

Hm, don't know what's wrong, try it again. Maybe there is cable a one-pixel-wide to far away.
A new version of this scenario was uploaded on Sat Sep 07 10:33:15 UTC 2013 source(maybe someone wants to see or use it)
A new version of this scenario was uploaded on Sat Sep 07 10:33:42 UTC 2013 source(maybe someone wants to see or use it)
HoshiwaraHoshiwara

2013/10/15

I was making something similar when I found this. It seems we both have the same issue. f you line the wires to power the bulb, but then remove the wire touching the battery or the one touching that the bulb stays on (infinite loop between the other 2 wires I believe). You thought of any fix for this?
KartoffelbrotKartoffelbrot

2013/10/16

Yes that was my biggest problem. I tried to give ID's to the cables, but It it hasn't worked. I had some other methods. For example I tried to save them, in an array. I worked quite long on this, but with sh** solutions. :( You can download the sourcecode if you want. Maybe you can fix that. Later on in other scenarios I only used one big cable to ignore this. Therefore I wrote a method, that places it from one point to another. Watch here: http://www.greenfoot.org/scenarios/9271 If you fix that problem and if you upload your scenario, please tell me.
Game/maniacGame/maniac

2013/10/16

fixed it for you
Game/maniacGame/maniac

2013/10/17

http://www.greenfoot.org/scenarios/9629 here is a link to your solution

See all comments

Want to leave a comment? You must first log in.

Who likes this?

MrHam Game/maniac Rudy K├╝rbiskern Busch2207 Tacko1996 JetLennit