
Procedurally generated HTML5 3D world with day/night cycle - zabast
http://www.endtime.at/?v=0.2
======
thesz
I have built sky simulation for small spheroidal planet for a (now) very
obscure game.

[https://www.youtube.com/watch?v=RjAyq2kmGT8](https://www.youtube.com/watch?v=RjAyq2kmGT8)
\- I left at the time trailer was recorded, but effects like day of time are
still look like my work (as are explosions, it seems).

As I haven't had enough experience then, I made your mistake - there was no
difference between dusk and dawn. And, in fact, there is.

The dust that gives red color of the sky sets down before dawn (pun intended).
Thus dawn glow is much less reddish and more like red gold.

(overall effects like intensity of light can be computed from cos(sun light
angle to player's normal), subtle effects like change of glow's color can be
computed from sin(sun light angle to player's normal), just in case)

In your simulation there's no anisotropy in color of the sky. And this is HUGE
mistake. Sky's diffusion and reflection is very anisotropic and omitting this
gives your simulation very unnatural feel.

------
subir
Performance was fine for me and I am on a dated machine (Lenovo Z560) running
Firefox with about 20 tabs open.

I discovered this game some time ago, from the CopperLicht engine home
page[1]. I am a web-developer by day and an amateur 3D designer after dark,
looking to build something similar. If the creators of End Time are here, can
they (or anyone with experience in this domain) share some insight about the
development process, especially procedural world generation?

[1] [http://www.ambiera.com/copperlicht/](http://www.ambiera.com/copperlicht/)

~~~
irrlichthn
I programmed that. I also wrote that CopperLicht library. So feel free to ask
about that on the CopperLicht forums as well if you are using it anyway.

It is nothing really complicated: I created a deterministic randomizer class,
and generating the worlds 3D geometry based on each squares coordinates as
random seed. Terrain is currently based on a simple sin/cos function,
buildings are built from blocks like minecraft does it. See the third
Copperlicht tutorial in its documentation on how to create own geometry and
stuff.

------
10098
I'm using Chrome and Intel HD graphics 4600. It kinda stutters/drops frames.

I know it's a crappy graphics card, but this demo isn't some magical eye candy
either, and there's not even a lot of gameplay going on.

I'm not sure if the problem is actually on the graphics programming side of
things (bad shader maybe?) or it's just the javascript being slow.

~~~
vidarh
I'm using a low-end Chromebook (Lenovo N20) and it runs smooth...

~~~
irascible
Same here. 240 $ chromebook and it runs great. Me likey.

------
skimmas
right now is probably not easy to think about procedurally generated worlds
without thinking about no mans sky: [http://www.no-mans-
sky.com/about/](http://www.no-mans-sky.com/about/)

~~~
TeMPOraL
It comes to my mind quite often as well. I can't wait for release.

~~~
iends
When is it supposed to be getting released?

~~~
TeMPOraL
I don't know. Hopefully before Half Life 3, or at least before the heat death
of the universe. Anyway, I've been hearing about this game for quite some time
now and I really, really like the idea so I wish for a release someday soon
:).

------
chii
It'd be nice if there's some text/blog post about how it's done etc.

------
z3t4
My first though was: "I could make a game with this". And the first thing on
my todo-list would be "server rendering", so that the server only send the
client what the player see.

~~~
yoklov
This isn't really feasible using current technology, at least not if you care
about player experience. Input lag is killer, and users are far less forgiving
of it than with something like netflix, where lag between the server sending
data and the client receiving data is fine (Keep in mind that most pixels
change most frames in a first-person 3d game, so it doesn't compress all that
well either). Even a couple frames of lag is noticeable at 30fps, and isn't
really something players forgive. Not to mention, players tend to expect 60fps
now...

There's also not really a lot of benefit to doing something like this. Maybe
you run better on computers that have worse graphics cards (and I don't
actually think you will), but you'll run worse on computers with worse
internet connections. You also are now spending a lot more on servers because
every player needs a nontrivial portion of a server machine.

~~~
tokenizerrr
> There's also not really a lot of benefit to doing something like this

If you have any kind of multiplayer game: It would make cheating harder, and
make some kind of cheats impossible.

------
leanthonyrn
Great job! Now, if we can procedural generate a Dwarf Fortress game with a
graphically HTML5 procedural generated world. Think Elder Scrolls Morrowind in
HTML5. No-Mans-Dungeon.

~~~
amyjess
I wonder if anyone's ported Vulture's Eye to asm.js...

(yeah, I know it's 2D isometric and not real 3D, but it's still pretty, and
it's still a fully-functioning roguelike)

------
omouse
I like this, it's very very neat and what's cool is seeing how the electrical
wires and poles are generated and how at some junctions you'll see them criss
crossing in an unnatural way, like a city planner or construction crew messed
up. It's neat.

------
RobSis
Don't know what caused it, but opening the page totally froze my box. (I had
to power it down)

~~~
VSpike
Same. Running Arch, my display driver had some kind of attack of the vapours
and I had to reboot the box blind. Fun!

------
triggercut
One detail I appreciate is getting the right cut/fill for road strings.

You do have to have be careful when applying this carte blanche on
procedurally generated terrain, as you can end up with all sorts of
unrealistic/dangerous/fun? cases.

------
bj0
The first thing I did was walk into a building and try to go up some stairs. I
got wedged between the stairs and the wall and couldn't move. There doesn't
appear to be anything you can do at this point but close the page.

~~~
heyitskevin
Same thing happened to me. I also saw that a tree came through a building. I
was just surprised that the building had collision detection :)

Cool demo though

------
revskill
\- My firefox get crashed \- My device driver get problem but self recovered
later. \- Other applications get hung, too.

when i keep my mouse and drag around screen. How can one JS application can
make my computer dance ? Great game.

~~~
edwinjm
Make sure you have the latest driver for your video card.

------
ORioN63
What's the yellow arrow?

------
KirinDave
Has some common mistakes (sky color rendering is pretty chunky, for example)
but is otherwise very compelling.

Sad to think this poignant simulation will eventually become just another
zombie shooting club.

------
scriptproof
Reminds me Infinite Oz
([https://youtu.be/U8Pu26G2jQY](https://youtu.be/U8Pu26G2jQY)) but I do no
know which technique was used.

------
javcasas
The hazy atmosphere, the day-night cycle, the empty houses without windows or
doors... All I can say is

"Get out of here stalker".

And that's not bad at all.

------
nsajko
Word map should probably be _world_ map.

------
cmdrfred
Beautiful work, HTML has come a long way.

