|
DeleD Community Edition Forums
|
View previous topic :: View next topic |
Author |
Message |
ally DeleD PRO user
Joined: 08 Jul 2007 Posts: 24
|
Posted: Wed Aug 15, 2007 12:00 am Post subject: Ally's Project - unnamed at the moment |
|
|
Quote: |
I make ugly tables and boxy rooms with my version of DeleD.
... I'm kind bad at it. haha.
|
I wasn't understating my horrible lack of DeleD skills I'm afraid. But here's my latest project screenies, as promised:
Here' a Video You can download of in game falling tables (~10mb AVI)
I also tried my hand at making a fancier looking level... please don't laugh lol.
Some notes about the engine:
Programmed in C++ (MSVC++ Express) and DirectX 9.0
Newton Physics Engine
Stuff I implemented that I'm proud of:
A custom shader scripting system called RoboScript: Complete with parser, lexical analyzer, compiler, and virtual machine. All the shaders (only 2 in the scene right now, but thats just because I don't have a lot of good ones) are controlled through this scripting system. A robust scene management and resource management system. Although the video and screens are first person, the camera supports 5 modes of operation:
-Internal Perfect ( this not only moves you "inside" an object, but will also spin, twist, and turn the camera as the object is tossed about, not great for playing in, but a lot of fun for cut scenes and stuff haha).
-Internal Positional ( you just move inside the object, unchanged by it's rotations - standard FPS )
-External Offset ( similar to Resident Evil 4 )
-External Orbital ( spin around an object, always looking at it )
-Manual ( flight sim style, the mode you see in the demos )
It's all very modular. I'm working with a development team now called Robot Army, a fun group of college kids like myself who are into this kind of thing. So far all the programming has been done by myself, although Matt (from the team) helped a lot with the shaders - the two I used were written by me. I think they look pretty good =D.
One shader is a point light + normal (bump) map - applied to the level and the tables. The second shader is a directional light + a reddish orange tint (the sky is naturally blue and white). I thought this added a bit more atmosphere. I'm currently NOT using any lightmaps from DeleD, mostly because I haven't spent much time with it. I should though - it's on the list. The lights are all calculated run time via programmable graphics pipeline.
The level and those sexy sexy tables were modeled and textured in DeleD by yours truly. The second screen (with the blue sky sphere) was just me playing around, sometimes when you make something you waste so much time playing around with it instead of working on the next step, haha.
I'm aware some artifacts exist: specifically a glitch in the bump map point light algo that seems to be skipping certain surfaces, and the poor job aligning the textures on my sky sphere.
But not bad for 2 months work, I think. I'm really proud of it! So sorry about the ego. |
|
Back to top |
|
|
Paul-Jan Site Admin
Joined: 08 Aug 2004 Posts: 3066 Location: Lage Zwaluwe
|
Posted: Wed Aug 15, 2007 8:50 am Post subject: |
|
|
Hah, lots of good stuff!
First of all, kudos for doing your own shader scripting system, that's always a good excercise (try forcing other people to use your script, that'll get you a lot of urgent feedback _fast_). What do you compile to? Byte code for your Virtual Machine? If so, what does your VM translate to? HLSL? (and if not, what do you compile to, and what is your VM for?) Details, details, we want details...
Lovely screenies (programmer-arty, but tres cool). From the lighting, it looks like you used averaged (smooth) vertex normal everywhere, is that correct? Looks a bit odd on the edges of the tables.
Downloading the video as we speak... can't wait to see the physics in action! |
|
Back to top |
|
|
Mr.Fletcher DeleD PRO user
Joined: 07 Aug 2004 Posts: 1772 Location: Germany
|
Posted: Wed Aug 15, 2007 1:29 pm Post subject: |
|
|
What kind of game will it become? Do you have any specific plans for that?
Good to see some action already. People tend to announce their projects very early and then realize they won't get it done (I'm no different).
Also, what would you need lightmaps for when you've got shaders? (I'm not very experienced here as you might notice) _________________ Behold! The DeleD Wiki! Please help us expanding it
DeleD on IRC |
|
Back to top |
|
|
ally DeleD PRO user
Joined: 08 Jul 2007 Posts: 24
|
Posted: Wed Aug 15, 2007 3:29 pm Post subject: |
|
|
Paul-Jan wrote: |
Hah, lots of good stuff!
First of all, kudos for doing your own shader scripting system, that's always a good excercise (try forcing other people to use your script, that'll get you a lot of urgent feedback _fast_). What do you compile to? Byte code for your Virtual Machine? If so, what does your VM translate to? HLSL? (and if not, what do you compile to, and what is your VM for?) Details, details, we want details... |
Aww it's not nearly as cool as you imagine I think. It compiles to byte code which is run inside of my application and is really just a glorified text parser lol. It acts more like a slightly fancier .ini file. Details, let me think.
I was having a lot of problems getting specific shaders to work at different times, interacting on different surfaces, with different variables - short of hard coding them directly into my code or building a single DLL, which is probably what I should've done. What I needed was something that could be paired with compiled shader code that would enable my scene manager to apply the correct shader to the correct material in the scene. In fact, if someone has a better idea how to do this, I'm all ears, since mine is a little clumsy.
So I write my code in HLSL, but it's complimented by a sister robo script, which probably is going to make you laugh when you realize how unsophisticated it is:
Code: |
///////////////////////
//This is a script test
//
//By: Howard N Smith
//
//Command | Shader Parameter | Set Value
//////////////////////
SETTECHNIQUE "PointLight"
SETVECTOR "LightPosition" CAMPOS
SETMATRIX "WorldViewProjection" WORLDVIEWPROJMAT
SETMATRIX "World" WORLDMAT
LOADTEXTURE "Wall10_bump.jpg"
SETTEXTURE "NormalMap"
SETVECTOR "Diffuse" 0.5 0.3 0.3 1.0
SETVECTOR "Specular" 0.1 0.1 0.1 0.1
SETFLOAT SpecularPower = 10
|
Then this script is compiled to take out as many string comparisons as possible, specifically because this script will be run every frame, and another one for every shader. And to generally optimize it as much as possible.
Here's adding a shader, and pairing it with a script (in this sample code I'm compiling at load time, however you can precompile to save this step. I am compiling it here this way I can tweak the shader quickly and easily.)
Code: |
cEffectFileResource *effect = mEffectManager.Add("bumppointlight.fx", "/resources/", true );
cRoboScript script = CompileRoboScript("/resources/bumpointlight.rsr" );
if(!script.mErrors)
mSceneManager.AddEffect( &(cEffect( effect, script)), "pointbump" );
|
Here is the code that actually does the rendering: I'm using a map that batches all the subsets using the same material / shader into a vector, then we iterate through the map, each entry we establish the proper texture and shader combination, render all the subsets in the vector, then continue on our merry way...
Code: |
DEBUGMSG("DB_SCENEMAN: Found effect file.", DB_SCENEMAN );
D3DXMATRIX viewMat, projMat, worldMat, combMat;
viewMat = mCamera.GetViewMatrix();
projMat = mCamera.GetProjMatrix();
worldMat = iter->second[i].mObject->getWorldMatrix();
combMat = worldMat * viewMat * projMat;
//here we just get and calculate the correct matricies
effectIter->second.mEffect->Initialize( NULL, NULL, NULL, &(mCamera.GetPosition()), &(mCamera.GetLook()), &viewMat, &worldMat, &projMat, &combMat );
//we need to pass them to the script so it can use key words like "WORLDMAT" and "PLAYERPOS"
effectIter->second.mEffect->StartEffect( &(effectIter->second.mScript), timeDelta ); //easy as pie to setup the effect
UINT uiPass, uiPasses;
effectIter->second.mEffect->getEffect()->Begin(&uiPasses, 0);
for(uiPass = 0; uiPass < uiPasses; uiPass++)
{
effectIter->second.mEffect->getEffect()->BeginPass(uiPass);
iter->second[i].mObject->RenderSubset( pd3dDevice, iter->second[i].mSubset, timeDelta );
effectIter->second.mEffect->getEffect()->EndPass();
}
effectIter->second.mEffect->EndEffect( );
//then render it, and the subset.
|
So it's not super fancy VM that translates some homebrew ASM, it's not going to compete with LUA and it can't really even be used by anyone else. It's a simple command line language. Sorry it's not so cool, but I was really happy with it.
Paul-Jan wrote: |
Lovely screenies (programmer-arty, but tres cool). From the lighting, it looks like you used averaged (smooth) vertex normal everywhere, is that correct? Looks a bit odd on the edges of the tables.
|
Touchee! Yeah you hit it on the nose.
I really shouldn't have posted screenshots until I wrote more shaders, made some better looking models, things like that. Now that I woke up and looked at it again I could've done a better job to make a better first impression. Yeah, I shouldn't be applying that one bump point light to the entire world, not only does that defeat the purpose of the selective shader scene manager, but the tables weren't meant to be shaded this way.
I just wanted to get something posted and feel special haha. It was a bad move, remind me to fix it and post again.
Quote: |
What kind of game will it become? Do you have any specific plans for that? |
Iono. I have designers that figure that stuff out haha. I'm just an oooold code head who likes to do this stuff, thinking of a game that isn't silly and stupid is not what I am good at =D. Luckily there are lots of people around who like to do it, so I never have to worry about it.
Quote: |
Good to see some action already. People tend to announce their projects very early and then realize they won't get it done (I'm no different). |
I should've waited longer, I just couldn't resist, I got the thing working after 4 days of struggling, and I desperately needed someone to see it and say "not bad" because I'd been looking at it for so long that I wasn't even sure if it looked GOOD anymore. And there is my giant uncontrollable monstrous ego...
Quote: |
Also, what would you need lightmaps for when you've got shaders? (I'm not very experienced here as you might notice) |
You can use a shader to apply a lightmap, amongst other things, and make some cooooool effects =]. Similar to the way you use a normal (bump) map. This is what I should've done for the second batch of screenshots, a light map + spot light / flash light. And maybe spent some time making something other than tables falling, maybe some sort of enemy or NPC. |
|
Back to top |
|
|
ally DeleD PRO user
Joined: 08 Jul 2007 Posts: 24
|
Posted: Sat Aug 18, 2007 9:48 pm Post subject: |
|
|
So, I decided I'd make a simple game and started working on some of the models and levels.
Here's a little teaser shot of our unlikely hero...
The level was done by me in DeleD, and my friend from RobotArmy made the robot (his name is Juju) in 3dsMax, but I did some touch ups with our favorite low poly editor.
I'm using a newer phong point light shader in this level, and a simple ambient light (tinted red, again, for the outside) |
|
Back to top |
|
|
granada Team member
Joined: 07 Aug 2004 Posts: 1955 Location: England
|
Posted: Sat Aug 18, 2007 9:53 pm Post subject: |
|
|
I love that robot ,Like to see it animated.
Dave _________________ AMD Phenom(tm)IIx6 1090t Processor 3.20 GHS
8.00 GB memory
Windows 7 64 bit
Nvida Geforce GTX 580 |
|
Back to top |
|
|
jwatte DeleD PRO user
Joined: 26 Apr 2006 Posts: 513
|
Posted: Sat Aug 18, 2007 11:31 pm Post subject: |
|
|
Love the robot!
The grates on the floor are horrible, though. They look too large, and the texture resolution is not what it should be. |
|
Back to top |
|
|
ally DeleD PRO user
Joined: 08 Jul 2007 Posts: 24
|
Posted: Sun Aug 19, 2007 2:11 am Post subject: |
|
|
Yeah I stink at modeling =( I spend more time programming than I do practicing I'm afraid. I do enjoy it, but I feel guilty, like I'm playing and not working haha.
Thanks for the tips, I'll keep working on it.
Animated eh? Might have to break out the ol' fraps alternative for you guys...
might not be back for a while, I have a lot of work to do, but I'll bring back some video when I do. |
|
Back to top |
|
|
Maverick77 DeleD PRO user
Joined: 14 Jul 2007 Posts: 26 Location: Vancouver BC, Canada
|
Posted: Sun Aug 19, 2007 4:45 am Post subject: |
|
|
it looks good for PAR art ("programmer art rules")
i know what you mean, i stink at modeling also, but being a programmer too, i quite enjoy working at the graphical end of things. |
|
Back to top |
|
|
Mr.Fletcher DeleD PRO user
Joined: 07 Aug 2004 Posts: 1772 Location: Germany
|
Posted: Sun Aug 19, 2007 8:14 am Post subject: |
|
|
I can't help it but the robot looks like a sprite to me. Other than that, good job! _________________ Behold! The DeleD Wiki! Please help us expanding it
DeleD on IRC |
|
Back to top |
|
|
Nocturn DeleD PRO user
Joined: 08 Aug 2004 Posts: 635
|
Posted: Sun Aug 19, 2007 12:28 pm Post subject: |
|
|
Interesting project, reminds me a bit of Roboblitz - www.roboblitz.com
I really like "Juju". |
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|