Game release: OH Shooter. The worlds first HAFPS!

Have you ever dreamt of combining your home automation with a fun game? Your waiting is over!

I present to you OH Shooter. The worlds very first Home Automation First Person Shooter (abbreviated HAFPS, made the term up myself). And it’s completely free!

Game idea
You want your house to be completely dark, but someone is randomly lighting up stuff. Luckily enough you’ve got an AK47 and if you shoot them they switch off again. See how many you succeed in switching off before the house is fully lit up!

(and yes, there is a simulate mode, so you don’t really need your entire house flashing to try this out)

Requirements

  • A computer running Windows and probably some Direct X on it.
  • A working openHAB installation reachable from the computer above.
  • A sitemap with some switches in it.

Instructions
Just unpack the zip and couble click the exe. You control the game with the keys W, A, S, D and the mouse. Press ESC to get to the game menu. Don’t push the arrow buttons.

Disclaimer
I take no responsibility. The game is probably full of bugs and on top of that someone might just die of an epileptic seizure while you’re playing. You have been warned.

Background
There was two todo’s on my list:

  • My 11 years old son wanting to learn how to do computer games, and to learn him I had to learn first
  • Me wanting to try the openHAB API out.

So I thought I’d combine them. And in the choice between doing something useful or something fun I obviously chose the fun. So now I’ve spent a couple of days learning Unity. It really isn’t very hard if you’ve done some programming before. And the openHAB API didn’t take many minutes to grasp :slight_smile:

Future
So, this is really a completely useless crap game (and not even really finished), but I thought maybe I could do something useful of the idea of combining 3D engine and openHAB. I’m thinking maybe an alternative mobile app drawing the sitemap in 3D? Unity has full support for Android and iOS. Maybe something really nice to present on the wall mounted tabled…

Anyone got any other good ideas?

Download link
kolefors.se/OHshooter.zip

4 Likes

Could you please share source files?

I’ll have to give that a think. Being my first ever Unity project the source is really messy :wink:

Funny idea, but doesn’t work for me.
If I enter the hostname only, it keeps telling me Error fetching sitemap if I enter :8080 that msg disappears but no items to shoot at. As sitemap I just entered its name (name of the file without the .sitemap ending).

Strange… If you don’t get any error message it means it can read the sitemap. I guess for some reason it doesn’t succeed in finding any switches in it… Would you mind sending me the sitemap json so I can look at it? The file you get when you go to http://hostname/rest/sitemaps/sitemapname.

I managed to put up a simple test sitemap to work with it.
Seems to work with plain Switch entries only. Not with mappings=[…] as I use them on some switches, and not for dimmers (sliders in sitemap). Still a nice play, though.

Doh. No, I only have plain switches on the sitemap I’ve used for this. Guess I’ll have to add some more fancy test stuff to it then :slight_smile:

Ok, did a sitemap with some mappings (to string items) and dimmers on and gave this a thought. I guess dimmers is easy to implement, just instead of switches that’s being turned off and on they should be dimmed up and down. Don’t really know about strings though, it’s hard to know what state they should take when being shot :slight_smile:

Guess you should introduce a damage system - every hit to dim the light by a couple of percents. Intuitive, isn’t it :slight_smile:

Yeah, I thought about that too. So shutting down a dimmer completely would require the player to pump it with gunfire for a while. Next time I get inspiration to continue with that we’ll see :slight_smile:

Oh, that sounds like a really cool concept! Combining home automation with a first-person shooter game sounds intriguing.

I’ve always been a fan of innovative ideas in gaming. Personally, I’m more into survival games, but I’m always open to trying out new experiences. However, I’m always open to trying out new and unique gaming experiences, especially when they blend different aspects like home automation and FPS gameplay.