Jump to content


perludus

Member Since 12 Jun 2009
Offline Last Active Aug 08 2011 04:21 AM

Topics I've Started

Duplicating some AGS room functions in GM

11 April 2011 - 04:15 AM

If you've used AGS, you know how one can create walkable areas.  You essentially take your background room image, and paint areas where you'd like the player to be able to walk.  Then if you click in a walkable area, you're character will automatically determine a path to get there and walk to that point.  Additionally, AGS has a great "walk behind" mask system for marking areas of a background image that you'd like to have the player be able to walk behind.  

I've been thinking I could create separate bitmap images and load them as surfaces and sample pixels for some of these effects, but haven't dove into the coding yet.

Any suggestions on how to duplicate this kind of mask functionality in GM?

Gm8 Pro - Collision Event Only Triggering Once

31 January 2010 - 04:42 AM

I've got a curious problem.  I've set up a non-solid object named "jump_right", and I have a non-solid player object "player".  In the player, I've set up a collision event to watch for a collision between the player object and the jump right object.  As you might guess from the name, when the player runs into the "jump right" object, they jump right.

And when the collision is triggered, I make the player jump to the right by giving them a velocity and some gravity.  Here's the description from inspecting the object...

[codebox]
Collision Event with object jump_right:
if global.jumping is equal to 0
      set variable global.jumping to 1
      for all player: set the horizontal speed to 2
      for all player: set the vertical speed to -5
      for all player: set the gravity to 0.2 in direction 270
      for all player: set the sprite to player_jumpfall with subimage 0 and speed 0
exit this event
[/codebox]

A trigger then watches for the player to return to the "ground" and sets "global.jumping" to 1.

The problem is, it only works once.  After successfully executing the jump, the player is no longer able to trigger the event.  Instead, when the player touches the "jump_right" object, it simply stops moving.  It can move a single pixel at a time until it is no longer colliding with the jump_right object.  

I have determined that the collision is NOT being triggered after first time by putting in a piece of bit of code to update a sprite's appearance BEFORE the "if global.jumping is equal to 0" test.  I have also run it in debug mode an observed global.jumping, which does get reset to 0 after the jump is done.  My point being that this means it's not failing to jump again because "global.jumping" is not 0.

Any ideas?  Bug maybe that the collision won't trigger again?

Wanted: Natural Human Sprite Set, Side View

27 January 2010 - 02:04 AM

I'm looking for a sprite set of "normal" people from a side view.  Basic walk, run, idle, etc. animations - no combat, etc.

I'd also like them to be pretty much normal people - meaning they could actually be photos.

Anyone know of such a resource available?

Looking For Isometric Astronaut Sprite Set

24 June 2009 - 07:24 PM

I'm looking for a set of sprites of an astronaut, isometric view, typical 8 different direction facing. Anyone know of such a set?

Managing An Isometric Heightmap

17 June 2009 - 08:20 PM

I'd like to create an isometric style (2.5d) game with variable ground height. Any pointers towards existing libraries or references?

I have been thinking of implementing it myself, something like this...
  • Create a tile-based isometric-style game map
  • Create a 2D array that overlays the iso map and holds the height of each tile
  • Modify object placement code to use the height value of a tile as a Y offset to create the illusion of height.
  • Create a new path/movement method that takes this height variance when moving an object from one point to another.

Has anyone else implemented anything similar? See any flaws with the idea?