Bit by Bit

Update:
Very good tutorial and example of shadow mapping on the ios or android really any device.
here: http://fabiensanglard.net/shadowmapping/index.php
A good guide to keep your head on straight when constructing it. And I agree with him. I have no idea why people go to all the effort of transforming out of camera spaces inverse and the like when you can map directly to the rendered frame buffer object through the light projection and view matrices… anyway this method is much faster.

Getting much better =)

With Spinning light…


Now to get it in the game and test out the edges I expect I will blend the edges by clearing the viewport in full rez then render to a subset….back to work!

Is how you program systems.. and the bit I am on right now is getting the shadows into the correct space… I am transforming the vertex position back into the light cameras view space to get the sample points for the depth map render. Somewhere in that mess I have a mistake and it could be in my scene graph. I am close however and when I am done with this I really do not see anymore difficult code chunks left. This required some additional functionality added across the scene graph but overall again I am very pleased with the robust nature of this scene graph =)..Hopefully I will be back into eye candy and game talk soon this stuff can wear on you.

Here is where I left it last night. As you can see the map is not mapping properly to the eye space and the camera eye space. Something that should be simple is turning out to be elusive =)

And there is the error… those values there should map into the light and the colors should be at the edges or close really.. hmm very strange…

WOW found it…. sheesh stupid.. the magical W component of the bias matrix I had set to 0.5 not 1.0… NICE!

So for a quick explanation of how Shadow mapping works. It is actually much easier then Shadow Volumes. First you create a render texture and use a camera to render from the light to the target into that render buffer only drawing to the Depth map (front face culling helps in artifacts!). Then take the Frame Buffer Object and use it when you render the object and for the “shadow” part of the shader simply transform the untransformed point BACK into the light cameras space EXACTLY as you did when you rendered it into the FBO. This will place the puppy back into the map you rendered and a reference point for how far away it was from the light. With some Magic W action check the difference of the two and see what is in front. I need to optimize this shader someday as it is the work horse in the game but that is for later for now I need to finish up this shadow mapping fun =). A BIG tip when working on this is to line up the camera and the light cam and then attempt everything that way you can narrow down the variables. =)

Mondays Goals

Update:
Bed time =).. I got all the way to the Light Matrix I need to figure out. It should not be hard but something has me stuck for now…most probably the need for sleep =).. Good stuff, Good day, I hope everyone’s was the same! =)

Mission Europa is still waiting for review and no word from anyone of anything major! =)..

Update:
So now the system completely works inside of my scene graph. Take a transform hang a shader if you want to see the light. Then hang a camera with references to places in the graph you want to render and whammmmmmoo!…Depth buffer (or color depth and stencil whatever…) Next step is to get this integrated into the lighting equation with the bias matrix an light matrix weeeee matrix math…

Update:
Here is the first step =)


I scaled up the z buffers close area so it is more visible otherwise it would be very hard to see..
Next step Shadow Matrix! =)

1. Shadow mapping!

It should be a walk in the park to get shadow mapping into my engine. I plan on using the old shadow volume code for light rays cast off objects later. To place shadow mapping into my engine I plan on using a shader override. When the renderer runs down my scene graph the models store the level of detail of the last camera they were rendered with. Thus on an override the shader is forced into a depth only render and the lod is not altered by the shader at render time for the models. This means a model will still be at what level of detail the last render was at. So if the camera is far from the light you will not have artifacts with higher LOD models next to the light. The shadow map shader will take into account the 1st testure registers alpha with an alpha test of 0.5.
The process will be
Render from the lights point of view only rendering to the depth map. (hopefully the camera is not moving to fast that the last LOD holds for the most part…in cursed realms it will not if so a pre lod run will be required.) Then render the scene normally using the shadow map generated and transformed using the light to camera matrix and a bias to move the -1 – 1 space into a 0 to 1 space. Good stuff and the results should be spectacular.

Really good progress

I cannot wait for the Mission Europa Patch to get released!

Today I got most of the goals complete and I am actually close to level creation. I plan on getting shadow maps implemented soon. The shadow volume code can still be used for light rays, however the fill rate impact is just far to high. I will probably start that tomorrow it hopefully will not be to difficult. It will limit my lights to directional only. I might go for teh omidirectional shadow maps. The problem there is even more of a hit per light. I would rather have 6 directional lights then 1 light with 6 shadow maps. Any-who that should be exciting. For now back to work!

Btw here is a great refresher or tutorial on simple shadow mapping using render to textures and a light to view transform matrix. Pretty fun to see a 2.0 * x – 1 for the -1 to 1 transform and scale to 0 – 1 with a matrix using 0.5 down the identity chain of ones and then the transform of 0.5. Great quick and concise article without what sometimes I think is purposefully difficult to follow jargon and terminology.

http://fabiensanglard.net/shadowmapping/index.php

Saturdays goals

1. Finish the command printer.
2. Check the level uploaded to the server against what I get back and be sure they are exactly alike minus comments that are in the starting databas and are lost when an object is serialized.
3. build a level and save it
4. Get the ipad out and start constructing and saving a level to the web.
5. Make more awesome every step. Improve tools every step.

Happy Saturday all and do not forget UFC free tonight on FOX 8pm et.

Creating an in game editor…

In all my experience the more in game editing and testing that can occur the better. It is like creating a sculpture. Would you rather due so by verbally telling a person what to do or would you like to get what you want by directly carving it. That is where I will be this weekend. Adding better tools to get level one DONE finally.. 😉

I updated the wiki to include the design for the final editor.
http://ryanmitchellgames.wikispaces.com/–EditingLevel

P.S. No word back yet on any major issues in Mission Europa… good stuff =)

Today a break from Mission Europa


Back To Cursed Realms… aaaahhhh That Mission Europa Jaunt made me really appreciate the new design and engine =)

Back to cursed realms for fun! So far thanks to Doom and MrSpud all I have reported so far with mission Europa is a bug standing over a legendary relic that loops an effect and energy weapons sound effect bugs.. Both can wait for the next patch as stability is my number one huge concern ;). So that is actually pretty good news being the huge amount of surgery I did on mission Europa’s innards.
The problem with how I built Mission Europa’s engine is it started evolving on me. I stopped “designing code to solve issues and started brute forcing things. The next thing you know I have ballooned the code base and I would say more then half of the compiled code should be data driven design. In cursed realms I am 100 percent the opposite. I also wrote it to where everything has a sting based name and the entire running engi e can be logged in real time. I can inspect just certain items. The largest change is the serialization from a data tree I designed. Where all objects start from a database and then are serialized with their current state to a file or across the web. Bog differences also in the graphics as cursed realms is 100% next gen and OpenGL es 2.0. Cursed realms is all shader driven with no fixed function pipeline. That is what took the longest time. I had to write everything down to the trustful for the camera for it’s projection, view, and the model matrix. Any who things are looking good now and I will get a break from mind numbing debugging to work in that stage that is the most fun. The experimental stage! 😉

Happy Thursday all!

In jumping back into Cursed and upgrading to 5.0..OpenglEs 2.0 has had some changes aqlong the way in one of the million releases it seems I have not read…So now my light vectors and what not transforming into my shader are borken.. weird.. fun stuff.. But hopefully this will be the last time I have this big an update until launch 5.0 was a big change….

Ahh I had an error that ios 4.x let by… I had glUniform4fv with a 4 for count when it should have been 1..

Note for other devs if your shaders work in 4.x but just show black in 5.0. Then look at your glUniformXfv calls. I had a few where I called glUniform4fv(program,4,pointerToFloatArraySize4);where the number 4 of course should have been 1… whoops… that got by in version 4.x. Anywho that took a long time to figure out being that I had to look at the color responses in shader results to figure it out!..

Mission Europa Patch Complete….

Update: Made it to Quest 8 on level 2 the last one.. One crash in all 1.5 hours playing. Do I want 0 crashes yes… BUT does 0-4 sales a day warrant the level of attention it would require for the out dated and thrown away Mission Europa Engine when I have Cursed Realms to create with a totally awesome completely debug-able and totally new engine that is 100x easier to debug?… I do not think so… So I am happy for now there. If you testers find something crazy let me know it is time to eat some dinner for me it has been a LONG 4 days… My Cursed Realms Memory debugger detected a memory stomping but I could not track it down without much more time involved and the crashes I DID fix make me want to get this out now it was damn near un-playable due to the updates…If I get more complaints post patch or Mr-Spud or Doom or any other tester say they want more I will =). However, I feel pleased now with the crap ass audio engine replaced and 149 errors corrected among other fixes. Time to upload the standard build for its update….LET ME KNOW IF YALL FEEL DIFFERENTLY TESTERS PLS =)

P.S. The crash was in level transition SO the saves were fin I just had to relaunch and load… no time lost.

P.P.S. If Skyrim can crash on my PS3 as much as it does maybe people can cut a team 1/100 the size some slack on the shifty and sometimes unpredictable IOS and ObjC ;P
——————————————————————————————————————————————–
Update: lol spoke to soon quest 7 crashed on skipping intro to level. Cryptic modified freed object arg…one is not bad it was constant before… and it ran for an hour while I changed both cars oil 😉
——————————————————————————————————————————————–
Update: Quest 6 no crash…. crossed fingers… still 30+ min of gameplay is a good amount compared to before
——————————————————————————————————————————————–
Update: They may not have been crashes as my son was the one testing and I think he hit the square button.. but we shall see still playing…so far Quest 8 no crash…(besides a possible one after the tutorial)
——————————————————————————————————————————————–

Ok going to play Mission Europa a little tonight…but then FINALLY back to cursed realms and creating cool not fixing cool =P…

Update: Downloaded and played the first 3 quest on iPad for the first time in a game non debuge format… very nice =).. rather enjoyed it =)

Update Upload complete…I am downloading it now and will let y’all know if it all went well =).. this is my SECOND time using test flight so please let me know if there is an error I can fix it pretty quick =)…

Update: Uploading to test flight. =)

Finally 4 hard long nights and some days and here she is!… I will be making the build and uploading to test flight as soon as I can get back through to apple with my mac mini =)…..

Largest Fixes in patch:
—————————–
Ripped out old sound system
Placed in Cursed Realms Sound System
Ripped out Music System
Placed in Cursed Realms Sound System
Fixed numerous memory issues
Added in back stops to prevent to many sounds from playing and overloading memory.
Stopped multiples of the same sound from playing.
Placed in new memory tester.
Ran hours of tests looking for mem-overruns
Removed over 149 warnings from the new 5.0 compiler
Many Many smaller fixes..

My new memory debugger I wrote for Cursed Realms is doing a number on Mission Europa =)… It has found several issues I need to resolve. I do not think it will take to long tonight as I made a huge amount of headway last night. I will post as I garner more data but for now I still think I MIGHT be able to get a build done tonight…

Funny thing I ran into during debugging… I SEE A LIGHT!
(I turned of skeletal updates in a test I ran) =)

another side effect… kinda funny =)

Still chewing into Mission Europa at night.

Update: AWESOME SAUCE seems stable as hell now. I have not had a single crash in a very long time and have shored up a ton of code (A few places I was moving to quick and not checking my work…dumb move and never worth it)…. I forgot just how neat Mission Europa is as apposed to the other games I play on my device =)… Good stuff and smooth as silk now!.. I will be placing a build up on test flight soon. (Getting the build up tonight does depend on life at home being kind to me tonight =)….I would guess tomorrow for the build.)

Update: MrSpud and others that were on the Mission Europa Testing Team please send me an email at
RyanMitchellGames@gmail.com title tester or something…(Please include device ID you will be using just in-case.)
and then I will send you an invite to the test flight team…really awesome way to test it is all over your device no more managing builds! I am hoping tonight I can get a build done =)…

Update: Got a little time during the day to “play” =P.. really its just running remotely. Things look really good. I may have a test flight build tonight! \;) REALLY sickening in all the massive amount of code that Mission Europa is the stupid health bar was the issue….argh…

Update: Really……it seems it was the value bar over the enemies heads… more testing to do but sheesh one line of code and a small function call… argh…

Now that is a stress test =) and a great frame-rate on my iPhone4 =)

The last crash I have been able to find is in the combat. So the game before would freeze at level changes due to OpenAL crashes. Even now using ObjectAL every now and then Object AL detects something weird with OpenAL and just restarts it. That was something my system should have done. That is where one crash was. The freezing was in OpenAL on a release source call. That was also fixed with ObjectAL. Now there is one last crash taht is VERY reproducable. I am using the Chicken if any of you have gotten that far =)… I am overloading the level with 60 guys and fighting them. I can get the combat bug pretty quickly in this manner. A real hint in this mystery is if I just let them beat on me then there is no crash. If I beat on them a crash comes sooner or later. I believe the crash is a memory overrun because the crash later happens in one of the few places that allocates memory during play( the sound engine =) )… I will post more when I learn more tonight =).. I have a real feeling tonight is the night I will squash this bugger!…I forgot how good Mission Europa was =P… been a while…

Mission Europa Patch Update

Last update for today: =)…. running on empty I have gotten down to the combat code and only the players side. So hopefully soon I will narrow down the bad guy tomorrow…. currently time to relax before bed =)

Update1_23_12 8:12pm: Zeroing in on another bug… In combat only when the player attacks there can be a sound crash… still hunting by stripping layers off and investigating slowly… pretty painstaking but I will find it…I also am finding with the faster devices these days some places are sticky as the update rate is so fast that you are shooting a ray on the very edge of a triangle… that is an easy fix after I find this sasquatch hiding in the combat code…

Update: I will be doing extensive combat testing tonight. I think there is a crash in there also… So far I have had a heck of a good result from the new sound engine… Other then that things are going really well with the update and are making me feel a lot better about Mission Europa =)..

Update: I hope to do a good amount of testing this evening then start a test flight build. I am pretty excited to finally get this fixed… ;).. Then back to Cursed Realms and the future =)

I have now totally replaced the audio system in Mission Europa. I have some testing to do and I am sure some clean up here and there but it is running GREAT now… I am using ObjectAL it is a great little tool. I had my own version of it but I never put the time into I should have. OpenAL is a DOG! Even using Object AL the simulator can have real issues. But now the biggest cause of problems is long gone!.. Very excited. I have no timeframe yet on test flighting a build as today looks really busy with football on. Within the next few days I will surely push a test flight app up.. too any of the old testers I would love a run at it with me =)…. Good stuff mid week I should be back on cursed realms full steam ahead. I am so very happy with the new engine having been working in my old M.E. engine a few days now… Man I do not like any of the teams playing but love a few of the players…. Brady, Ray Lewis (LOVE HIM) it is going to be good!

Mission Europa Weekend =)

Update: Found a crash!… in OpenAL! ARGH I KNEW IT!… black boxes…. My son found it while playing!…Ok replacing that old trash with the new stuff =).. course that means a total project upgrade fun!…

Update: Working through 149 warnings that popped up with the new SDK. Nice =)…. so far with the fixes no crashes…

Update: Last night was a brain cell burn only … hanging with some friends seeing how inebriated I could get… now I am paying for it =)… However, 5.0 is installing on the devices and testing will start very soon. It takes quite a while to install. I may end up installing the new sound system into Mission Europa as I am pretty sure it is a large cause of the problems but we shall see with some testing =).. More later… and I cannot wait to get back to Cursed realms things are really starting to move and look better every day =)….

I plan on this weekend being the weekend I upgrade all projects to 5.0 and get some serious testing done on Mission Europa Starting tonight =). A good sign is I left cursed realms running ALL NIGHT and things were smooth as silk this morning =O… If only I used this design on Mission Europa instead of another design I learned from the old Unreal Tech. My new design runs off VERY small code chunks all working internally in a contained pattern. Therefore I can place a bunch of smaller items together like legos to make something much larger and robust. Along with a heavily increased debugging ability. Add to that the simple serialization and de-serialization and I am VERY happy with cursed realms…. I plan on posting some work on cursed today if possible as the day job is ramping up a bit. Tonight will be M.E. and me in a debug-athon =)… I am super excited with Cursed Realms but getting back to the M.E. universe could be fun for a bit =)….. more when time permits.

Here is a pic from last night. No art is final but for now the helper will look like that eye there… don’t want to give away to much about the helper =)..

Actually I am going to add a fuzzy effect to that eye window also =)..

Here is the wavey effect in the simulators slow and sluggish frame rate (very annoying how slow the simulator is with opengl es 2.0 I wonder if it is even accelerated…

Mission Europa Debugging session incoming….

As requested I will put down Cursed Realms for a bit in the coming week to focus on new and old bugs in Mission Europa to get it more stable. =)…. 5.0 made things much worse. I need to first get Cursed Realms to 5.0 and stable then I will move back to Mission Europa and work on its stability for users out there =)…

Here is me making the “helper”

And here he is in game =) .. again in the simulator that is SLOOOOOOOOW!

Bumped into this wow… messed up

Sure feels like this is taking forever =)

The problem is that I am also creating this entirely new engine. I am front loading a BUNCH of work so later it will flow =). Today I will script the audio in and then I want to create a new camera setting node that I can use to render to texture scenes for scene graph effects. I am already doing that with the main scene but my cameras are abstracted out of the graph as they are used for multiple paths into the graph. So that is on the ticket tonight =)….I was able to get all the helper audio last night for the level =).. Things are looking and sounding better all the time =)….

P.S. If you do not read the comments 😉
Check out infinity 3 it s by Lightning Strike games who is a regular commenter here =)

O I was going to add that I think I am going to move to depth based shadows. They have way more artifacts BUT are a TON TON TON cheaper…Fill rate is the absolute killer on these devices thus that may take a few days soon. I will get that done with the aesthetics pass that is coming =)..

Still pushing towards level 1…

My goals tonight are to get the web uploader back up and running so I can edit levels anywhere. Then I will get back to attempting to create the level on the devices. 😉

Skyrim is in my top ten games of all time…and that is saying something. I cannot beleive the amount of work that was put into it. I know as I worked on an MMO for 2 years. The amount of content in Skyrim is astonishing….

Update: All level 1 story audio in =).. made a lot of progress tonight =)…along with the simple upload gig so I can save my work anywhere. =)

Dang Skyrim!

Yep… lost the weekend to it.. When I was not visiting friends and family over the weekend I was doing this…..

But I finally have all my spells and Daedric armor =P… Man if this was an MMO I would probably be dead in a month from muscle atrophy..

Today I need to get the data trees to save in a binary format to shrink them in size. I need to get them uploading to the server and the size will decide how many each player get -=)

Edit:
Forget binary I can get the file size down enough with some clever naming and still keep it in a readable format =)..Moving on …

O and btw I am going to mimic that armor in some class… freaking awesome looking..

Getting busy with it after a bit of measuring ;)

My wife will be starting her nursing career in a month so I will this morning be measuring my back yard so I can place in 3d the dream backyard we are going to spend some of the new income on 🙂 I’ll post pics here for fun after I get the 3d done.

As for the game I intend to keep moving into level one. Things are really picking up I actually will be adding in the narration today I belove! Good stuff! I have some issues I need to resolve and I want to store the levels in my own cloud storage as that way I can edit it on any device from my iPad to my iPhone. This way I can edit and create the game anywhere anytime 😉 some day I would like the entire creation process for my games to be inside the engine.

Have a great Saturday 🙂

Moving on level 1

Like I said it is MOVING!…. 20 minutes and I have a animating menu showing the level and name =)… what do yall think? .. I am not happy with the colors I like the shapes though =)

————————————-

Today I need to get the mission intro menu effect in. Then keep moving in on getting the level in. That includes perfecting methods to accelerate the other levels and adding tools as I go =)….

Tomorrow I get to go back to Texas A&M where I got my bachelors and masters to see my old outfit Squadron One Husling one the Flying Tigers get re-instated! I was in the corps of cadets there all the way through. Truly the best period of my life by far. I am excited they are brave enough to bring back the huslers if not under a different name. We were disbanded a few years after I left due to might we say disciplinary actions =)… whoop!.. I still love the shirts I have. We had a logo R.A.M.F. which we told the brass ment Ready And Motivated Freshman. We all knew it ment Red Ass Mother F-ers =P… O the good old times… So tomorrow no game work or day job woot!

More later time willing I hope to get a video up of the menu so I can get more input like Doom gave yesterday =)..

Starting to look all down hill from here ;)

As each new puzzle piece goes in it multiplies the awesome factor of the simulation :). I am back to checking serialization. Then I need to really create the level on in game script. After that I want to go over it several times with aesthetic and lighting passes. After that I will simply tie in the title screen and level one as the alpha and start loaning it up for a very small team of dedicated testers. If I was to guess barring anything crazy within 2-4 weeks of hard work level one will finally be to my liking :). Then we test and make improve,nets until it is uber awesome. That awesome sauce will then be used to create the other 20 levels in the first episode of cursed realms an easy 15-30 hour game. Episode 2 will continue the story with improvements over epsiode one if all goes as planned 🙂

P.S. The latest release of xcode was a HUGE increase in performance for me.

Fully created saved and restored =)…you will get 8 save spots locally to keep size down. IF I do the online sharing levels gig there will be 8 there also.. =)

Running through making lists… that is a good sign =)… That means I start to edit a level write down what is wrong or slowing me down then I keep going… When session is through I go fix the list =).. Anotherwords.. fewer and fewer show stoppers are in there =)..

Sound

ObjectAL is what I am going to use to interface OpenAL. I trashed my old interface as it was such a hassle to keep up with all the bugs and strange happenings on different devices the simulator with OpenaL and it’s REAL lack of docs for iOS. From what I see so far I love ObjectAL. I need to add in a Scene graph node for sound. It will hang under a transform node for position. All this after the day job =)…

Keep on Keeping on…. =)

Here is the start of the level script:

version 1
string name |_s_Mission1|
string headNode |true|
string type |SGT_SCRIPT|

Here is the script in the database for a shader mod that does the fuzzing:

(ignore the number on the keys that really does not matter and is just for me in testing =) )

Pretty easy as EVERYTHING follows this design. Heck you could place in a scene graph in either one and have it hang off there for reference later. Soon I will get that video of it working =)

I like it of course again the simulator is SLOOOOOOOW so ignore the frame rate =)…That is the first test of its use I want to add more distortion but next is the sound stuff for level 1 =)


different version … still not happy.. but I will work on it later for tonight sound stuff \=)

OK I need to quit messing with this shader =P… but here it is… I will have the level name fading in over it and the intro playing =)….

Upgrading XCode wish me luck…. always a nightmare. The reason I am updating is even on this BEAST of a laptop it chugs when working… I am hoping they have some optimizations.. So I am hoping the night is not lost but we shall see!

BTW AWESOME AUDIO SDK!

http://kstenerud.github.com/ObjectAL-for-iPhone/

This had to be the EASIEST integration I have ever had!….Both xcode 5.0 and the ObjectAL… so far Object AL is a dream come true. A lot of my crashes in Mission Eruopa were due to the audio interface which ObjectAL fixes… they even mention severe troubles with OpenAL, IOS, and the severe lack of docs.

Anyway off to watch the game!.. GO LSU!

Shader time..

Today I hope to get a video up of a new shader I am putting together for intros. I already have what I call shader mods which are just different functions I can attach to shaders that alter the input variables. One of those mods takes key frames. I am going to take a shader that is a basic fragment color * input color deal and add a fuzz to it. When your AI unit is loading I want things to be waking up. I want it to go through all three color channels with some fuzzing for the first 3 seconds of a level then revert to the normal bloom texture. I should have a video soon. After that I will need to move on to the sound system most probably so level one can get done. I am currently just going step by step through the level one script here ( http://ryanmitchellgames.wikispaces.com/Mission+1 )

A video later I hope =)