thenut at May 16th, 2011 05:00 — #1
Description Duck Hunt
Click here to play Duck Hunt.
The game was tested on Firefox 4.0.1 and Chrome 11.0.696.68. The game requires a computer with a WebGL compatible video card and drivers. There are some audio playback issues in both Chrome and Firefox. Chrome seems to have complications when you attempt to reset the audio position back to the beginning. It also doesn't handle multiple sounds very well. Firefox is almost flawless, except that it sometimes runs into a network issue and cannot load the game music, throwing a 404 error without an actual server response (say what?!).
The core Nutty WebGL Engine currently features:
High level OGL ES 2.0 classes to manage VBOs, FBOs, shaders, and rendering.
Particle emitters with support for injecting custom particle modifiers, making it really easy to experiment with various particle effects.
UI system with controls such as buttons, progress bars, images, lists, window frames, etc.
Loads resources and UI controls via XML files with support for custom elements.
Supports keyframe animations and storyboards, as well as sprite animations.
Various math routines, matrix and vector transformation classes, intersection testing, etc.
Skeletal animation is one of the last remaining features to be ported over. Following that, I'd like to build a couple more games and see how things go.
My development experience with WebGL has been a pleasant one so far. If you come from a background of OpenGL, you will find WebGL to be quite familiar and easy. If you don't have any experience, it makes for an excellent platform to learn from. For a good intro to WebGL, check out Leaning WebGL.
roel at May 16th, 2011 05:54 — #2
Heh, the speeds get quickly insane. But I was lucky enough to hit the frog
thenut at May 16th, 2011 15:15 — #3
Yeah, wildlife tends to do that when being shot at :lol:
dk2 at May 19th, 2011 03:26 — #4
Really nice game! This could make a good iPhone/Android game too
oisyn at May 19th, 2011 05:57 — #5
Damnit, got 670, but after entering my name I accidentally pressed "cancel" instead of "submit". Oh well, I'm still #1 with my second score
Cool stuff . To bad you can't reload when you're not out of ammo (clicking the ammo rounds even counts as a shot)
bluecat at May 19th, 2011 07:34 — #6
This is really cool. After some tries, I made it into the highscore. Can't be too long until someone has 2,147,483,647 points though.
oisyn at May 19th, 2011 10:17 — #7
thenut at May 19th, 2011 15:48 — #8
Nice I should almost implement a replay recorder so others can see how fast people play. Maybe even throw in that unreal commenter "mo-mo-mo-monster clicker!" :lol:
moe at May 20th, 2011 07:09 — #9
Nice game during work Is is just me or do the ducks get faster more quickly if you replay?
nick at May 20th, 2011 10:36 — #10
The game requires a computer with a WebGL compatible video card and drivers.
Works well with SwiftShader too. Just drop the x86 d3d9.dll file in C:\Users\\\AppData\Local\Google\Chrome\Application
By the way, isn't it relatively simple to hack the high scores? :ninja:
oisyn at May 20th, 2011 11:34 — #11
What, Nick, are you questioning my leetness?
thenut at May 20th, 2011 20:55 — #12
I know the system is flawed. I'll fix it up if things get carried away. So far people are playing nice (knock on wood) :lol:
vrnunes at May 22nd, 2011 08:55 — #13
Sweet. Just for you to know, it worked perfect here at home, but there at work I'm currently using a Mac with OSX Leopard, and there although the logic was working right, graphics were very weird, flashing a lot, etc. Buggy as hell on Chrome Mac. I guess it might be Chrome'a problem, just reporting.
oisyn at May 22nd, 2011 16:40 — #14
Worked fine on Chrome for Windows.
touch_the_sky at May 29th, 2011 10:18 — #15
Same here, just fine on Windows with Chrome, cool btw;)
moe at May 30th, 2011 03:28 — #16
I have been wondering how you determine the country for putting up a flag in the high scores. Is this a service you got from somewhere or is it homebrew? Would you mind giving some hints on how you did that?
thenut at May 30th, 2011 10:38 — #17
moe, you can determine a person's location based on their IP address. Various companies database this information and provide it to the public, either for free or for a price. MaxMind GeoIP is one of the most popular IP lists out there. It's updated regularly and has a free version too. Once you have the list, it's a matter of populating a DB table with them and performing a look-up on the IP address (represented as a 32 bit integer, not as an IP string). If you're interested in how to do that, see this page.
As for the flags themselves, a complete listing is provided on wikimedia as well as OpenClipart. You can also download a compressed list of them here (look for flags-2.9-png or svg). The names of the images follow the same ISO 2-character country code as the IP list above, so it's pretty straightforward to display the correct flag. For best performance, you should build a sprite sheet with all the flags in it. You can see what that looks like here.
moe at May 30th, 2011 11:10 — #18
Awesome, thx for the info.
oisyn at May 30th, 2011 11:17 — #19
Too bad that not all flags have the same dimensions.
nautilus at June 8th, 2011 12:11 — #20
There's a potential weakness in the country flags based on IP address.
Likely unheard of in other countries, but not too many years ago a few italian ISP had servers physically outside Italy.
For example, backtracing some IPs from north Italy would map to the Netherlands. Not kidding.
I ignore if this anomaly is still in use today (daring an answer I'd say No).
My current italian ISP is definitely within italian territory.
Cool game, btw!
\back to lurk mode**
next page →