Platformer Update 9 – Bot Escape

Well I’m back from vacation, but I’m apparently still running on vacation time. The good news is I did some coding over vacation, which means we finally have some screen shots. Woot!

I’ve been using the working title BotEscape for this project for a few months since one of the original thoughts for this project was that you’re a robot escaping from your alien overlords, a crumbling factory or some combination of the two. As you can tell from that detailed description, I haven’t developed a storyline yet, so the current “levels” are just piling all the pieces together to make sure the interactions are working correctly. I haven’t checked to see if this name overlaps with any existing properties so I’m just going to run with it for now. It might get changed later if it looks like it poses a conflict with existing works.

There are three main tasks that need to be completed before I put up a demo of sorts:

  • Menu screens
  • A health system (read: a way to leave you a twisted pile of scrap metal)
  • A couple of levels that have some thought in them and aren’t just piles of clutter.

So over the next few weeks I’ll be working on these and any thing else that comes up to get a demo ready.

“New” Soundcloud account

I was definitely right about being swamped with other projects last week and it looks like this week too.

So rather than having a proper update, I’m just going to post a link to Sarcastibots “new” sound cloud account that was just set up 5 months ago.

So far we’ve uploaded a preliminary theme for Malwrath which maybe handy if we ever go back to that project.

Platformer Update 8

And another slow week although for different reasons. Last week I discovered Wang Tiles and remembered that aperodic tiling is a thing. So instead of working on adding features. I spent time figuring out how to implement Wang Tiles.

I’ll discuss aperiodic tiling and Wang Tiles next week, since this is going to be another slow week due not to me being distracted by a new shiny but because of life.

Platformer Update 7

It’s definitely been a slower week. Mostly I’ve been working on the animation for breakable crates. I tried a couple out and have settled on this one for the time being.

Not exactly sure what’s going on with the crenelations at the top of the box, but those were the shapes I got when I subdivided the original crate. Fun fact since it’s animated I can use lower resolution images and still not have it look terrible; so that little *.gif is pixel for pixel the final size.

Beyond the crate I made a number of other fixes to the working graphics for the player and the HUD.

Platformer Update 5

This week I created a bug/feature list to better keep track of issues and what I wanted to do. And the list says that this week missile rate of fire was limited, explosion rendering was fixed, the player’s physics body was updated, jumping was converted jumpjets rather than legs, the player can now be controlled using an x-box controller, and work was started on a HUD. That sounds like progress to me! w00t!

Platformer Update 4

This week’s accomplishments are mostly of the bug crushing variety. I reduced the likelihood that the ‘no more jumping for you error’ occurs. I’m not convinced it’s completely resolved. What exactly is this error you ask, well let’s start with a screen shot (finally) of physics body debug render. The player is represented by the small square on top of the circle on the bottom about 1/3 of the way in from the left side.

Since jumping is conditional on having something to jump off of at present, the circle fixture checks to see if it has contact points near it’s bottom. if yes then jumping is allowed if not no jumping for you. At various times during testing the player stopped responding to jump commands while appearing to be grounded visibly and with in a few thousandths when the numbers were reported. The cause of this phenomenon is it seems that when Box2D contacts are reported to a libgdx box2d contact listener only the most recent contact point is retained.  So if the player is contacted from the side, by let’s say a box propelled by an explosion, the circle would record a side contact and decide it was hovering making jumping impossible. The solution I used was to shrink the size of the circle ever so slightly, so that the box now projects out past the sides of the circle slightly. This has eliminated current instances of this issue, but I’m not convinced all cases have been eliminated.

In other news Rho_Bot stopped by long enough to find a problem with the explosion system. Basically too many explosions (to put a number to “too many” somewhere 3-4 range) in rapid succession caused the program to hang while the physics calculations were completed. This was solved by limiting rocket ROF which was planned anyway.

Platformer Update 3

I’m beginning to remember why I didn’t want to do a status update post every week when we started this website.

It’s that what gets accomplished in one week tends to be easily summarized in a few words. For example this week I got projectiles working completely and explosions working partially (unless being able to walk on compressed air waves is a feature in which case explosions are done), and while someone who does game development would think that’s a reasonably productive week when combined with bug crushing. Those of you who are not developers are likely thinking, ‘that doesn’t sound like much. Why didn’t he do more? And where are the screenshots.’

Well the screenshots are coming … eventually. I could post some box2D debug renders, but that’s just a bunch of rectangles outlined with different colors. Ahh the days when someone around here did artwork.

Speaking of Box2D I’ve got more things to say about it. Some good some bad.

The Good

I used Box2D to implement the explosion. I think it is fantastic and reasonably straight forward now that I’ve done it once.

The Bad

Things get stuck at the seams of butted objects; not always but often enough to be annoying. This is a known issue and is supposedly being worked on. Currently suggested is don’t place objects contiguously. This means that loading a world tile by tile is a no go.

On first implementations of things I frequently pass bad data or make inappropriate calls to the Box2D world. This is a normal part of the development process however since I’m developing on java and Box2D runs in native libraries I get lovely unhelpful error messages like.

Process finished with exit code 255 (Box2D, java, libgdx)

Which I got when I tried to add a new object while the world was stepping.

And

EXCEPTION_ACCESS_VIOLATION (0xc0000005), AL lib: (EE) alc_cleanup: 1 device not closed – (Box2D, java, libgdx)

[Update] which was caused by attempting to address(dispose of) a body that had been disposed of.

I also had an equally unhelpful error when I disposed of a shape before instantiating a fixture based on that shape. I’m too lazy to reproduce this error so no console capture for that one.

Since these crashes happen in native code that means that lost objects aren’t cleaned by the java garbage collector, and it’s entirely possible they sit around causing a memory leak. yay. Oh wait that other thing, booo.

Platformer Update 2

Last week I mentioned screenshots for the platformer, and everyone here to see those will be disappointed, because instead of spending time adding content and updating graphics I decided to reorganize how level data is organized. Why exactly did I do this?

Because I could.

Also levels were defined in a combination of *.xml and *.json and I wanted to standardize it a bit. Now all level data is stored in a single *.json file. I also wanted to move level loading instructions into their own class. Previously level’s loaded themselves; however, the level class was getting long and moving the loading functionality seemed to be a logical way to split up the class.

So not  a very exciting week when viewed from the easily demonstrated progress dimension, but streamlining level files and improving class compartmentalization should make things smoother going forward.

Short term plans

Contrary to all appearances. Since starting my new job I do have a substantial amount of time work on games. I’ve just been doing other things.

Currently I’ve decided to let Malwrath stay on hiatus, and work on something new over the next couple of months. I have three reasons for doing this

  1. I’m out of practice reading and writing code. And since it’s always easier to start at the beginning than remember what’s going on in the middle. new project!
  2. I wanted to experiment with level loading which is something that will be necessary for Malwrath.
  3. I wanted to experiment with Box2d since it popped up on the list of libgdx options. And the idea of using a complete physics engine sounded neat.

So I’ve set about making a platformer (what better way to try out  a physics engine?) about a small robot who jumps over aliens who are on fire.

I’ve been working on this for a couple of weeks and what have I learned so far. Maybe Box2d is not the best back end for a platformer. To start with this guy at GDC points out that jumping in platformers rarely if ever follows a consistent physical model. There are also some other articles around the web discussing other issues with using physics engines modeled on the real world as back ends for platformers. Frequently sighted is how to implement platforms that move without having them fall. Box2d, fortunately, has a work around for this by having an object (body) type that doesn’t respond to external forces.  However after implementing all this I have a new issue which is the player sprite/physics object doesn’t want to stay on or ride platforms that move horizontally. And the solutions I’ve read for that all seem kind of kludgey.

 

There is no name yet, and maybe we’ll have some screenshots next week.

Starting Malwrath’s Tower

Since we dropped no hints about a new project last week, and we’re not serial developers you’ll be shocked, SHOCKED! to learn that we’re starting a new project. In slightly surprising news this will not be a space/scifi themed game. This time we’re working on a fantasy RPG called

Task 0) do something with that 'M"
Task 0) do something with that ‘M”

Malwrath’s Tower is currently a hack and slash heavy and story light invade the evil wizard’s tower take his stuff and kill him style game, but with roughly nine months of development time in front of us we’ll see where it goes. We’re hoping the engine will be flexible enough that we can use it for a couple of future games too.

And now the moment everyone has been waiting for the schedule update. We’re currently looking at a Q1 2017 launch. Why is it going to take so long? 0) this project is big we’ve got engine + graphics + levels that need to be done. 1) we all have day jobs so we can’t put that many hours into this every day.

red and blue lines are now 95% and 5% completion chance respectively
red and blue lines are now 95% and 5% completion chance respectively