Page 4 of 25 FirstFirst 12345678914 ... LastLast
Results 31 to 40 of 247

Thread: My Summer Project

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

    Default Re: My Summer Project

    Then today I realized I was relying on garbage collection far too much and realizing it wasn't collecting things as quickly/efficiently as I had liked, but most of that was my fault.

    The way I was generating the world was creating far too many objects that weren't being used after the world was generated. I was seeing memory use easily climb towards 1.5GB on world creation. When you loaded a saved world the memory would be about 512MB, which is closer to what I wanted, but generation would climb far too high. I swapped my unnecessary cloned objects to references to the base objects and world generation sticks at the same ~512MB the game uses to run.

    I only noticed this because I realized that I had put my save on a separate thread, so I thought, "Hey, seeing as how it is on it's own thread, and saving takes a while, why not make a copy of the world, and let the player keep playing while it's saving". While good in theory, making a copy of the world was doubling the memory use, and would freak out lower memory systems, especially on the larger world size (it would push something like 3GB of memory, not to mention this is a 32-bit app so it would freak on any system after 2GB of usage).

    With the smaller map size, which is still quite large, and getting rid of unnecessary objects I've kept the memory usage down to appropriate levels. Now I can go back to focusing on gameplay elements.

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

    Default Re: My Summer Project

    Sounds great.

    I'm stuck with an eventing issue in a major point in the demo. Oh well, program mo4r tomorrow.
    Project:Mithril, sponsored by Petra's Tech Shop and Sidewinder Computers-MOTM Nominee October '08




  3. #33
    Resident 100HP water-cannon operator SXRguyinMA's Avatar
    Join Date
    Jun 2008
    Location
    MA
    Posts
    5,865

    Default Re: My Summer Project

    wow man this things coming along nice

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

    Default Re: My Summer Project

    Quote Originally Posted by Kayin View Post
    Sounds great.
    I'm stuck with an eventing issue in a major point in the demo. Oh well, program mo4r tomorrow.
    I hear ya. I haven't decided how I am going to handle story/events/etc yet. There's always more to program, and I'll be right back at it tomorrow. Haven't decided what I'm going to focus on yet. I've fixed the anomalies in the map generation by reworking that set of algorithms, so it's on to something new this week.

    Quote Originally Posted by SXRguyinMA View Post
    wow man this things coming along nice
    Thanks. I still have so many things on my list to do yet. I keep getting caught up refactoring things, or finding bugs to fix. I'm glad I found that memory issue sooner than later though.

    Maybe tomorrow I will add player health and damage. I'll start with falling damage and breath/drowning damage. Then I'll have to deal with where to put the player when you die. I'll probably go back to the original spawn point for now, then build a spawn change system later. Once I get player damage in then I can add enemies. Get a basic enemy AI in. Start with bumping damage, then I can add attack animations for both the enemy and the player. Then attack hit-boxes. Melee, then projectiles. Attack damage. Then I'll have basic player enemy health and attacks/damage. Then you've got to deal with when to spawn the enemies, how many to spawn, make sure they spawn off the players screen so they don't just pop in, etc.

    I find it fun how one thought or adding one basic feature involves or trickles towards so many other little things. Looks like I'll have a busy week.

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

    Default Re: My Summer Project

    If it's any consolation, you don't have to show yours off this weekend.
    Project:Mithril, sponsored by Petra's Tech Shop and Sidewinder Computers-MOTM Nominee October '08




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

    Default Re: My Summer Project

    Ouch. Yeah, I'm still in the very early stages so I don't have any obligations to anyone, yet. Lol.

    Sometimes I wish I had started with an existing engine. To have a base to build up from. I figured starting with nothing and coding everything would look better on my resume, but both are so bloody hard. Well the coding isn't hard for me, it's getting all these various systems working and jiving well together and figuring out where to go next.

    I've still got to go back and add like a days worth of comments. When I'm on a roll, but know I'll probably scrap a lot of the code later, I don't like to waste time being really specific with my comments. If it was a group project I would. I've already gone over some old code I didn't think I would keep and looked at it like "wtf does that do?". But then again I've done that and been pleasantly surprised at some of the solutions I've come up with.

    I can't wait to see your final product. You've been working on it and putting so much energy into it, especially with everything else going on. I can only hope I get it to a point where I have someone to show mine off to. You are an inspiration. My best wishes to you, your family, and your project.

  7. #37
    rawrnomnom diluzio91's Avatar
    Join Date
    Jan 2010
    Posts
    2,471

    Default Re: My Summer Project

    Sounds cool! when does the pre alpha tbcs exclusive testing start?
    Not dead yet

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

    Default Re: My Summer Project

    Quote Originally Posted by diluzio91 View Post
    Sounds cool! when does the pre alpha tbcs exclusive testing start?
    I'm not sure. It's still very early on. Sometime along when it is more than a random world generator with mining/block laying. You can lay blocks that you've gotten from your inventory that are in your hotbar, but there isn't a way yet to move blocks from the inner inventory to the hotbar, lol. That is pretty simple, but I haven't coded it in yet as I haven't decided on the UI positions yet.

    When it is more developed then I'll think about releasing a alpha/beta. I lost a day of work on it today, and half a day tomorrow, so I'll have some major cramming coming this week.

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

    Default Re: My Summer Project

    I've added the health, mana, breath (air), and experience base types.

    Worked a bit on the UI. Just keeping things simple for now. I'll go back and do something fancier if I chose to do so later. Went with more traditional type bars instead of going the Minecraft/Terraria hearts/icons route.

    The images show the 32x32 pixel blocks vs. the old 16 x 16 ones. I didn't want it to look the same as Terraria and the increased block size helps me not have to increase the details to look decent. Textures are still temporary, just made them look kinda graph paper-like for now.

    I tried to smooth the curves but in doing so made it all look too bubbly. Will have to make things less round.
    I haven't repositioned / chosen a contrasting color for the item quantity yet.

    Just HotBar:

    I've put a visual representation of the percent, but also an actual number there.

    Inventory Open:


    I've come up with the different regions, or at least some of them.

    Code:
    Where the player starts is the traditional spawn: hills, grass, etc.
    The two layers below are the traditional dirt and stone layers.
    
    Then the surface has a huge mountain region to one side and a snow land are to the other.
    
    In the dirt layer to one side is an underground plague/poison swamp, and the other side of the map is an underground/buried desert.
    
    In the stone layer to one side is a petrified forest, with stone monsters, golems, etc. The other side in the stone layer hasn't been determined.
    
    In the underworld layer in the center is the typical fire/hell realm. There is a stone fissure separating that from the underwater city to one side. I was thinking like Atlantis / the buried ancient cities they unearth underground.
    
    The other side of the underworld hasn't been determined. Above the spawn to the 2/3 of map not taken by the huge mountain are floating islands / land masses that make up the air realm.
    
    Dungeons with corresponding themes will be hidden within each region.
    Something like: (==== is the base surface point)

    | AIR----------- AIR -------- MOUNTAIN----------|
    | SNOW---------SPAWN ---- MOUNTAIN----------|
    =======================================
    | SWAMP------- DIRT------- DESERT--------------|
    | ?------------- STONE----- PETRIFIED FOREST---|
    | WATER CITY---HELL ------- ?-------------------|

    I haven't figured out the order of progression or how to lead the player in that direction yet.

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

    Default Re: My Summer Project

    Spent some time playing around making a different character sprite. Was going for an adventurer look. Based off one of my old Legos.



    No matter how I draw it, it's going to look similar to Terraria based on having similar size and using 2x2 pixels. Nature of the beast I suppose.

    Threw that together really fast, so it still needs lots of work. I just wanted to play around with some art for a bit today.

Posting Permissions

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