Jump to content

Recent Comments

- - - - -

GET '/RescueSquad2/RenderStats' 1.1

4: Adsense

Sometimes you get an idea that's a little bit oddball but for some reason you can't get out of your head and just have to run with it. This has been bouncing around my head for the last couple of days and has just been translated into code:

Yes, I embedded a web server inside of Rescue Squad and as well as static content (like the images) it can serve up live render stats direct from the game engine. I'm pleasantly surprised how easy it was, it only took about an hour to grab NanoHttpd, integrate it and slightly tweak it to also serve a (semi)hardcoded stats page.

I plan to extend this somewhat to make it more useful, like having multiple (cross linked) pages of stats, a logging page containing trace messages, and possibly a resource/texture/rendertarget viewer as well. Any suggestions as to what else to (ab)use http for are welcome. :)

May 07 2009 01:18 AM
Nice [smile]

I considered embedding a web server and LLMozLib and doing all GUI stuff in html. I have a pathological dislike of writing GUI code...

I figured it could interact with the game logic either through get/post or possibly by hacking a custom javascript API into/over llMozLib.
May 07 2009 02:06 AM
Yeah, that's an approach I've heard a few people try (or think about trying). It does seem like a good idea in that you don't have to write an entire gui library and you get to write the logic in javascript.

I usually dislike writing html and javascript, but if you're only targeting your own embedded browser it would probably be a whole lot easier - javascript is IMHO quite a nice language, it's cross-browser issues that make most people hate it.

Note: GameDev.net moderates comments.