Jump to content

Tetris


Ranger Fox

Recommended Posts

Early this month, Stompy&Stampy asked if it was possible to create a game of Tetris using Wherigo. While it is possible, the player apps need to be updated for it to be feasible. Most player apps require you to click somewhere else to refresh the map. That alone makes this a difficult cartridge to play in an app. I have also not tested this in an app long enough to see what happens if we get 150 active zones (blocks) shown in the well.

 

The good news is Webwigo, the online emulator, is really awesome with this cartridge. It works fabulously. If you want to play it, go to WGV6 on the Wherigo Foundation site and click "Play In Emulator" in the column to the right. You'll probably need to be logged in for this.

 

I included instructions in the cartridge. In short, four zones appear around the player in a D-pad formation. The left (west) zone will move the falling tetrimino left, right will move it right, up will rotate counterclockwise, and down will rotate counter-clockwise. There isn't a zone to move the tetrimino all the way down, so you'll have to wait for it to fall. I created an eventing system in the cartridge so a falling tetrimino is not deformed if the player tries to move it the moment the code makes it fall by a line. I'm also enjoying Lambda expressions, which I barely got into during my Cacher Pursuit arcade cartridge.

 

I implemented the bag system. I did not implement gravity fill for clumps after a line is cleared as it would have been quite a bit of math to figure that out (and I was lazy, possibly because I received the Oculus Rift and have been playing around with it).

 

Please note this cartridge is not currently open source. I own the code that runs this cartridge. I will release it as open source after the player apps can play this and I've placed a few Wherigo geocaches to get the general population to test this for me. After that, you can make cartridges based on this. Until then, I'll actively archive anyone who rips the source code and makes their own Wherigo geocache. So please play nice and give the player apps some time to update and testing to commence. I don't want to release a cartridge that will give people a hard time.

 

So, questions? Comments? Fun idea? How long did you play the cartridge in the emulator? Did you have fun? Let me know!

Link to comment

Wow awesome cartridge! I played through in the emulator for several minutes and had alot of fun with it. I would have never thought that something like this was possible with Wherigo. It's cartridges like these that show that just about any thing is possible. Thanks for sharing Ranger Fox! :D

Link to comment

To add...I played Tetris in the emulator for about 10 minutes which was enough for me to realize that I was never that good in Tetris! I panicked too much. ;) I think its a really great idea for a Wherigo. I wonder if a space invaders type game is possible for a Wherigo? The slow motion of the blocks, left or right up or down, sort of reminded me of that game.

Link to comment

I wonder if a space invaders type game is possible for a Wherigo? The slow motion of the blocks, left or right up or down, sort of reminded me of that game.

It's possible. What the Tetris concept also demonstrated was the ability to control things in the cartridge through zone entry events in the field. One of the concerns I had with Tetris was moving zones. As a zone is made up of a collection of points that form its shape, you'd have to calculate new positions for each of those points if you want your zone to move. I do not believe this is an expensive operation. Instead, I believe the expense comes in activating the zone. As I didn't want to deal with moving zones in Tetris, the well is made up of a grid of zones ten wide by twenty tall (the dimensions of almost all Tetris wells). I use these inactive zones like LEDs, de/activating them as needed to display the game (so Tetris does not have any moving zones despite how animated it looks). The emulators and apps could create these 200 inactive zones extremely quickly. As an experiment early on, I introduced some code to activate those zones. I can't remember exactly, but I think Groundspeak's emulator was able to activate around eight to ten zones a second.

 

One other thing before anyone wonders: I have emulator detection in Tetris. If you're running the emulator, the tetriminos fall faster than if you were out in the field. This makes sense as people in the field can't cover the same distance in the same time as someone in the emulator. I didn't want those playing in the emulator to have to wait the longer times for the game to play out, hence the emulator detection. It's the little things that make a game fun.

 

One other issue is how some player apps represent zones. The official iOS app represents zones as pins instead of shaded areas. Tetris or Space Invaders won't look as good with pins, so this is another reason we need to wait for the apps to be updated.

 

If we were to implement Space Invaders, I'd probably do the same thing to avoid the expense of calculating moving zones. But what of the individual invaders' iconic shapes? We could either make them all the same shape or draw all possible shapes in the same area and activate whichever zone is necessary. This might be something interesting for later.

 

It's funny you mention Space Invaders. I have an ambitious project in mind under the title "Wherigo Invaders". But that requires as its first step the Wherigo Foundation run Wherigo, then so much more needs to be in place after it.

Link to comment

 

It's funny you mention Space Invaders. I have an ambitious project in mind under the title "Wherigo Invaders". But that requires as its first step the Wherigo Foundation run Wherigo, then so much more needs to be in place after it.

 

Now you have me intrigued. I'm looking forward to seeing how Wherigo Invaders turns out! :)

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...