Platform Masters development (Mar 21, 2011) - Automating 24-channel ground (pt 3/3)

Loading...

Sign in or sign up now!
Alert icon
Upgrade to the latest Flash Player for improved playback performance. Upgrade now or more info.
5,590
Loading...
Alert icon
Sign in or sign up now!
Alert icon

Uploaded by on Mar 21, 2011

In order to go much beyond 12 channels per doubling for the ground, the process that already took 2 hours had to get automated. So, I wrote a program to do it. Not getting anywhere with StretchBlt or AlphaBlend, I was out of luck for a while. GetDIBits wasn't working for me so I otherwise had to abandon that approach. Then, while lying in bed, a eureka moment came. No, it's not StretchBlt, AlphaBlend, or any of that other stuff that has the output get written into video memory. It's also not a preexisting replacement to StretchBlt and the like. It's, instead, done manually.

So, done manually means that I upgraded my system so that it had 96 GB of RAM right? Nope. Write to the hard disk instead? Although writing to the hard disk is done (it's required), it's only 42 KB at the most (per layer), tiny. So, how am I able to do it manually? That's the eureka moment - a credits system, of which works much like weights. Take an 87:64 scale down ratio. I start with 87 credits first thing. Each pixel uses 64 credits. The first pixel from the source image uses all 64 possible credits leaving 23 remaining. This 23 leftover is used toward the next pixel. This gives a 64:23 ratio for the color averaging. On the next round, 87 credits are available again. Since 23 were used out of the second pixel's 64, 41 credits remain for it leaving 46 available credits. 46 isn't a full pixel's worth so it stops on the third pixel using a 41:46 ratio for the color averaging. With 18 left on the third pixel, they all get used up. However, I'm left with 69 credits at this point, more than a full pixel's worth. In that case, the entire fourth pixel is done, leaving 5 credits left over for the fifth pixel. This is an 18:64:5 ratio for color averaging. This pattern continues until the end of the row (or column when doing it vertically).

This video has 3 parts to it. The first explains the basics of the system I thought of from that eureka moment while also showing the code (were you fooled at first?). Near the end, I attempt to run the program, but I encountered a class 7 bug (one that can potentially be class 8, of which I encountered in a graphing calculator long ago that causes me to no longer be able to use it). An "unhandled exception" error occurs when you attempt to change a value in memory that your program does not have the rights to. For example, defining "unsigned char Data[10]" means you can modify "Data[8]" or "Data[0]" just fine, but, if you modify "Data[15]", chances are, you'll get that "unhandled exception" error. Reading it, from doing "Test = 36+Data[15]" is fine though, but you'll get unexpected results in the calculation.

Part 2 is where I show how I use the automation program. This includes creating the base textures themselves (the dirt texture needs a redo, so it has less saturation and also a little brighter). Normal textures are demonstrated first, followed by an example for water textures. Water textures have multiple base images (except the stormy and blizzard varieties). The reason for that is for both accuracy and making tiling less apparent.

Part 3 is where the results are shown in the game engine. This took nearly a whole day to do as I had several bugs to fix. Being so late in development for changing these backend things, it took nearly 4 hours alone just to change everything around as needed, while also fixing any bugs this change introduced. It's a good reason to avoid making these kinds of changes so late in development. It's also why I'm finalizing a lot of things. At least the texture itself can be changed without any consequences, provided that the sizes and things remain unchanged. I also had array overflow so I had to change some of the array sizes around to prevent that. One bug in Nodera Ice Shelf took nearly 3 hours to fix as it took that long to just to find the cause. Once I fixed all the bugs, I was truly amazed at how the 3D effects improved for the ground. They won't get any better than this, but they're so good that it's nearly impossible to see the individual channels like I could with the 12-channel system.

Category:

People & Blogs

Tags:

License:

Standard YouTube License

  • likes, 6 dislikes

Link to this comment:

Share to:

Uploader Comments (ulillillia)

  • WOW this looks good. i'd like to place a pre-order for $15 please.

  • I don't know what a preorder is, but no one will be able to play it until public betas are released (and at first, only for the demo). No public beta will be released any time soon though - I've got a long way to go before I'm done, a a whole year even. Once the full version is released, the price will be something from $24.95 to $40 for 95% certainty. $34.95 is where the peak is (most likely) though these may change.

  • Great job Uli! The backgrounds are fantastic, however the animations for the character could use some work for smoother transition between rolling/flying/walking/running­.

    Also, have you considered going into game design and working as a professional developer?

  • Updates to the character are needed as there are several omissions. It's just low on my priorities list right now.

  • Very impressive work!

  • Lake Keveran is a good candidate for including in the demo - beautiful and it has water. I'm working on Carnivalesta now - 7 of 10 layers of hills done and the 3 previously available barker and food stands have been redone (slightly, outside a few things).

see all

All Comments (35)

Sign In or Sign Up now to post a comment!
  • I look forward to playing this game someday.  Hurry! haha

  • This video brings back memories of "A Boy and his Blob", only it doesn't take place at night or in the sewers. Good job with the video BTW.

  • Your game looks beautiful and a ton of fun, I can't wait to try it out.

  • Amazing!

  • Man, this guy puts my own mental problems into perspective, thank FSM for the internet!

  • Uli, did you make the music that was playing in the background. If so, can I get a copy of the file so I can listen to it on repeat for days? If not, who made it?

  • someone will never get laid lol

Loading...

Alert icon
0 / 00Unsaved Playlist Return to active list
    1. Your queue is empty. Add videos to your queue using this button:
      or sign in to load a different list.
    Loading...Loading...Saving...
    • Clear all videos from this list
    • Learn more