Week 02

This week:

  • began prototyping objects you can push and pull
  • got confused by collision code
  • finished prototype of pushing/pulling objects
  • drank water
  • incorporated pushing/pulling into main game
  • tweaked movement code
  • drank more water

Pushing and pulling objects means tangling with Game Maker’s persnickety collision-checking system. Theoretically, when you register a collision with and object – for our purposes, we’ll call it o_pancreas – you can use the affix “other” to go digging around in the object’s variables – i.e. other.islets_of_langerhan += 1. This is mainly useful because I want to call certain code any time I collide with an object you can grab (o_grabbable), but want to access the variables only of the one I’m touching at the moment, like its x-position (other.x -= 2). For some time couldn’t get any code that would let me use “other” properly, and though I could get the engine to recognize the collision between two objects in certain instances, I couldn’t in others, despite having written nearly identical (and fully functional) code in the past. After breaking out the laptop and banging around the web a bit, I picked up a new trick that’s working well. Still a little bothered that I don’t know why the other code wasn’t working, but I’m just plowing forward for now.

The trick in question is to use Game Maker’s instance_place() instead of place_meeting(), because place_meeting() returns true or false, where instance_place() returns the instance ID of the object you’re touching. So now I’m touching one instance of the dozens of grab-able objects, but then saving its unique ID in a temporary variable and using that to fuck with its code. Functions that save data to temporary variables is a trick I’ve known of but haven’t really used effectively before, so I guess I can add that to the toolbox from here on. Getting better at this.

Incorporating the mechanic into the main prototype wasn’t too difficult, though I need to make some animations for pushing and pulling now, and I realize I haven’t budgeted new art into my checklist. It’ll just have to happen somewhere. Also F’d with collision masks a bit, needs further tweaking still.

Hydration is important.

Checklist:

  • Basic Movement
  • Character Switching
  • Pushing/Pulling
  • Dialogue
  • Entering/Exiting Rooms
  • Collecting Inventory
  • Using Inventory
  • Climbing
  • Carrying
  • Crawling
  • Sentence Line
  • Throwing
  • Camera
Advertisements

0 Responses to “Week 02”



  1. Leave a Comment

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s





%d bloggers like this: