Progress up to 4/08

My developer blog, a monthly update on code progress. Updates inversely related to laziness.

Progress up to 4/08

Postby laneg » Sun Apr 08, 2012 11:31 pm

Okay, I've decided to start using this blog for info posts. Things are progressing well, and I've reached the point where Pxile is approaching a 1st Playable. This means most of the engine is up and running, and a lot of the backend modules are live. I'm working on frontend these days, which is a huge clusterf*** because of all the cross-dependencies...

I'm probably going to treat these posts as 2-3 image screenshot posts, which I then describe. So, here goes!

1) Fonts, Sprites, and the Scenegraph
Image

This image shows a lot of the backend work on the Sprite framework in pxCore. Features include:

    Animated sprites are automatically handled as png spritesets of variable dimensions. There are a variety of features for displaying ranges of animations.
    Those three red-green orbs in the right of the rainbow box show the scenegraph (not very obviously). Basically, you can bind sprites to each other in a tree structure, and they properly rotate, flip, and anchor by their own values and all parent values. In addition, using WBreak and WLink functions, you can "grab" and detach sprites without affecting their on-screen position, rotation, or flip! Believe me, it was a bitch to do, but it expands the functionality by quite a lot.
    The bottom shows the custom bitmap fonts (the top being regular spritefonts). I did this because it's easier to deal with the fonts this way, and you can support things like animated fonts (perhaps a written font that animates to look like the character is writing?). The "token" text shows how each pink-surrounded rect gets tokenized, and stored for easy extraction. The bottom-right of the rainbow box shows the individual tokens, which will be attached to a root bkg sprite in the scenegraph to represent messages boxes. This means you can treat a message box just like a regular sprite - moving, rotating, flipping - and all the text will also be affected equivalently.
... so yeah, scenegraphs are awesome. Especially when they are properly separated from the sprites they are attached to.


2) Perlin Noise and Realtime Shadows
Image

Now for some fun stuff. I got all this working in one night a few days ago.

    The background square shows a perlin noise effect, which may be familiar to photoshop users as Render > Clouds.
    Perlin noise is a fundamental shader effect, and is very important to have in your shader framework.
    The front shows a realtime shadow framework. The light source is bound to the mouse in the exe, which makes it a lot more bitchin', but hopefully you get the idea.
    The shader was inspired by a Ziggysoft article, but heavily optimized. I didn't have to use a separate pass to encode distance, or use the .gba channels at all, because I used polar conversions to get all the angles at the same time. (which also made the distance equivalent to the x value of the texcoords. Hooray optimization!)
    Code: Select all
    //initial screen color -> shadow map conversion
    float4 texcolor = tex2D(sDrawn,xShadowPosR+float2(v.y*cos(v.x*6.28318531),v.y*sin(v.x*6.28318531)));
    //post-crush shader calcs
    float dist = length(v); //0-1 range in X and Y
    float angle = atan2(-v.x,-v.y)/6.28318531+.5; //0-1 range for all 360 degrees

    I also crushed the shadow map by 4x per pass, rather than 2x, which reduced the bottleneck stage by a factor of 2x. ...so it's a lot faster.
    And yes, I did account for the aspect ratio. I'm not sure the pic is obvious, but that is a circular shadow.

So yeah, that's the first update. There's lots more backend work finished, but describing it in detail would probably put people to sleep...
...myself included...
laneg
Site Admin
 
Posts: 18
Joined: Sat Dec 24, 2011 5:50 pm

Re: Progress up to 4/08

Postby Guest » Mon Apr 09, 2012 12:00 am

just testing the guest reply capability. yep, you can now reply on any forum without registering. or having javascript enabled (heh).
Guest
 

Re: Progress up to 4/08

Postby philippejugnet » Wed Apr 11, 2012 10:05 am

You are a too fast programmer, I am impressed.
In order to play I will have to buy an XBOX360 remote control? or just a standards remote control?
philippejugnet
 
Posts: 20
Joined: Mon Apr 09, 2012 12:07 am

Re: Progress up to 4/08

Postby guest » Wed Apr 11, 2012 4:46 pm

here the guest is working fine too.
guest
 


Return to Updates

Who is online

Users browsing this forum: No registered users and 1 guest

cron