May
02

Orion’s Gate – Introducing new engine, “Reason”

Today, I want to share some of the features I put into the engine, what it is currently capable of, and where it is going from here. As of the moment it’s nothing truly superbly impressive, however it is my own work and is not borrowing code from other places. In other words, it has been written from scratch.

Introducing Reason Engine

I created the engine because I noticed that, at least for me, MiniB3D had a few downfalls I could not live with for my game. While shadows are implemented in Klepto’s extended remix, they do not work with my models and it also does not work with my bloom technique.

So why not go the whole 5 yards and do everything? I learned quite a lot by doing this.

It’s important to understand that the engine utilizes a naming system. Everything you define has a name that, so I hope, should be easier to work with. No need for ints, IDs, or stuff like that. You don’t name your child “1″ or “56735678″ - do you? :)

The engine is far from complete - I just want to share how far I have gotten in recent weeks. I’ll update this post as the engine progresses.

Engineered for simplicity in use and horsepower under the hood, the engine features:

* Utilizes OpenGL, thus platform independent
* Naming-based system
* Built-in texture catalog that stores your textures
* Textures added are automatically mip-mapped
* Unlimited textures
* Unlimited models
* Unlimited soft-lights (8 hardware lights, as usual)
* Up to 16 cameras, one can switch between them at run-time
* Automatic shadow generation for lights
* Shadows bend around arbitrary geometry
* Adjustable shadow quality, even at run-time
* Built-in Frustum Culling to ensure rendering speed
* Built-in W-A-S-D movement, can be enabled with one line
* Built-in 2D emulation for elements such as images

If you are interested in seeing some actual coding with it and the engine perform live, in color, HD and in stereo, please have a look at my latest DevBlog video (bonus feature length!) that shows how it’s supposed to work.

So here are a few screenshots.

Showing a simple cube and an Orion Relay, both casting shadows

Depending on resolution, shadow quality can be adjusted at run-time


There is support for 1024x1024px shadow maps, if your graphic card can support it. The setting is called “Ultra”. Possible shadow quality depends on the vertical resolution the engine is running at. If you run at 1920x1080, the Ultra setting becomes available. Also bear in mind that the higher you go, it obviously requires more memory.

I put in a little function that shows you where the light is, and in what direction it is shining. It will draw a line on screen (for now! I’ll improve it) so that you know what’s happening.

RN_EnableLightDebugging set to True

As soon as light is created, shadows are automatically added to the model you define as main terrain/indoor part.

Therefore, they automatically bend around non-planar geometry. Automagically!

Shadows bend around arbitrary geometry

Oh uh, one more thing. I put in a few 2D functions as well. They are not based on Max2D or any module in BlitzMax. These are pure OpenGL calls, allowing you to display and, of course animate, 2D elements (images for now, text to come).

Images can be the usual suspects - bmp, jpg, png. Each of those can be given a certain transparency value, much like SetBlend ALPHABLEND and SetAlpha. Except that this is performed in OpenGL and ortho-projection.

Two images being displayed - one without additional setting, the second with 50% transparency

This is the current command set:

----------------------------
CREATE REASON APP
----------------------------

RN_CreateApp(name:String , w:Float , h:Float, fs=False, mt=False)

----------------------------
SHORT CUTS
----------------------------

RN_CreateCube(name:String, noshadow:Int = False)

----------------------------
MODEL CALLS AND PROPERTIES
----------------------------

RN_LoadModel(name:String, file:String)
RN_SetModelColor(name:String, r:Float, g:Float, b:Float)
RN_HideModel(name:String)
RN_ShowModel(name:String)
RN_PositionModel(name:String, x:Float, y:Float, z:Float)
RN_RotateModel(name:String, p:Float, y:Float, r:Float)
RN_SetModelTexture(name:String, texname:String)
RN_ScaleModel(name:String, scale:Float)
RN_ScaleModel3v(name:String, x:Float, y:Float, z:Float)
RN_SetModelIsMainTerrain(name:String, value:Int)
RN_SetModelAmbientAndDiffuse(name:String, r:Float, g:Float, b:Float, a:Float=255.0)
RN_SetModelSpecular(name:String, r:Float, g:Float, b:Float, a:Float)
RN_SetModelShininess(name:String, s:Float)
RN_SetModelPickable(name:String, value:Int)
RN_FlipNormals(name:String)
RN_ModelX:Float(name:String)
RN_ModelY:Float(name:String)
RN_ModelZ:Float(name:String)
RN_ModelWidth:Float(name:String)
RN_ModelHeight:Float(name:String)
RN_ModelLength:Float(name:String)

----------------------------
LIGHTS
----------------------------

RN_CreateLight(name:String)
RN_SetAmbientLight(r:Float=51.0, g:Float=51.0, b:Float=51.0)
RN_SetLightPosition(name:String, x:Float, y:Float, z:Float)
RN_SetLightColor(name:String, r:Float, g:Float, b:Float)
RN_SetLightSpecular(name:String, r:Float, g:Float, b:Float, a:Float=255)
RN_SetLightConeValues(name:String, wideradius:Float=70.0, focusradius:Float=60.0)
RN_SetLightDirection(name:String, p:Float, y:Float, z:Float)
RN_SetLightRange(name:String, range:Float)
RN_TurnOnLight(name:String)
RN_TurnOffLight(name:String)
RN_EnableLightDebugging(debug:Int)
RN_LightX:Float(name:String)
RN_LightY:Float(name:String)
RN_LightZ:Float(name:String)

----------------------------
TEXTURE CATALOG
----------------------------

RN_AddTexture(file:String, name:String)

----------------------------
COMMON PARAMETERS
----------------------------

RN_SetClearColor(r:Float , g:Float , b:Float)
RN_SetBloomTo(bloom:Int)
RN_AntiAlias(value:Int)
RN_EnableWireframe(value:Int)
RN_SetShadowQualityTo(value:Int)

----------------------------
CAMERAS
----------------------------

RN_SwitchToCam(name:String)
RN_RenameCamera(currentName:String, newName:String)
RN_NewCamera(name:String, x:Float=0.0, y:Float=0.0, z:Float=0.0, rp:Float=0.0, ry:Float=0.0, rr:Float=0.0)
RN_PositionCamera(name:String, x:Float, y:Float, z:Float)
RN_RotateCamera(name:String, x:Float, y:Float, z:Float)

----------------------------
MAX 2D EMULATION
----------------------------

RN_Text(x:Int, y:Int, text:String)
RN_LoadImage(name:String, file:String)
RN_ReplaceImageFromFile(name:String, file:String)
RN_ReplaceImageWithImage(name:String, pixmap:TPixmap)
RN_RenameImage(current_name:String, new_name:String)
RN_ResizeImage(name:String, x:Int, y:Int)
RN_DrawImage(name:String, x, y)
RN_SetImagePosition(name:String, x:Int, y:Int)
RN_SetImageAlpha(name:String, alpha:Float)
RN_SetImageVisible(name:String, value:Int)

----------------------------
BUILT-IN CAM CONTROLS
----------------------------

RN_EnableWASDMovement(value:Int)
RN_SetCameraMovementSpeedTo(speed:Float)

----------------------------
RENDERING
----------------------------

RN_Render()
RN_Render2D()

Obviously that expands as I progress with the engine.

Reason is going to be available in 3 flavors, one which is free. If you’re eager to try this out yourself, I’ll let you know when I have something ready for you.

I am currently building a Wiki for the engine, so as soon as it’s ready to show for the public, I can also tell you if you like.

That’s it for the moment. I hope you find this project a little interesting.

See you around. And thanks for reading.




Apr
27

Deconstructing the FPSRussia video

So it has come to my attention that 4 days ago, a video appeared on YouTube, on the FPSRussia account. Apparently his channel is known for testing and demonstrating a few gadgets. However this one received over 5.5 million views at the time of this writing.

Basically the guy demonstrates a somewhat military device. It’s a quadrotor (it’s like a helicopter with four blades instead of one), that has a small machine gun attached to the bottom of the hull. In the course of the video, he demonstrates its abilities and the fact that it is remote controlled with some kind of tablet.

First, here’s the video:

Now there are a few things I like to point out. First of all there has been a discussion about whether or not this is CG or some kind of Ray Tracing. Let me tell you, now that I’m working with all sorts of 3D approaches, Ray tracing like this is possible - but requires a shitload of processing power (would take forever to render), Shadow-Mapping at this level and detail does not exist but could be achieved through Ray-Tracing (you see the issue, yes?).

Okay so the first bit I think is a bit strange is what I believe to be the camera on the unit. It could be some sort of filter, but the camera images (I’ll come to that in a moment) wouldn’t point in that direction.

Next bit is the device through which the man is apparently controlling the drone. He claims it’s a tablet “that can kill you”. Now if the drone is real, than that’s true. However, let’s take a closer look at it.

While the tablet does not really have any resemblance to known tablets in the market, it has similar characteristics. It is approximately 10 inch in size, and appears to capable of at least single touch. However you would agree that the display looks as if it comes out of an action movie, yes?

Now the next bit is the actual camera transmission. There are times when he demonstrates the abilities of the device and you can see what the device actually sees. However the weird bit is the look itself. This is the quality of the camera.

Somehow, I think that this quality does not match the screen on the tablet we have seen just now. I also wonder about how this cam transmits in 720p - and yet have such a bad quality. The device is at no time further away than maybe 15 meters. At this close range you have little to no quality loss when transmitting through the air.

At some points I find it weird that things explode where they shouldn’t be. While you can see the gun doing something and the drone having some recoil, the point where the “boom” happens is not where it should be. This may suggest that pyrotechnics were prepared.

The one last thing is the concluding part of the video. The man steers the device into the back window of a car, and ultimately blows it up. He claims the drone (a prototype I might add!) is equipped with a sef destruct sequence, in case shit hits the fan. He claims the self-destruct to have a blast radius of 15 feet. That’s about 4-5 meters.

So what’s left to say? I think it’s hard to discredit the footage. It seems to be genuine with no alterations. However, I do believe the whole thing to be staged. Why would someone 1) be given such a prototype device, and 2) be allowed to blow it up?

I’m not saying anything. I’m not implying anything. I’m just a bit of a paranoid person, and these are my thoughts on it.

Back to coding Orion’s Gate!




Apr
26

FAIL #51

Dublin’s journalism at it’s highest and finest level.




Apr
13

And that’s why Microsoft bought AOL




Apr
01

Blind playthrough – Portal Rexaura, Part 1

I’m back once more to provide you with random rants, singing, eating Pringles, and sucking balls at solving real men’s puzzles!




Mar
26

Orion’s Gate: Real Time Ray Tracing concept

If you’re not aware - I am working on my own online game for quite a while now. However, one thing has been quite a pain in the ass to do - and that’s shadows. So I’ll be talking about that particular subject today.

Producing real-time shadows is one hell of a thing to accomplish. Luckily in this day and age, there are a few ways to go about this. These are:

Shadow Mapping
Probably the most widely used technique of them all. The fast version is that you render from the light’s view, note depth values, render from real point of view, compare values, and determine which part is lit and what is in shadow. Sounds simple, it’s pretty difficult since you have to do something called Matrix Multiplication.

Volumetric Shadows aka Stencil Shadowing
This technique performs so-called Backface-Culling (find out which polygons can’t be seen by the camera), copies them, and extend them in a finite range, and make the overlaps visible with anything those “copies” hit. This usually produces pixel-perfect shadows - but it’s also very expensive to calculate.

After reading a lot about this shady (badum-tish) subject, I decided to go about it in a different way. I sat down and thought long and hard about a way that would sort of maybe meet both of them in the middle, or maybe use a new technique to do it.

I learned of a completely different technique, called Ray Tracing.

While super-easy to implement, even on easy scenes it can take quite a while to render the scene. There have been a few attempts at actual real time ray tracing, one of which can be seen here:

Now obviously that kind of setup and machine is a bit outrageous to aim for someone making a game. While this looks pretty good, pixel-perfect ray-tracing as seen in the video will remain in the domain of super-computing for now.

However, I came up with a way that utilizes a stripped down version of ray tracing, which is usable in today’s hardware. While it won’t produce super-mega-realistic shadows, or imagery, it does work as intended and produces accurate shadows with the help of light ray tracing.


Real Time Ray Tracing - the logo for my technique


I’ll outline the steps of the technique used, hopefully in a way that works for everyone.

1) Define a grid of a finite size, say 128 x 128 points. The higher this number, the higher the shadow detail - but also the more delay in ray tracing. You could think of this as the shadow map size.

2) Have a model in the size of exactly 1 x 1 unit compared to the grid, and place it at the start position (0 x 0 for example). Also, switch your view to the light’s position (IMPORTANT).

3) Start moving the model in one direction (horizontally or vertically, up to you), with the distance of 1 unit. Rendering is not required. You query whether or not the “scanner tile” can be seen from the light at its current location. When it hits the end of your plane, you move it back to 0 vertically and 1 unit horizontally, and again move it on that line to each place in the grid.

4) As you move the “scanner tile” on all possible locations on the grid, you mark down whether or not the tile was seen from a specific location. If for example a cube was blocking sight to the tile, that particular place has to be in shadow.

5) Now that you know what is in shadow and what is not, you can begin shading the scene. How you do it is ultimately up to you - I use simple two-dimensional GL_QUADS at those locations. I also take the distance of the tile to the light into account, and apply an alpha value to it relative to its position to the light, giving the effect of shadows fading out the further they are from the light.

It works like this:

Here are a few screenshots of the technique in action.

And to close this off, I’m showing the technique on video and explain it in simpler terms, if you’re interested.

Until the next worklog.




Mar
19

Darker;Than:=Steiner

AMAZING




Mar
14

Time squared: When They Cry

It’s 1983. June, to be precise. Everything seems to be quite normal on the surface, in Hinamizawa - a small village outside of Tokyo. However, everything is far from normal in that town. What seems like a normal festivity to the outside, is something quite bigger than one could imagine - as Keichi Maebara is about to find out.


Mion Sonozaki, Shion Sonozaki, Keichi Maebara, Rena Ryugu, (2nd row) Satako Houjou, Hanyuu, and Rika Furude - the center characters of the show


The village has been home to some very bizarre incidents lately. You see, a dam was supposed to be built there - but the villagers got together and opposed this plan of the government. Ever since, on the day of the Cotton Drifting festival, an annual event in the village, people were killed under mysterious circumstances. While the homicides have been investigated, none ever came to a conclusion. The most notable murder is the so-called dismembering incident, in which pro-dam villagers were mutilated. For four years now, someone died and someone went missing.

When Keichi moves to the village to get a fresh start in life, he had no idea what he got himself into. Much less so has he any idea about the mystery of Hinamizawa.

Keichi quickly learns of Oyashiro-sama’s curse - something the villagers firmly believe is responsible for the deaths. It is believed by the villagers that whoever trespasses into the holy grounds of his temple, or, who attempts to leave the village - is befallen by the curse, and dies.


Shirakawa, Gifu, the village used as the basis for Hinamizawa


It is only when one of Keichi’s new friends (I won’t say who right now) becomes paranoid and is about to kill him, things dawn quickly on him. He is looking for help from the police - but help arrives too late. What is even more strange, is the fact, that after the festival, every one is back alive and it seems as if nothing had happened… and, so to speak, nothing really did happen.

Time is turned back as you are about to learn. You’ll also come to meet Rika Furude - a relatively positive personality that goes to the local school - or so it would seem. For some reason she appears to have deeper knowledge about the events in the village, and sometimes seems to be able to accurately predict things that are about to come. It would appear as if she also the only one who is able to retain memories of each time loop.

For the moment, I’m going to leave at that. It’s really only barely scratching the surface of what’s happening in that village. But be warned: This anime is extremely graphical at times and may not be suitable for all audiences. In other words, if you can’t bare to see violent things, this may not be for you.

That said, I find that the story arcs worked pretty well together. The voice acting is pretty okay for the most part - it sometimes seemed to be out of place, but it won’t kill the joy of watching it. The musical score is pretty decent. I personally really liked the opening of the second season.

All in all, if you’re into violence with a deeper story, X-Files and food for thought, this one is for you - I would highly recommend it. It has gained cult-status among otakus, which should tell you quite something.

BUT… that’s not all.

Game without end: When The Seagulls Cry

In an attempt of continuation to the dark and violent framework set forth by the first two seasons, “When The Seagulls Cry” is the 3rd and final season of the show, bearing an almost identical name and logo.

This time around we find ourselves in 1986, on an island named Rokkenjima. The island is home to a man named Kinzo, head of the wealthy Ushiromiya family - and thus it is the family’s flagship mansion. Everything takes place between the hours of October 4 and 5. Kinzo is near death, and eight of his family members arrive on the island for the annual family conference, where the adults plan to discuss how Kinzo’s assets will be divided once he is dead. Also on the island are three family members who live there, five of Kinzo’s servants, and his personal physician. After the eight family members arrive, a typhoon traps them on the island, and shortly after, strange things start to happen and people start dying.


This is a painting of Beatrice - a witch that supposedly lives in the dense forests of the island. Does she really? And who is she?

This painting can be seen in the main entrance of the mansion. Below it, one can find a puzzling epitaph.

Our hero, Battler Ushiromiya, arrives on the island with some of his family - basically to take part in the discussion. However shortly after his arrival, a huge typhoon breaks loose and Battler becomes witness to a surreal string of murders - all of them seem to have to do with the epitaph at that painting - which states that if one can solve the riddle, one may find a large amount of gold, and become the new head of the family (that was the fast version).

Beatrice, the witch of the island, shows herself to him and explains that all murders were done through magic - or rather, a supernatural force. However, Battler does not believe in magic and believes that he’s been tricked.

After this, Beatrice takes him into a parallel dimension, Purgatorio, from which Beatrice is able to observe events on the island. With that, Battler is locked into a dark and surreal game with Beatrice - in which Battler has to explain all murders through human means and tricks, while Beatrice’s mission is to get Battler to acknowledge the existence of witches and their power.

I’ll leave it at that for this one too. 07th Expansion continues with the time-loop theme, which in itself is extremely fascinating to me. While at times the scenes were extremely graphical - and again, not for everyone - it is a HUGELY enjoyable show that you should watch right after you finished the first two seasons.

When They Cry Higurashi (Season 1)
Directed by: Chiaki Kon
Studio: Studio Deen
Licensed by -
Canada, United States: Geneon (expired)
Australia, New Zealand: Siren Visual
Network: Chiba TV, Kansai TV, Tokai TV
Original run: April 4, 2006 – September 26, 2006
Episodes: 26

When They Cry Higurashi (Season 2)
Directed by: Chiaki Kon
Studio: Studio Deen
Licensed by -
Australia, New Zealand: Siren Visual
Network: Chiba TV, Kansai TV, Tokai TV
Original run: July 6, 2007 – December 17, 2007
Episodes: 24

When The Seagulls Cry
Directed by: Chiaki Kon
Studio: Studio Deen
Network: UHF Stations
Original run: July 2, 2009 – December 24, 2009
Episodes: 26




Mar
03

/signed

(Found in a bathroom stall today)




Mar
01

FAIL #50

Found this one in Tesco just now.

So basically, theft is theft. Glad we cleared that up.




Older posts «