• About
  • Gallery of Images
  • Archives
  • Categories
  •   LowRezJam – Report 7

    9/05/14 - 21:45

    Ambush

    An ambush! scareh!  Well not really, as harvesters still don’t take damage.  Tonight has been spent mostly re-factoring some of the movement routines so they are not entity specific but are more generic in nature ( so all the entities can re-use the same movement codes).  So no real graphical progress to show, so I thought I’d add these guys in.  They seek harvesters around them, and move toward them.  When they are in range ( 15 pixels at the moment ) they open fire.  Not quite happy with the animation of them, I may change them to 2 frames of animation instead of 3, as the third frame tends to look a bit silly.  Projectile is also very much a work in progress.

    Trooper style sheet

    I’m sure I’ll get round to tweaking them at some point 🙂

     

    An army approaches!

    The troopers currently seek  harvesters over the entire game world, which isn’t as much of a process hit than I thought it would be, but that will be changing soon anway.  You’ll notice in the clips above the health bar is pretty borked at the moment.  Bullets causing damage to entities is WIP as well.  So the plans over the weekend are to finally start causing some damage to harvesters 🙂  Current loose ends at the moment that need work on are :

    • Fix health bar of harvester
    • Give the worm that hides in the sand an attack
    • Make the worm that lurks in the sand look more worm like
    • Have bullets cause damage
    • Have the harvester be able to defend itself against troopers ( any guesses how? )
    • Have harvesters explode

     

     

    lamentconfig
    Share

      LowRezJam – Report 6

    8/05/14 - 20:41

    Something lurking under the sand ...

    So, those pesky harvesters have had an easy time.  They mine, they can’t get damaged as nothing in the game does damage.  So I decided that tonight’s dev time would be dedicated to ending their serene existence.  There is something monstrous lurking under the sands – sensitive to the vibrations the harvester make when they are harvesting the orange from the sand.  It moves swiftly and quietly through the desert, the only sign of its passing is trickling cascade of sand on the surface.  It will approach a harvester, biding it’s time, and then, without warning :

    It will attack !

     

     

     

    Actually, no it won’t at the moment, as I ran out of dev time tonight – d’oh.  So those harvesters are spared for another day.  This is a giant worm that lurks under the sand.  Actually, this is one of the smaller ones, it will just slam into the side of harvesters and cause them damage.  Enough attacks will eventually destroy a harvester, causing it to spill it’s stored load all over the desert sands.  The larger ones will have a slightly more interesting attack.  This attack will be a lot more fatal 😉

    I tried several ways to get the worm moving and looking worm like.  Originally I had each of the sections following the other ones center point and ignored collisions.  Which was fine as long as the worm went in a straight line, but if it decided to go back on itself, all the sections of the worm would end up traveling as one – which just looked pretty lame.  I tried turning collisions on each section of the worm, and that ended up with bits of worm being randomly teleported all over the map, which again wasn’t much help – and wasn’t as amusing to watch as I just made it sound.

    In the end I went with giving each section of the worm a movement history.  When head of the worm is spawned it records it’s position in its history log and then moves.  Every time the head moves, an entry is created detailing its location in the history log.  After it has moved once, it spawns a body section, and tells this body section to use the heads movement history to determine it’s path.  The body section records its position and moves to the first point in the heads movement history.

    Now the head spawns a second body section at the point where it was first spawned, and moves one step recording its route.  It tells this body section to follow the first body section.  All the body sections are instances of the same entity, so all the above happens to both body sections.  A third body section is spawned and told to follow the second.  And volia, after a few more frames, you have a nice worm living in the sand.

    Not quite sure I’m 100% happy with the looks of it, diagonal movement looks a bit dorky, I may smooth that our some what, so it is less apparent its just a bunch of moving squares.

    lamentconfig
    Share

      LowRezJam – Report 5

    7/05/14 - 23:12

    Search Mode Pathfindingg

    After many tears and screaming at harvesters doing idiotic things, I’ve got the search mode working.  Harvesters will now look for material to mine.  If they are near mineable material, they will move toward it and if there is nothing tasty to harvest around it, they do a long range scan ( indicated by a green flashing eye icon ).  This long range scan will take four seconds to do, and once complete the harvester will start to move toward anything they have found within their search range.  There are still a few tweaks I want to do to this system.  For instance : harvesters don’t share destinations and if they both decide that they want to head to the same pixel of harvestable material, they will constantly ram into each other trying to get to it.  Hilarious to watch, but buggy looking alas.

    The search range is determined by a variable within the harvester instance – this variable is something I want the player to be able to change at some point.  Currently the radius is about quarter of the screen, but the idea would be that as you trained up the harvester’s crews experience, they would look further and further afield – eventually locating off screen resources.

    The harvester actually performs two searches: one is a short range ( just around the harvester ) which has no time sink associated with it and then the second green icon long range search, which has the four second time associated with it.  The short range search is designed so that the harvester keeps mining the patch of material it is currently on.  I’ve added some debug code to the following gif just to give you an idea of the searches and when they happen :

     

    search_mode_dubug

     

    The dark puce square indicates a short range search, the dark blue indicates a long range search.  So the events in this gif are :

    • A harvester is spawned and does a short range search, it finds nothing and then does a long range search, it finds nothing again and a mouse click tells it to move to a new position.  The green icon indicates the search is happening gameplay wise, but the search doesn’t happen until after four seconds, hence the blue square appearing after the movement.
    • A short range search of same harvester, finding nothing ( just ) – then a long range search to find more.
    • A second harvester is spawned and does lots of short range searches and as it is surrounded by harvestable material it never needs to do a long range search.
    • The third spawned harvester does some short range searches, then gets sent to another location – harvesters don’t search while directly ordered to move by the player.  It does a short range search when it arrives at the waypoint and finds some more stuff to harvest.
    • Then back to the second harvester, showing it turning the field to dark puce 🙂

    Once I had battled with the searching, I decided to do something pointless and sand being expelled from the back of the harvester while it is mining.  The idea being that the orange harvestable material is mixed in with the sand, so the harvester sucks it all up, grabs the orange and shoots out the sand.  It has no game play use whatsoever, but I think it helps it look a bit more interesting.

    And dark puce is a colour before you complain 😛

     

     

    lamentconfig
    Share

      LowRezJam – Report 4

    6/05/14 - 22:39

    Mouse Control

    [This will take a while to load, but worth it]

    So this evening has been filled with the delights of path finding and forcing pixels to remain on the grid.  The player now directly controls the harvesters, left clicking to select them ( which causes an indicator to appear above it ) and then right clicking to select a new destination for the harvester to move to.   Only one harvester can be selected at the time ( at the moment, multi-select is a stretch feature I want to work on, but not sure I’ll have time to fit it in with everything else planned ).   Once right clicked, the harvester will move to the clicked on location, harvesting any material it finds on it’s way.

    Right click now sells the material collected and now the harvesters have bigger tanks ( 5000 units compared to 100 units ) its quite easy to click on a far away location and let the harvester take a long stroll to it, knowing it will strip mine on it’s way.

    I’m mid-way through coding a ‘search’ mode for the harvester, which means that if the harvester is not moving, it will search the area around it for material to mine, and if it finds it, it will automagically go and harvest what it can find.  Later on the range of this search will be determined by other factors and possibly by other entities, dependent on time left 🙂

    Currently the selection cross-hair alternates between a low alpha cover and full bright alpha – I’m not sure if it looks better with a full bright and no frame – so it just flashes.  I’ll have to experiment with that.  Oh, and bonus pointless feature :  harvesters now have a shadow 🙂  The sprite sheet for the harvester has got a crazy ( for a sprite sheet I’ve made ) number of frames in it.  Easily the biggest one I’ve constructed so far ( in frames, not in size 😉 ) :

    Constantly growing havester sprite sheet

    lamentconfig
    Share

      LowRezJam – Report 3

    5/05/14 - 17:48

    Selling harvested material

    A very productive bank holiday Monday.  The first thing that will strike you about the image is the new terrain colours.  Gone are the bright yellow sands and dark red splotches dotting the dunes.  I’ve added a more subtle gradient now, and tweaked the turbulence of the terrain generation which gives much more interesting looking levels, which definitely seem a lot more realistic than before 🙂  I’ve also improved the harvester sprite, and added some highlights, and made the tracks seem more dirty.  Or at least that was what  I was going for 🙂

    I’ve also addressed one of the issues I was most worried about – displaying the amount of money you had, as well as other stats.  I’ve implemented a slide on system, that when you press certain keys, a menu item slides on from the bottom of the screen.  There are two menus currently, the funds menu and a debug menu.  The game now does have some playable aspect to it, rather than just randomly spawning in harvesters and scrolling around the world.  The player starts with 1000 undetermined currency points.  Spawning in a harvester costs 250 of these.  For now, I’ve created a very simple ( and not final ) way of gaining funds.  By clicking on a harvester, it stops harvesting and sells what is in its tank.  This is then added to your funds.

    The debug screen is nothing special at the moment, but its something I need for testing :

    Debug screen

    As you can see, its fairly straight forward: an FPS counter and the number of harvesters spawned in the world.  I wanted to do this because I can imagine the game having a lot of harvesters and wanted to build something which would let me stress test the code.  Though the harvesters are very simple at the moment ( they move randomly and just harvest when material is under them ) – it will allow me to judge the performance changes when I add more sophisticated code to them.

    I was pretty impressed by that 🙂 but it bares little resemblance with the future as I doubt anyone will ever spawn that many harvesters 🙂 The harvesters are spawned with a single keypress all around the 2000×2000 world. Was pretty happy with the framerate there, especially as no optimizations have been done.

    Still a very large to-do list, but pretty happy with the way things are going so far 🙂

    lamentconfig
    Share