My failed Ludum Dare attempt

0 favourites
  • 8 posts
  • Hey all, I tried to get a game done by myself for Ludum Dare, but half way through day 2 I found a rabbit hole of bugs (lesson learnt: don't rush when in a hurry!).

    Anyway I cleaned out most of the major bugs today, so you can have a look at what I managed to get done in a few days :)

    Play online in browser (fullscreen button in the bottom right): tobye.itch.io/ld-keep-it-alive-attempt

    Download capx: drive.google.com/file/d/1k3IizcgrdrIwZNTB67GVSbMNflWmPpYf/view

    There's no sound, no definite end, scoring is busted, but you can run around, level up, shoot some things and what not. Enjoy!

  • Keep it up :)

    Try to fix minor to major bugs and you will finish soon :D.

  • Keep it up :)

    Try to fix minor to major bugs and you will finish soon :D.

    Thanks for the encouragement, but it's over already ^^ I won't do anything more to it, it was just for fun. I learnt a lot though (especially about some very bizarre ways the engine picks things and strange timings using wait 0) which I can use on my main project :)

  • Can you compile it to a HTML site?, that EXE makes me nervous.

  • Can you compile it to a HTML site?, that EXE makes me nervous.

    No problem dude, added a link to play it in browser (remember to scroll to the bottom-right of the screen to click the full-screen mode) and a link to the capx if you want to look at the nuts and bolts (but bewarned - it's a hellish landscape in there!)

  • Can you walk through what the Spawn enemy function is doing and how it works? I see, for example, goon - On created, set skinID to self. UID then calls a function spawn enemy.

    The function looks like it chooses the enemyskin and sets a hit box to the size of the enemy? Is that correct? I'm sorry I'm still learning and instances and UIDs are confusing to me.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Can you walk through what the Spawn enemy function is doing and how it works? I see, for example, goon - On created, set skinID to self. UID then calls a function spawn enemy.

    The function looks like it chooses the enemyskin and sets a hit box to the size of the enemy? Is that correct? I'm sorry I'm still learning and instances and UIDs are confusing to me.

    Yup this is all correct :) The reason why I set the skinID to UID instead of just using UID is because in the past with other games I would always run into some sort of issue (like creating holograms of an original unit that all share one health pool), so now from habit I always have some sort of ID variable so I can set as many objects as I like to one ID.

    The reason I create hitboxes separate to the enemy even though they are the same size is again out of habit: in this game it doesn't change much as all, but even if I had another few hours I was going to start adding headshots and trimming back hitboxes, so there would be more hitboxes per enemy and all of different sizes.

    But doing the system as it is allows you to very easily alter the game in the future by creating and pinning different hitboxes to different image points and tagging them with things such as 'head', 'leg', 'weapon', privates', etc. so that you can assign different damage/experience values for each part.

    Also you might notice the timers are being created in an unusual way - this is because using the 'Timer' behaviour doesn't pick objects, so if multiple objects trigger their timer at the same time, it can cause some serious problems (this was one thing that set me back hours trying to debug!). And the reason the time is tracked on a sprite instead of something global like an array is simply because I made it into a module that I can cut and paste into new projects and you can't cntrl+A an array.

    The reason bullets are 'created' instead of 'spawned' is that if you spawn an object, you can't change its angle immediately, you need to wait at least 1 tick, which causes all sort of problems. It's fine for a turret that is rotating 360 degrees, but for weapons that are being mirrored etc. it's much better to use the 'create' action. Lastly you might note some 'wait 0 seconds' actions in the bullet creation - this is because without it some things got wacky, like bullet sprites being pinned to the wrong dmgbox etc. I don't know why it works, just a solution someone shared waaaay back in the C2 days. The reason why setting the team ID before the 'wait' action though is that if a dmgbox spawned over an enemy and the ID was set after wait 0, it would not have changed teams on creation and therefore hit the wrong team.

    That's most of the weird stuff about the enemy spawns, but if you have more questions ask away :)

  • Thanks a lot for taking the time to explain all of that. I will need to digest some of it. I have been looking through your code and saved it for a future reference.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)