четверг, 30 декабря 2010 г.

I am working currently on memory management for the engine, done a lot..later about it in details..

now about arrays. Everybody knows, that dynamic allocation is bad thing, especially in optimized applications. Fragmentations, locks, time to find free block etc. General advice is to avoid any kind of dynamic allocation in update loop. So I decided to remove it everywhere and move all dynamic data to the stack.

There were many std::vectors, std::strings in the source, around 700 cases of using std::string, same for vector. Firstly I changed vector into C arrays, but it's not convenient to use. After that I found boost::array, but it's not dynamic.

So my decision was to create mix of boost::array and std::vector, it's based on sources of boost::array, but has ability to dynamically grew (one additional variable m_size).

Useful and looks optimal.

UPD. maybe not so optimal for complex objects with not simple constructors and also for big object, but optimal for pointers and simple types.

понедельник, 20 декабря 2010 г.

SIGGRAPH Asia 2010

I visited SIGGRAPH Asia 2010, it was interesting. Several courses was attended, number of interesting people was met. Tessellation is still hot theme, it was discussed heavily in DirectX 11 and OpenGL 4.0 courses. Also Realtime Ray Tracing and stereoscopic rendering.

среда, 15 декабря 2010 г.

Post processing pipeline started

Previous week was spent on post-processing. Pipeline is implemented in the engine now. Also motion blur done as post-process (built from Geometry Buffer, described here ) and can be safely disabled. My paper library became useful.

This motion blur goes from camera movement, per-object motion blur will be implemented later (per pixel velocities will be saved in Geometry Buffer).

Motion blur in action, kernel from 15 samples:




Original scene:



Several post-processing effects are scheduled - glow pass (blur bright parts of the scene),
Analytical Anti-aliasing, Depth of Field and more.

Mirrors and reflections (deferred) are started.

воскресенье, 12 декабря 2010 г.

very inspirational reading, Shishkovtsov is smart guy
http://www.eurogamer.net/articles/digitalfoundry-tech-interview-metro-2033

especially deferred reflections - so simple idea to make reflections in deferred shader! just render reflected attributes (position, normal etc) into Geometry buffer and draw as usual.

also I am thinking about implementation of Exponential Shadow Maps after reading it.

I read the article half of year ago and have rewritten engine significantly after that. Thread pool was added, engine was detached into several parts etc.

воскресенье, 5 декабря 2010 г.

Update




Plan for November for Editor development was over-fulfilled. Over 30 tasks was implemented in time.

New features:
  • editable scaling
  • asset preview for sounds, scripts and textures
  • skyboxes (simple, without any dynamic)
  • new gizmos for move, rotate, scale entities

среда, 1 декабря 2010 г.

Normal texture trick

I found interesting trick for accessing normals from textures.

Capcon's DXT trick - http://code.google.com/p/nvidia-texture-tools/wiki/NormalMapCompression


Shortly, it allows to use DXT1 and DXT5 bump textures with same shaders.
It's important for editor because bump texture in DXT5 will be ready only at the last stage -
game packaging. There will be small difference in object appearance during in-Editor testing because DXT1 is not good for normals, but I think it's acceptable.

понедельник, 22 ноября 2010 г.

Auto-reloading resources




Auto reloading resources are implemented for the Editor. Scripts, textures, models (by background thread, thus not stopping work), shaders are loading automatically after switching from editing application (Photoshop, 3ds max etc) into Editor.

Also - camera manipulation - zoom to selected objects, top, bottom, left, right, front back view of selected objects. UI for edit assets in external application (defined by OS), opening resource location in the Explorer, import from Assets window.

четверг, 18 ноября 2010 г.

Big face on landscape


During testing new features of the editor, I set landscape texture to random photo. Interesting effect, to walk on gigantic face!

New features are:
  • import of 3d models from FBX file by Autodesk FBX SDK
  • tracing of landscapes by tracing of heightmaps (faster then tracing actual geometry)
  • assigning of materials, scripts, audio files to objects by dragging from Explorer or Assets window
  • Scripts - editing by Notepad, assigning to object, removing.
  • Depth Pass before Geometry Buffer Pass, for Deferred Shading
  • Current insertion position, for cut-copy-paste

пятница, 5 ноября 2010 г.

Weekly editor image.


Deferred shading restored, shadow maps, landscapes
by clipmaps, translation and rotation of entities by
mouse with restriction by selected axis (x, y, z).

Plan for the next 2 months is prepared, to complete first version
of editor and engine.

понедельник, 25 октября 2010 г.

editor status




Editor is developing very fast. A lot of things are complete - window layout management, editing of object's type, assets management (drag and drop assets to scene from asset tree, renaming, deleting etc), project save/load etc.

Next week I will prepare video.

I see light at the end of the tunnel ))

четверг, 30 сентября 2010 г.

понедельник, 27 сентября 2010 г.

вторник, 24 августа 2010 г.

Editor features



New features added to Glow engine editor during last week. Previously, all level geometry was created in 3ds max and imported into game engine. It's not convenient (and not cheap) way of editing game level, so development of Editor was started.

After week it has next features - drag and drop meshes from Explorer (currently OBJ format, more later), simple Asset manager, executed as job (in parallel thread), so parsing 3d meshes will not stop UI.

Also Undo/Redo is implemented ( with boost functors ). Currently it works for move/rotate/scale, delete/insert, select. Objects can be linked to landscape, so, for example, building and trees will be always on the ground. Rotation, movement will be in local or world coordinate system.

Next things to implement: building level, attaching scripts to objects, assigning materials by drag and drop from Windows Explorer.

среда, 4 августа 2010 г.

Long time ago i wrote function, which creates quaternion for rotation from 0,0,1 to any unit vector. Function was very long, contained asin, acos, several conditions etc... So today i returned and after some time:

// dir should be unit
void Quaternion::from_direction(const vec3& dir)
{
x = dir.y;
y = -dir.x;
z = 0;
w = 1 + dir.z; // simplified dot product with 0,0,1

normalize();
};

понедельник, 2 августа 2010 г.

Editor UI

Finally returned to editor development.
Editor UI will be written by Lua scripts.

I started my UI from simple and usable source of Recast library,
For example, button usage:

if ( imguiButton("Start game") )
LoadLevel("super-duper mega Quake level.mdl")

this is button creation, displaying and logic in one place. After
years on Windows it was amazing!

I mapped API into Lua script language by luabind library, and
now UI script code looks like here:

if object_selected then
rollout( "Object", 0, 0, width, height )
show_object_properties()

if collapse("physics", true, true) then
show_physics_properties()
end
if collapse("visual", true, true) then
show_visual_properties()
end

if collapse("script", true, true) then
show_object_script()
end
end_rollout()

end

вторник, 6 июля 2010 г.

I spent a month on refactoring of engine.
It's became so big, I can not serve it in my little brain.

So I detached it into small pieces, like physics, sound,
networking, core, ai, ui, archive, prepared solid interface to
access features of engine (which will be visible for users of
engine). Also put all pieces into dll, and prepare abstract
interface for every module to clearly isolate it.

Also the thread pool (boost::threadpool) is added to execute jobs from modules.
So now engine will scale performance easily with more CPU cores.

пятница, 12 марта 2010 г.

Streaming

To implement WebPlayer I had to implement streaming from Internet. Now it works, with additional layer for loading data.

Several types of data sources are supported:
1) usual file system
2) zip files
3) files from inet (http, ftp)

Last thing to implement - installer for ActiveX. I haven't decided yet, how to install it properly - by separate msi installer, or as usual ActiveX, by services of browser.


Альбом: Deadly light screens

вторник, 2 февраля 2010 г.

WebPlayer!

Today I started development of the WebPlayer for Glow engine,
and already have results! ActiveX, based on ATL is created,
engine is attached, and all it successfully tested in the Test Container.

Now it works only for Internet Explorer, later I will test Firefox
and Chrome.

воскресенье, 31 января 2010 г.

Water

First tests with water. It's based on the article from GPU Gems 2.

2 pass rendering:

1) render all without water - refraction pass
2) copy image to refraction map
3) render all from "reflected" camera position - reflect camera position relative to water plane
4) copy image to reflection map
5) render water with reflection and refraction map

воскресенье, 10 января 2010 г.

comments for my game from IGF judges

Here is comments for my game from IGF judges.
Completely correct, I just spent more time on a graphics
and programming than on game play and level.

so -> more game play and play testing, fresh ideas, design documents etc

Comments:
--

wow... I can't say I was expecting this. Fantastic opening intro with the 'kids' drawings. Very powerful!!!! It is very immersive.
Unfortunately the 3D world is poor, level design & use of lighting (both for Art + guide the player) are poor, and I think it would have desrved a better visual environment (it could have been isometric). I think interactions need to be facilitated in this type of games.

---

The introduction to this game was terrific and set a great vibe. Unfortunately the game itself didn't really follow through on this.

Visual art rated low mostly because of the level design - I found it extremely difficult to navigate the level, and points of interest were not at all clear. Would also have been nice to see the two important states of my family reflected on their bodies rather than via meters on screen (although the meters are also necessary).

Audio was not used to indicate the positions of interesting things, either - humans came up and attacked and I had no idea they were there until they were hitting me, and I had very little awareness of where my family members were.


---

The opening sequence is great, but the game loses steam after that. After the intro, I was expecting something sillier and more playful. Cow-slapping is fun and all, but it only goes so far. If the game harnessed more of the puckishness on display in the intro, it would be more appealing.

понедельник, 4 января 2010 г.

I am improving my game design ability, did some brainstorming.
Already have around 80 gameplay ideas ))

I want to have clear picture of gameplay before implementing something.
After 2 or 3 project without gameplay at all ))

Here is my plan:

1) raw ideas in mind and pictures
2) design document
3) draft demo with simple graphics and animations
4) play testing
5) final graphics and animations