Page 1 of 1

Tower of Hanoi-type mini-game?

Posted: Tue Dec 01, 2015 8:04 pm
by Quester
Has anyone seen a posting of Ren'py code for the classic Tower of Hanoi game (see attached screenshot) that could be incorporated into a VN? If so, could please you send me a link?

Re: Tower of Hanoi-type mini-game?

Posted: Tue Dec 01, 2015 8:35 pm
by xela
Never but this is easy to do, look for drag/drop and Solids.

Re: Tower of Hanoi-type mini-game?

Posted: Mon Jan 18, 2016 2:35 am
by Cazrook
I am new at this, and had been looking for some sort of minigame-like thing to practice Ren'Py programming. So I have flagrantly stolen your idea and implemented a Towers of Hanoi game/screen thing.

I'm sure the experts will find a lot of things I've done in it to be horrifying, but in the mean time, I will post it here in case you are still looking for something like it. hanoi.rpy is the game, script.rpy is just an example of how to call it. (Basically: use "call hanoi_game_start()" and pass the number of blocks to use.)

(Also, if any benevolent experts feel like pointing out one or two of the more horrifying things I've done so that I can avoid them in the future, it would be appreciated. Especially, if there's a way to avoid all the fiddly position calculation that seems necessary because Drags have to go in DragGroups instead of layout containers?)

Re: Tower of Hanoi-type mini-game?

Posted: Tue Jan 19, 2016 9:57 am
by xela
Looks solid, for someone "new at this", you get 11/10 for coding :)

Re: Tower of Hanoi-type mini-game?

Posted: Wed Jan 20, 2016 3:17 pm
by Alex
Could you post the script in a coockbook section?...))