Page 6 of 25 FirstFirst 123456789101116 ... LastLast
Results 51 to 60 of 247

Thread: My Summer Project

  1. #51
    Code Monkey NightrainSrt4's Avatar
    Join Date
    Jun 2007
    Location
    Your cookie jar
    Posts
    2,679

    Default Re: My Summer Project

    I rewrote my code so I could have colored lights. The problem with the way I have done this here is that you pretty much need a DX10 card as I've had to use the Hi-Def profile vs. the Reach profile. The game runs in DX9, but the functions I'm using for manipulating the color channels differently than the alpha channels weren't exposed by many, if any, DX9 cards. DX10 cards expose these functions by default.

    Anywho,

    Some work from this morning.


    *Torches are an item that can be placed as a block.
    *Torches give off orange-yellow light.
    *Any block has the ability to give off light, and soon any item.
    *Fixed a bug with the water where I was checking if a block was solid and not if it wasn't air or liquid. This was causing the torches to spawn water on spawn.

    I'll quickly texture the torches and check adjacency to a solid block so they will stand/hang from the blocks nearest them instead of standing straight up when they aren't placed on the ground.

    After that comes day/night cycles with basic overhanging shadows.

  2. #52
    Code Monkey NightrainSrt4's Avatar
    Join Date
    Jun 2007
    Location
    Your cookie jar
    Posts
    2,679

    Default Re: My Summer Project

    Testing the addition of day/night cycle and lighting transitions.

    Sped up for testing. The time periods also won't be the same length like what is shown here. Day and night will be longer, with the transition periods a shorter amount of time.



    Pulled my back, so I've been laying in bed on my laptop. Not having multiple monitors and lots of workspace is a pain.

    EDIT: And some images from earlier going through the process of getting the day time shadow / dark areas added.


    Just starting. Anything under the first solid layer was shaded.


    Pulling the left and right sides in too, but leaving overhang shadows.


    Taking the overhanging shadows out.


    Adding some depth dependent shadows, and realizing there were some bugs and anomalies.



    Attempting to shade the depth at the dirt wall level, with some horrible bugs.



    And getting closer with the depth shadows on blocks, and depth shadows going down a tunnel into the dirt layer. You'll need lights to see anything any deeper.

  3. #53
    Code Monkey NightrainSrt4's Avatar
    Join Date
    Jun 2007
    Location
    Your cookie jar
    Posts
    2,679

    Default Re: My Summer Project

    I've added ladders and bumpers/blowers this morning. The original concept was for the bumpers to be air blowers / fans, but my first implementation turned out to be more like a bumper from Sonic than an air blower. Really cool though.



    I thought the bumpers would be an interesting idea to implement, something that I don't believe Minecraft or Terraria have.

  4. #54
    Code Monkey NightrainSrt4's Avatar
    Join Date
    Jun 2007
    Location
    Your cookie jar
    Posts
    2,679

    Default Re: My Summer Project

    I realized what the bumpers could be used for last night as I fell asleep. Tested my thoughts today, giggling while I did so.



    The ladder shouldn't be catching your fall. I thought I wanted it to when I thought about easily getting onto ladders when you are jumping onto an existing set, but they can be exploited like so.

    Well, actually, what isn't shown in the video is that if you climbed down the ladder and touched the ground you would have died. You can stop that though by jumping again, which once you reach that conversion from negative velocity to positive velocity it resets the fall distance. I want you to be able to catch the ladder in a jump or fall, I just don't want you to be able to exploit them as tools to fall long distances. If I treat them like ground, so you can catch if you only fall a little, but die if you try and catch after a huge fall, that might fix the issue.

    Super fun though making bumper elevators, hehe. And it alleviates part of the problem other games have of getting back up to the surface quickly.

  5. #55
    One Eye, Sixteen Cores. Kayin's Avatar
    Join Date
    Jun 2009
    Location
    Birmingham, AL
    Posts
    1,921

    Default Re: My Summer Project

    The artifacts look like PNG transparencies not set properly. Or at least, that's how it shows up in my game.

    Still impressive.
    Project:Mithril, sponsored by Petra's Tech Shop and Sidewinder Computers-MOTM Nominee October '08




  6. #56
    Code Monkey NightrainSrt4's Avatar
    Join Date
    Jun 2007
    Location
    Your cookie jar
    Posts
    2,679

    Default Re: My Summer Project

    I'm not sure as to which part you are referring, but there are a lot of problems with the transparencies, mostly because they are all 30 second paint.net textures. I haven't taken the time to put polish on anything yet. I've also just set random transparency levels and not taken the time to do the math to calculate what I need based on what I want. In the end I will probably ditch this for a shader approach anyway.

    I had a funny feeling earlier when I realized I only have but a few more base features to get in before it's time for content and polish. Most notably attack animations, crafting, etc. Once that process starts it goes from being a game engine / proof of concept to being an actual game.

  7. #57
    One Eye, Sixteen Cores. Kayin's Avatar
    Join Date
    Jun 2009
    Location
    Birmingham, AL
    Posts
    1,921

    Default Re: My Summer Project

    All right, I know what you're using now. We're using two vastly different ways to do the same thing.

    Looks great, though! I KNOW how much work this is, you're doing a great job!
    Project:Mithril, sponsored by Petra's Tech Shop and Sidewinder Computers-MOTM Nominee October '08




  8. #58
    Code Monkey NightrainSrt4's Avatar
    Join Date
    Jun 2007
    Location
    Your cookie jar
    Posts
    2,679

    Default Re: My Summer Project

    Ya, the way I approached the dark/lighting is probably completely odd, but I wanted to do it based off what I knew how to do without looking at any guides or tutorials. I probably should have, but I wanted to see what kind of results I could get just by what I could do. Before this game project I had never handled anything involving graphics so I'm starting from the bottom, lol.

    My approach for the lighting and darkness was to start with a clear render target.

    Then I draw all the lights to the clear render target by using a max blend. Because of the way I'm handling it later I can't use additive or else when two lights overlap even just a little they make a pure light. So here when two lights overlap it chooses whichever pixel is the brightest. Because I am using (0, 0, 0, x) for the lights, I use another circular texture the same size, but with (255(x), 255(x), 255(x), 0) that I add the desired color value to, which gives the lights the appearance of casting a bit of color at the edges. I swapped to a bigger light to test the torches range, and instead of remaking the texture I up-scaled the one I had which made for odd blending compared to the older smaller lights.

    Then I draw the darkness to a separate render target. I think I could recycle the original render target simply by saving it to a different texture then clearing it, but I haven't tested that yet. Each block gets assigned a darkness level based on the blocks around it. It runs through and reassigns a value to blocks when you mine something out or add a new block to calculate what the shadows should be. This value is based on high noon, and if the time of day needs a darker level it gets the darkness level and adds whatever modifier the time of day calls for.

    Now with a texture of the darkness, and one of the lights, I use an odd blending to combine these. I add the color values of the light to the darkness texture, but subtract/reverse subtract the alpha values. What I end up with is the darkness where its needed and the colored circular lights where those are supposed to be, giving off the thinly veiled illusion of light. Then I just draw this over the scene.

    The handling the color values differently than the alpha values is the reason as of right now the game needs a DX10 video card. Eventually this will be remedied, otherwise I'm knocking out some 48% of the market or something who only have DX9 cards.

    Really I just looked at what I had available and tinkered till I got something that remotely worked. While cool I figured it out on my own, an existing proven approach would probably yield better results. I'm sure if I researched how the different blends worked I could find a way to do it without needing the odd blending.

  9. #59
    Code Monkey NightrainSrt4's Avatar
    Join Date
    Jun 2007
    Location
    Your cookie jar
    Posts
    2,679

    Default Re: My Summer Project

    My cohorts and I are discussing a Diablo or Action RPG style drop / item / stat / exp system.

    It's been in our thoughts for a while and I have some references to it already in my code, just haven't gone all in yet. I was trying to figure out how to do crafting, but I think I have an idea.

    Tomorrow should be interesting.

  10. #60
    Code Monkey NightrainSrt4's Avatar
    Join Date
    Jun 2007
    Location
    Your cookie jar
    Posts
    2,679

    Default Re: My Summer Project

    I've got the design and pseudocode written for the random drop system. This turned out far more complicated than I thought it was going to be.

    It's going to be very similar to Diablo style games. I think this will add a whole lot of variety the other games are lacking. Every time you play you get the same iron sword.

    What if you could get the same iron sword with a chance to have random enchantments as well? Perhaps not every iron sword is made equally. Perhaps some have stats that fit you a bit better if you are a caster type player, or if you are a ranged type player. You won't know until you try to make one, or maybe a mob will drop it.

    What if you could have a choice to move on to a new world where everything is scaled? Monsters get stronger, item drops have increased stats to slightly compensate. Maybe some monsters drop entirely new things that you couldn't get the first time around, like a unique weapon or piece of armor.

    All things I will be working towards adding tomorrow. I had to get the design and pseudo done as trying to figure out these algorithms was starting to make my head hurt, lmfao.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •