
Show HN: RIFT – A procedurally generated FPS game in the browser - xigency
http://team-duck.com/rift/index.html
======
xigency
This is an example of a first-person shooter game written in JavaScript using
WebGL. All of the (limited) art assets are generated procedurally. The game
uses the team duck game engine (tedge.js) which handles things like loading
shaders, buffering object meshes, and calculating collision using octrees. The
input controls are slightly confusing, because it is not possible to capture
the mouse in the browser without using some sort of plugin, but it shows
generally what is possible.

The source code is available here: [http://www.team-
duck.com/rift/files.php](http://www.team-duck.com/rift/files.php)

The project is also on GitHub:
[https://github.com/teamduck/gametube](https://github.com/teamduck/gametube)

As noted below, this demo lacks any real gameplay. It's a proof of concept for
a homegrown browser engine, and it's based off of efforts on different
platforms originally.

It shows what a lone programmer can do and that not all tech demos need to be
flashy. It also harks back to a more minimal development style.

Here is a command reference of the source code auto-generated with a script:
[http://www.team-duck.com/rift/reference.txt](http://www.team-
duck.com/rift/reference.txt)

Although it might not be clear from the GitHub repository, this project is
over a year old. If I were to spend just a little bit of time on it, I would
work on generating a sequence of levels through the space station. So I'm open
to input for game ideas, too.

~~~
nhdev
You might want to check out [https://developer.mozilla.org/en-
US/docs/Web/API/Pointer_Loc...](https://developer.mozilla.org/en-
US/docs/Web/API/Pointer_Lock_API)

~~~
xigency
It's worth taking a look. When I wrote this it was before this standard was
implemented.

------
backwardm
Mashing down keys as fast as I could to stop the spin... had to leave before
getting too dizzy. :)

~~~
xigency
Hm, yeah. It's controlled using the mouse. Center the mouse to prevent the
view from moving.

WASD moves the player character.

Pressing 1 enables debug mode, which shows some bounding boxes.

~~~
backwardm
Got it. Thanks for the hint.

------
ketralnis
Rift is already the name of a large popular first person MMORPG
[http://www.riftgame.com/en/](http://www.riftgame.com/en/)

~~~
xigency
True, but I picked this working title in 2006 or 2007.

------
keslag
Blocked at work for some reason.

~~~
keslag
The URL that you are attempting to access is a potential security risk. Trend
Micro OfficeScan has blocked this URL in keeping with the network security
policy. URL: [http://team-duck.com/rift/index.html](http://team-
duck.com/rift/index.html) Risk Level: Dangerous Details: Verified fraud page
or threat source

~~~
starshadowx2
I get the same sort of thing with ESET.

"The web page is on the list of websites with potentially dangerous content."

------
ocdtrekkie
What do I shoot at?

~~~
xigency
It's more of a proof of concept than a game yet. Adding gameplay goes hand in
hand with adding plot, and without enough of a framework or scaffolding to fit
the whole game together I haven't started on that.

Plus, all of the monsters / enemies I tried to make in code looked really
horrible.

The other demos, like flying through space, can be more fun but they lack
gameplay, too.

There's just not that many reasons to make something to destroy yet.

~~~
ocdtrekkie
It's neat. Is this all HTML5 and JavaScript then?

~~~
xigency
Yep, it's all JavaScript.

------
badloginagain
Cool. Keep at it!

