Welcome, Guest. Please login or register.

Login with username, password and session length

 
Advanced search

1411281 Posts in 69324 Topics- by 58380 Members - Latest Member: bob1029

March 28, 2024, 10:00:19 PM

Need hosting? Check out Digital Ocean
(more details in this thread)
TIGSource ForumsCommunityDevLogsRobGetOut - 3D environmental puzzle platformer
Pages: 1 [2] 3
Print
Author Topic: RobGetOut - 3D environmental puzzle platformer  (Read 8949 times)
Bad Sector
Level 3
***


View Profile WWW
« Reply #20 on: August 29, 2012, 02:44:13 PM »





Here is another video for YouTube to cannibalize. Nothing special, just me running around and going inside a tunnel i dug using the new "draw arbitrary polys to create brushes" feature. Not shown in the video is the extra new fixes in the lightmapper and overall math stability in the editor (the irregular shape of the tunnel helped to find a few places where NaNs - invalid numbers - were generated and had all sort of weird side effects).
Logged

~bs~
eyeliner
Level 10
*****


I'm afraid of americans...


View Profile
« Reply #21 on: August 30, 2012, 02:55:20 AM »

Looks good so far. Keep hackin'! Smiley
Logged

Yeah.
bexsella
Level 0
**



View Profile
« Reply #22 on: August 30, 2012, 02:23:43 PM »

I've always had a bit of a soft spot for portal-based engines, ever since Tomb Raider. I have to say that this is shaping up to be one great game, keep at it!

Also purely out of curiosity. SDL is clearly used but are you writing in C++ or plain C? I know you wrote C version but all too many times have the two been mislabeled.
Logged
Bad Sector
Level 3
***


View Profile WWW
« Reply #23 on: September 01, 2012, 05:10:15 AM »

Well, it isn't exactly the same as in Tomb Raider engine (or Build engine) where the geometry and portals were basically the same thing. I'd say it is somewhat closer to the Unreal Engine 2 or Doom 3 where portals were generated from author-placed entities.

Runtime Engine uses the portals generated by Runtime World from sectors manually placed by map authors. Here is the setup for the map in the video above:



In this screenshot the orange boxes are sectors and the fat red rectangles are portals. The sectors are always axis aligned boxes which makes them very easy and fast to work with (and generate portals from). The engine splits the world geometry in chunks so that chunks belong to one or more sectors. To render the scene, the renderer simply starts from the sector where the camera is in and follows the portals. When it "enters" a sector, it marks the sector's chunks and entities as visible. After all visible sectors are found, the engine renders the marked chunks and entities (the whole mark thing is done to avoid rendering chunks/entities more than once if they are shared between multiple sectors).

The engine is written in plain C. Currently i use SDL but this is temporary and i'll implement a Win32 (and X11) backend later so i can provide support for resizeable windows in windowed mode and "borderless fullscreen window" mode support. The Mac OS X and iOS ports already have custom backends since it was mostly a matter of drawing the window in Interface Builder and connecting the signals (although since i've made a bunch of modifications in the interface it won't work at the moment - i'll hopefully get my iMac back soon).

The engine can be found here, although beyond the code and tickets (which mostly work as a "todo" list for me) there isn't much to see there. And the code is currently far from optimal or bug free.
Logged

~bs~
Bad Sector
Level 3
***


View Profile WWW
« Reply #24 on: September 21, 2012, 03:42:11 PM »

Added a primitive launcher that allows you to setup resolution and a few other video options:



The "edit input config" button currently just opens notepad with the input configuration script, but at some point it'll present the user with a proper key configuration dialog box.

The launcher is currently only for Windows, but a GTK+ UI for Linux will be added at some point once i get a proper desktop computer :-P. For Mac OS X the launcher will probably be part of the OS X back end instead of a separate program, since the OS X backend already uses interface builder for the main window, menu, etc.

I've also uploaded a new version (20120922 prealpha, 727K). This has a bunch of new features, like better collision and better controls (although there is a point underground where the collision fails and you get stuck in a wall - i haven't yet investigated why that happens and it might be just that the sector bounds aren't properly set in the editor to include the underground area... but it might also be Bad Code :-P). Also added mouse controls (in first person mode - toggle with space - you can do full mouse look while in third person mode you can only turn).
Logged

~bs~
Bad Sector
Level 3
***


View Profile WWW
« Reply #25 on: September 23, 2012, 05:14:29 AM »

As i expected, the sector bounds weren't properly set:



Notice that the geometry is slightly outside of the sector?
Logged

~bs~
Bad Sector
Level 3
***


View Profile WWW
« Reply #26 on: September 25, 2012, 03:45:00 PM »

This is only an editor change. I added the ability to set faces as "smooth" in the editor:



To smooth the faces, simply select them in face mode and press the new "toggle smooth" button in the toolbar (it is right after the eyes that show/hide entities). This causes the neighbouring faces of the selection (and only the selection) to appear as a single smooth surface (as much as possible this is anyway).

Currently the smoothing is available in shaded previews and vertex lightmapping mode. The image lightmapping mode does not support smooth faces (it requires a big change in the way the lightmapper works) and for the moment the lightmapper forces vertex lighting for the smooth faces (other faces are not affected). The biggest problem with that is with shadows affecting the whole face, but it shouldn't be  a problem for uses like pillars, arches, etc. Support for smooth faces in image lightmaps will be added at some point in the future - probably after i rewrite the lightmapper to be more efficient (...or when i really really need them :-P).
Logged

~bs~
Bad Sector
Level 3
***


View Profile WWW
« Reply #27 on: September 27, 2012, 12:41:42 PM »



Uploaded a new version which also contains a current build of the editor and the added ability to test the current map in the editor by pressing a "play" button in the toolbar (from the editor's side this is just a command it calls and a "playmap.exe" executable takes care of creating the game script that will load the custom map file).
Logged

~bs~
eyeliner
Level 10
*****


I'm afraid of americans...


View Profile
« Reply #28 on: September 28, 2012, 02:39:04 AM »

Interesting... Is this editor aimed towards your own game or can be used to make other stuff?

This s mighty impressive, indeed.
Logged

Yeah.
Bad Sector
Level 3
***


View Profile WWW
« Reply #29 on: September 28, 2012, 03:54:13 AM »

No, the editor is supposed to be generic and reusable. You can find it here with some docs on how to use it in your engine/game. I've already used it with Java and C# myself for She Loves You,

, the

and a quickest-and-dirtiest Descent-ish game/techdemo.
Logged

~bs~
Bad Sector
Level 3
***


View Profile WWW
« Reply #30 on: October 21, 2012, 09:14:21 AM »



I got an android tablet this friday after work and yesterday after trying everything i could on the device, i decided to port Runtime Engine and RobGetOut on it.

I've just managed to have a controllable robot there with proper rendering and lighting :-).

The controls are really temporary (you use the left bottom side to turn left/right and right side to go forward/backward). I'll do a more point-and-click (or in this case, tap :-P) scheme at some point and add "native" support to the engine for tap/gesture stuff. Currently the touchscreen events are simply translated to key events before passed to the system-independent part of the engine - tapping at the bottom center of the screen is translated to "space" which toggles between third and first person view for example :-P
Logged

~bs~
Bad Sector
Level 3
***


View Profile WWW
« Reply #31 on: November 03, 2012, 08:12:58 AM »



Added a new version to try out.

It adds GLSL-based rendering (currently required and it'll crash if your OpenGL drivers do not provide GLSL... but any driver released by ATI/AMD and NVIDIA the last few years should support it and it is only Intel's drivers that seem to lack GLSL support, at least in older chips). The output is almost the same, just more vibrant (like the original C#/XNA version). I'll probably need to add optional shader-based rendering in the editor to match the colors since it can easily get saturated in high brightness areas.

Also it adds "inter-update interpolation" (i'm not sure how else to call that :-P). It basically interpolates the graphics state between game updates (the game is updated at roughly 60 times per second) so if you have -say- 120fps you'll still get smooth animations. Also (and more importantly) this gets rid of the microstuttering that a fixed game update causes and as an unexpected side effect it makes tearing less visible when you have vsync disabled (although that probably requires a very high framerate :-p).
Logged

~bs~
Bad Sector
Level 3
***


View Profile WWW
« Reply #32 on: November 18, 2012, 12:25:40 PM »

I added support for multiple floating point rendering targets (it could be used for deferred shading, although i do not have dynamic lights at the moment) where i render the color, normal, position and depth separately in each one and then merge them in another pass with a different shader.

The result is almost the same (the color contrast is now done as a final step in merge instead of when rendering world/models) though, but i also added some SSAO:



It has been a while (actually since i worked at Track7 some years ago) since i did SSAO and i basically had forgotten most of it. It isn't anything special - in fact it is noisy (like my original implementation in T7 :-P) and slow (27fps in my 660M at 1920x1080). I think these days SSAO is usually calculated in half or quarter resolution (i did it in full) and blurred to get rid of the noise. I might try this at some point later.

The new rendering code is currently mixed with the previous but inside "#ifdef NEWOPENGL ... #endif" marks (this means that i have to recompile the engine to use the new code). The "NEWOPENGL" name comes from my initial attempt to write a new renderer from scratch using the new OpenGL 4.x Core APIs, but soon i got bored of redoing everything and switched to simple GL3.2 + compatibility profile that allows me to reuse most of the older stuff :-P. I'll make it possible at some point to switch to the new rendering code at runtime instead of relying on preprocessor marks.

EDIT: Added a video





EDIT2: Uploaded the new version. Includes only the new renderer and since it is compiled under VS2012 it'll probably run only under Vista and later (i have downloaded the XP compatibility pack but i'm not sure if it is enabled by default or not). I'll make a build with OpenWatcom at some point later though so it'll run even under Win2K (with the old renderer at least) :-P.

Try it from here:
http://runtimelegend.com/games/robgetout/

EDIT3: With and without SSAO (imgur album with two images).
« Last Edit: November 18, 2012, 04:54:13 PM by Bad Sector » Logged

~bs~
Bad Sector
Level 3
***


View Profile WWW
« Reply #33 on: December 23, 2012, 02:25:59 PM »



It has been a while since i made an update. Here is a new feature for the editor: the ability to specify custom shade modes in the viewport using GLSL shaders. The idea is that an engine or game will have its own shaders since Runtime World's default shading doesn't help much for shader-using games (this is a problem for me with RobGetOut, for example, which saturates the colors and what seems slightly bright in the editor has overblown brightness in the engine).

Of course the rendering won't be WYSIWYG (after all the editor has no idea about what kind of engines it might be used with) but the GLSL shaders will help to make things look closer to the in-game renders.

In the image above i'm using a shader that provides some sort of cel shading by mixing stuff around to create the two levels (f.e. it tries to saturate the dark part more than the bright part). It is just a quick test, it won't be used for anything - despite the RobGetOut name there.

Currently the "Custom Shade Editor" window only allows editing existing custom shades and to add new one needs to create (or copy/paste) a shade script. At some point i'll put some code behind the other buttons too - but for now i think i need to take some rest :-P.

EDIT: Here is how a custom shade script looks like. Each of the shade <name> code <program> <type> <code> set the GLSL <type> code (can be fs for fragment shader or vs for vertex shader) code for the "<program>" GLSL program (pair of shaders combined to be applied to geometry) of the "<name>" shade (in this case RobGetOut).

This is actually the proper custom shade script for RobGetOut (the source code is copy/pasted from the RobGetOut shaders).
« Last Edit: December 23, 2012, 02:37:02 PM by Bad Sector » Logged

~bs~
Bad Sector
Level 3
***


View Profile WWW
« Reply #34 on: December 23, 2012, 07:08:24 PM »



Added floating point lightmaps in the editor so i wrote some shader to put saturation using RGB->HSL and HSL->RGB conversion and apply some tone mapping. My intention was to make some rooms like in Mirror's Edge - i think that is as far as it can go with the current shaders :-P.

(no this wont be part of RobGetOut, i was just messing around :-P)
Logged

~bs~
Bad Sector
Level 3
***


View Profile WWW
« Reply #35 on: December 24, 2012, 04:01:19 PM »

Added support for floating point lightmaps in the engine.

(with slightly different saturation settings).

Also after a long time i fixed the bug in the lightmapper that added dark edges everywhere (yes they look good in some cases, like in moody dark environments, but they are out of place in anything non-dark non-boxy). In the previous screenshot the bug still exists and this is why the corners are dark. In the video there isn't as much darkening (normally there is a little of it, it isn't fully flat, but also in the video there is a bit of SSAO).
Logged

~bs~
Bad Sector
Level 3
***


View Profile WWW
« Reply #36 on: December 25, 2012, 06:45:49 AM »



Here is a shot with the tweaked shaders and fixed lightmaps. Also added an extra hallway :-P
Logged

~bs~
rivon
Level 10
*****



View Profile
« Reply #37 on: December 25, 2012, 06:58:00 AM »

Oh yeah, global illumination is a great thing :D
Logged
Bad Sector
Level 3
***


View Profile WWW
« Reply #38 on: January 22, 2013, 04:22:49 PM »

I added some initial dynamic shadows in the engine:



This is a very simple implementation (just plain shadow mapping with some PCF to avoid the blocky look) and the light is a constant color. It was made in ~2h (at least half of it battling with the transformation matrices :-P).

Since i want the game to be playable even in portable devices and low-end machines (think OUYA, GameStick, tablets, etc) i'll only use dynamic shadows as an extra effect. Most of the game will use regular baked lightmaps.
Logged

~bs~
Bad Sector
Level 3
***


View Profile WWW
« Reply #39 on: January 23, 2013, 01:54:52 AM »



.
Logged

~bs~
Pages: 1 [2] 3
Print
Jump to:  

Theme orange-lt created by panic