announce: new web game - pot

zed

Legend
Hers something I started last week
http://auzed.com/webgames/pot.html
Not polished etc, Whilst it works on my smartphone @60fps 1920x1080 (OK its not that complicated graphically but even still that shows webgl can do decent performance on crapish hardware) I only found out yesterday that I have to do some different code to get clicks/touches on a phone/tablet screen. I'll get this & my other games working for when IOS8 launches since webgl will be supported on iphone/ipads in a couple of months.
Doing the AI was a PITA, esp since box2d doesnt calculate things positions exactly perfect, I was considering doing all the physics myself because of this but decided why waste the time

I had a dream last night/this morning about making another game ( a platformer, which is perhaps my least favorite genre )
perhaps inspired by this article I was reading
http://gamasutra.com/view/news/219475/Meet_the_developer_who_spent_13_years_making_his_childhood_game.php oddly unlike normally I remembered how the game went when I woke up so will have a go banging that out today
 
Okay how do you make the instructions go away so you can play the game? Using Chrome.
 
they should go away by clicking on the window
It first has to load everything

press ctrl-shift I to bring up the console and press F5 any errors should show up there
 
Oh so F12 is the same as pressing ctril-shift-i
if you press it you should see the console like so
pop.jpg

which should tell you if something has failed (*), part of the difficulties with web games is order of loading, since you may ask for something but it just gets a request to download and it may be a few seconds before its downloaded (thus you cant rely on it being there in a further phase of operation) thus you can see I break my loading method into load phase 1->8 in that screenshot.
I assume this game is hosted in NZ so it may be slower to load for ppl here, Ive hosted before in USA, and have had no worries before though.

(*)if it looks like my screenshot then its ready to go. current_gamepage == gamepage_mainmenu

edit - I assume people are trying this with google chrome, Im using webaudio api which aint supported that well on some browsers (google chrome it all works well)
 
Last edited by a moderator:
OK thanks, sorry no idea why its doing that.
Ive tried it on a few PCs/phones and its always worked

I assume it does those messages when you click on the window, I'll look into it

edit: OK had a quick look and updated a new version, Ive got a feeling it may be because of how a document is loaded its amazing they cant even get this basic thing correct in html after all these years.
Apparently I can work around this by using jQuery. Which Im not using, perhaps I just should bow to the inevitable & start using it, most people do already
 
Last edited by a moderator:
No mate, I see whats happened, its cause I deleted some code (It was from my previous games, using the keyboard) which was setting/getting some info from the local storage but didnt update this

if you try this, it should work
http://auzed.com/webgames/CubeUL/index.html
and afterwards Pot perhaps should work. I'll fix that anyways so it should work regardless
 
awesome, the game is now working and i can slide the view using <- and -> keyboard. But it seems i can click nothing in it :/
 
you shouldnt be able to use the keyboard at all! So I dont know why its doing that

use the mouse and click on a red ball and then click where you want the red ball to go to

Just fixed it tonight & uploaded the working version, it also now works in firefox (allbeit at 6fps on my machine vs chrome 60fps) the problem was they changed the webaudio api spec by depreciating a function (*), with firefox it would crash but with chrome the old and the current function worked.

Also got it sorta working in internet explorer (though they dont support depth textures so it doesnt work, but at least they sorta support webgl which is better than 1 year ago) I dont think they support the audio as well. Debugging on IE is a nightmare, you cant reload (f5) a page I had to kill the tab and start it again in a new tab

Also it now works in touch devices, tried it on my phone, it works but 5" is too small to play nicely, also it looks as if they dont support depthtextures, oddly it runs at 60fps, but it looks like its running at quarter resolution or something

Cheers orangpelupa for being the guineapig :)


(*) webaudio.audiocontext.createBuffer( ... ) -> webaudio.audiocontext.decodeAudioData(...)
 
I don't know if my browser or WebGL is fscked. Do you have a link to something akin to running glxgears in linux?, i.e. something extremely lightweight to demonstrate that basic functionality is working. Ah, your CubeUL eventually tells me (in Chromium) my browser is wrong, or alternatively it's the graphics chip or driver, with helpful enough links - I'm running some free and open source linux driver on an old nvidia GPU, not the proprietary one and it must be why I can't get WebGL stuff accurately working. I can fix this stuff but prefer upgrading my distro first, which I'm postponing till I feel like doing it (alright, I've just weighed up the quantity of data to shift around. Not too much)
 
@Blazkowicz I'll have a look at linux tonight, I have ubuntu 12.04 (problem is it running on a laptop that scores less than my previous phone 'nexus4' on geekbench, thus debugging stuff is a PITA).
It may be the audio thats causing the problems, honestly Web Audio is a mess, way worse than 3d graphics on the web. In comparison WebGL is pretty good. Ive tested it on win/mac/android.
webgl demos : http://www.chromeexperiments.com/webgl/ these should be without sound so it will see if your machine can play them

btw developers WRT chrome, now has an option in the browser to emulate a phone/tablet. i.e. you can simulate touch events also simulate the accelerometer.

@orangpelupa good to hear, Im going to start a new game this week or weekend, shouldnt take to long to finish 2-3 days I expect, so I may have something else for you to try if you wish
 
OK tried Pot on linux
btw heres to see if your browser/device supports webgl
http://get.webgl.org/

I tried on ubuntu chrome (couldnt get it working, couldnt work out what flags to get it going, tried the obvious ones)
I tried on ubuntu firefox and it works, though not the sound, also the shadows dont work
So I suggest trying both browsers with linux

So I dont know whats up.
Ive got a feeling perhaps its using software (eg mesa) with firefox, performance though was OK (better than I was getting with windows firefox) ~20fps
and using (& failing) with hardware for chrome

I also converted the mp3's over the ogg files for the sound, so it now plays sound with firefox, though not with the version I uploaded (whoops)
I dont know why I've stuck with mp3's for so long ogg files are clearly superior
 
I tried the game but I dislike Chrome and the window looked to tiny that it was unplayable. Gotta give it a try with different browsers and see which one does the job for me.
 
@Davros (I dont smoke myself) but thats part of the reason I choose the name
@Cyan F11 == fullscreen browser window, IIRC mouse wheel = zoom/ rightmouse button move camera.
at the moment Ive only tried
chrome // works
firefox // works but slower
internet explorer // doesnt work, they dont yet support depth textures. I could go back and uses color textures for the shadows (& implement variance shadows) but I assume IE will eventually add support depth textures
 
Back
Top