Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Locked thread
Gamesfreak13563
Jan 28, 2010

Get ready for a SHAQ DOWN!
== Log 007: Collapsing Castle ==


Gameplay Video

This level is called Collapsing Castle. It's the first level (if you follow the recommended path) that has two different kind of blocks in it: Gum and Spring. Here, we tell the player how to switch between the two as well as use puzzles with both of them. The puzzles don't have both blocks interconnected just yet: that comes later. We also introduce Crumbling Blocks - blocks that are unstable and will break if Boomer stands on them. (Ballums are okay, because they're filled with helium. I think. I dunno.)

• How do you ease the player into the Crumbling Blocks?
We first set up a position where they can test out the use of the Crumbling Blocks with no fear. This is the first platform in the level and it is situated above solid ground. Then, after that, we immediately introduce Crumbling Blocks over a pitfall and over spikes, which is legitimate danger. By the time the player reaches the puzzle at the top with the Ballum going into the pit with the switch, they should understand that the Crumbling Blocks:

  • Will start crumbling if Boomer is on them
  • Take about 2-3 seconds to crumble
  • Come back shortly after crumbling
  • (Optional) The blocks don't respawn on top of entities, similar to how the boxes and bombs respawn

We also show the player the reason why he has to go up: He can't reach the box because he has no ghost powerup in this level, and you can't nudge the box from underneath or pick it up while stuck to the wall or something like that. The only way to get the box is to bounce it up from underneath, so the player has to go up expecting either a ghost or spring pickup.

Later we reinforce what the player has learned about Paraballums by putting it together with the Crumbling Blocks, giving a sense of urgency to move through. Timing the jumps are harder here, which is why I put the checkpoint at this position.

:siren::siren: Our Second Challenge!! :siren::siren:

There's an alternate pathway through this level! But where? Rewards include: everlasting fame and fortune! (Or a Steam Key. Note these might be delayed - I still haven't gotten approval from the last one, so...)

Adbot
ADBOT LOVES YOU

Choco1980
Feb 22, 2013

I fell in love with a Video Nasty
Oh, so THAT's How that level works. I think I was tired and completely spaced out trying to play it at first. I had no trouble on the end level on the other path funny enough.

NGDBSS
Dec 30, 2009






Gamesfreak13563 posted:

:siren::siren: Our Second Challenge!! :siren::siren:

There's an alternate pathway through this level! But where? Rewards include: everlasting fame and fortune! (Or a Steam Key. Note these might be delayed - I still haven't gotten approval from the last one, so...)
I'd found this trick a while ago. I'm unfamiliar to OBS (and SCFH/VirtualDub were doing weird things to the window), so please forgive the bars/slight blur.

Geemer
Nov 4, 2010



Aw boo, you beat me to it.

Oh well, here's my poorly optimized OBS capture.

Carbon dioxide
Oct 9, 2012

Hm, if later on you are required to place blocks while standing on crumbling blocks, you need quite good reflexes between the keyboard and the mouse.

Gamesfreak13563
Jan 28, 2010

Get ready for a SHAQ DOWN!

NGDBSS posted:

I'd found this trick a while ago. I'm unfamiliar to OBS (and SCFH/VirtualDub were doing weird things to the window), so please forgive the bars/slight blur.

This is the correct answer! Good job. Goons never cease to amaze.


Carbon dioxide posted:

Hm, if later on you are required to place blocks while standing on crumbling blocks, you need quite good reflexes between the keyboard and the mouse.

Better get gud keep trying until you get it.

Nidoking
Jan 27, 2009

I fought the lava, and the lava won.
I believe the problem with using fractional pixels for collision detection is that Game Maker really doesn't handle partial pixels well - when I dabbled with moving platforms, I found that I needed to have them at whole pixel positions every step or strange things would happen, very much like the problem you showed here. At the very least, it clearly locks positions to whole pixels during the Draw phase, even if it doesn't round the actual locations as stored. I assume the rest is down to the mechanics of the place_meeting function - the position of the block is fixed, while Boomer's position has to be rounded at each step. It's likely that the rounding is done differently depending on which object is doing the checking i.e. Boomer knows his actual position and doesn't detect the collision, but the block detects that it collides with the rounded value of Boomer's position.

Gamesfreak13563
Jan 28, 2010

Get ready for a SHAQ DOWN!
Looking at this footage reminds me how out of date the released version is compared to mine in terms of code and stuff. Think I should release a new binary soon?

Nidoking posted:

I believe the problem with using fractional pixels for collision detection is that Game Maker really doesn't handle partial pixels well - when I dabbled with moving platforms, I found that I needed to have them at whole pixel positions every step or strange things would happen, very much like the problem you showed here. At the very least, it clearly locks positions to whole pixels during the Draw phase, even if it doesn't round the actual locations as stored. I assume the rest is down to the mechanics of the place_meeting function - the position of the block is fixed, while Boomer's position has to be rounded at each step. It's likely that the rounding is done differently depending on which object is doing the checking i.e. Boomer knows his actual position and doesn't detect the collision, but the block detects that it collides with the rounded value of Boomer's position.

The way the docs describe the function is with place_meeting(), "the object moves to the place specified and checks if there's a collision, then moves back." It's AABB, I'd assume, because both Boomer and the lockblocks are simple rectangles in their collision masks. I can't imagine why it doesn't work with subpixel precision and I think I posted about this to the official Yoyo forums at somepoint (or maybe just thought about it). I remember when I discovered the bug I was actually angry that this was the behavior exhibited - it made no sense. (Sidebar: PHP and Javascript make me angry for similar reasons.)

Nidoking
Jan 27, 2009

I fought the lava, and the lava won.

Gamesfreak13563 posted:

The way the docs describe the function is with place_meeting(), "the object moves to the place specified and checks if there's a collision, then moves back." It's AABB, I'd assume, because both Boomer and the lockblocks are simple rectangles in their collision masks. I can't imagine why it doesn't work with subpixel precision and I think I posted about this to the official Yoyo forums at somepoint (or maybe just thought about it). I remember when I discovered the bug I was actually angry that this was the behavior exhibited - it made no sense. (Sidebar: PHP and Javascript make me angry for similar reasons.)

"checks if there's a collision" is pretty vague, though, and everything depends on whether that half a pixel rounds up or down. If it were .4 or .6, it should be pretty clear whether the object actually occupies that pixel in practice or not, but .5 could be ambiguous. It shouldn't be, but like I said, Game Maker does weird things with partial pixels and my choice was to eliminate that entirely and constrain my game elements to be at whole pixel positions at every step.

Are the Yoyo forums any good these days? Back when I used them, it was hard to find a post that wasn't "What is a varible and how to I use it to make my game better?" or occasionally, someone would get grand enough ideas to ask "What is an array and how to I use it to make my game better?" I saw a couple of posts in a year that actually had interesting or meaningful questions, and when I'd answer one, the response would invariably be "I wanted something simple, not an answer to my question."

ultrafilter
Aug 23, 2007

It's okay if you have any questions.


Gamesfreak13563 posted:

Looking at this footage reminds me how out of date the released version is compared to mine in terms of code and stuff. Think I should release a new binary soon?

If the differences are things that show up in the gameplay, it'd be interesting to see a comparison.

Gamesfreak13563
Jan 28, 2010

Get ready for a SHAQ DOWN!
== Log 008: Woods Fulla Ghosts ==


Gameplay Video

Welcome to Spookum Woods, which are woods... full of Spookums. Spookums are Medusa-head like creatures that move in a sin-wave like pattern. They're a bit more helpful then regular Medusas though: they can also carry boxes and bombs, and while they're doing that they won't hurt Boomer. Hitch a ride on the ghostly box express!

• How do you spawn the Spookums?
The code for spawning the Spookums is actually pretty similar to the code for spawning the little tutorial tips at the bottom of the screen. I create the spawner object, in this case obj_spookum_gen and give it a few parameters in its individual create event:

  • If it goes left or right (default: goes left)
  • How fast the Spookum moves horizontally
  • The x coordinate range for when to generate Spookums
  • The speed of the Spookums that are generated
  • Which y coordinate to spawn the Spookums at (can also follow the player's y coordinate)

Then, on a timer, we generate Spookums with those properties. The Spookums despawn if they go out of a certain range of the camera, in order to not leak memory with a bunch of Spookums the player has no chance of catching up to.

• With a few well placed springs, you can skip the Ghost powerup. Doesn't this make the level potentially unwinnable?
It did, but since I learned you could skip the Ghost powerup in the previous levels I became a bit more conscious of that sort of thing and edited the level slightly to accommodate. Because beating the level without the Ghost Block requires more ingenuity then beating it with it, I opted to make it possible to proceed without the Ghost Block instead of making it impossible. Maybe I'll turn these sorts of challenges into achievements someday.

Nidoking posted:

"checks if there's a collision" is pretty vague, though, and everything depends on whether that half a pixel rounds up or down. If it were .4 or .6, it should be pretty clear whether the object actually occupies that pixel in practice or not, but .5 could be ambiguous.

Why should it be ambiguous? .0 to .4 rounds down, .5 to .9 rounds up. There's five decimals on both sides, it's totally even.

Gamesfreak13563 fucked around with this message at 17:36 on Nov 7, 2015

Choco1980
Feb 22, 2013

I fell in love with a Video Nasty
Oh! I see what you mean about the ghost block, cause that route to the block didn't occur to me and I just used the spring to bounce over the first lock blocks from high up. The only thing that caught me up was the timing on the spooky riding, which wasn't too tricky.

berryjon
May 30, 2011

I have an invasion to go to.
What happens if you try to leave the level via the right side of the screen instead of collecting the end-level flag? Is there a wall to prevent you, or some other mechanism?

Geemer
Nov 4, 2010



Gamesfreak13563 posted:

Why should it be ambiguous? .0 to .4 rounds down, .5 to .9 rounds up. There's five decimals on both sides, it's totally even.

Tie-breaking in rounding is actually a subject of much debate and there's several methods with various advantages and disadvantages. https://en.wikipedia.org/wiki/Rounding#Tie-breaking

ChaosArgate
Oct 10, 2012

Why does everyone think I'm going to get in trouble?

berryjon posted:

What happens if you try to leave the level via the right side of the screen instead of collecting the end-level flag? Is there a wall to prevent you, or some other mechanism?

Yeah, it's basically like Super Mario Bros 1 where there is more level behind the flag, but it just stops right there instead of allowing you to scroll the flag too far from the right side of the screen.

Gamesfreak13563
Jan 28, 2010

Get ready for a SHAQ DOWN!

ChaosArgate posted:

Yeah, it's basically like Super Mario Bros 1 where there is more level behind the flag, but it just stops right there instead of allowing you to scroll the flag too far from the right side of the screen.

Could you ever jump the flag and then scroll so far to the right it was impossible to go back and hit the flag again?

Gamesfreak13563
Jan 28, 2010

Get ready for a SHAQ DOWN!
== Log 009: Invisible Blocks ==


Gameplay Video

With every platformer comes the invisible blocks that everyone hates. ROM Hackers put them in the worst places so that you get screwed over when you jump in anything but exactly the wrong way. This level, Mt. Ether, introduces the ethereal blocks - Phantom Block's invisible block type - and I've tried to make them less annoying and more fun. Have I succeeded? Let's find out!

• How did you implement the Ethereal Blocks?
There's a few functions in GML that deals with distance from two points, but the one I use is the very simple distance_to_object(obj). Anyone who's taken any sort of math class past about fifth grade will recognize that this is just the Euclidian distance formula with both objects' x and y coordinates, but I digress.

Using this distance formula, I define a circular boundary with which to show the Ethereal Block:
code:
var b = (70 - distance_to_object(obj_player)) / 52;
ether_alpha = (3 * ether_alpha + b) / 4;
You may think the second line is slightly redundant, but it allows for a smoother fading of the Ethereal Block over time as opposed to an instant fade that's subject to incredibly tiny movements. We also have to implement a check on the Ethereal Block switching to see if the block's ether_alpha is too low to be changed. This is implemented in obj_game, which handles most of the block switching.

• What is the gameplay purpose of the Ethereal Blocks?
I implemented them mainly to force players to get close enough to a block to switch it. That way, I can create puzzles where the players don't have complete and total control over the environment. The invisibility of them can also force players to react fast when they see them - a dastardly puzzle that I'm sure you'll see in a few following levels...

• Tell me about something else besides a level.

There's a fully functioning Cheats system in the game that I told absolutely nobody about. Just press 'O' at the level select screen. When we go into a level, these boolean values change some of the functionality of the game. VVVVVV Mode, for instance, replaces your jump with a gravity switch. Deadly Mouse adds a monster-killing hitbox to your mouse. Weak Stomp lets you bounce on Ballums without killing them, and so on. Try them out!

Another thing: the mountain music is largely an amalgamation of themes I've used for different projects in the past. Almost each phrase is from a different old song of mine! I figured I'd at least use them in a commercial game, so I could feel like writing them was worth something.

Gamesfreak13563 fucked around with this message at 19:19 on Nov 8, 2015

ChaosArgate
Oct 10, 2012

Why does everyone think I'm going to get in trouble?

Gamesfreak13563 posted:

Could you ever jump the flag and then scroll so far to the right it was impossible to go back and hit the flag again?

I think so. I know for sure some fan made games patterned after SMB1 (lookin at you, Syobon Action) allowed the flag to scroll off screen as a big gently caress you to players.

ultrafilter
Aug 23, 2007

It's okay if you have any questions.


Invincible Ballums could make for some interesting puzzles, particularly if you don't let them walk off ledges.

Choco1980
Feb 22, 2013

I fell in love with a Video Nasty
Once again, I think you really show you understand the way to take fundamental platforming mechanics and do them right and enjoyably. Keeping the ethereal blocks from just being straight up invisible was wise, and I also liked the Ballum walkway to show the further away block pattern.

I'm not trying to brownnose, it's just that there are SO many amateur and indie game designers who just think "oh, well this is what they put in platformers, I better shoehorn it in" without much thought to the logic or fun of the design. Actual level design seems like a far more complicated process than merely being decent at programming games, and it shows why they're normally different positions in game credits.

Blastinus
Feb 28, 2010

Time to try my luck
:rolldice:
Crap.
I also like how you have the moving platform just stalled at first so if players didn't catch that tutorial text about transforming ethereal blocks, they'd have an actual example to teach them the mechanic too.

Overall, that level seems really solid.

Carbon dioxide
Oct 9, 2012

It seems the platform cannot move through solid blocks.

Gamesfreak13563
Jan 28, 2010

Get ready for a SHAQ DOWN!
So by now you guys have seen all the levels included in the binary on the website, https://www.phantomblock.com
I'm going to be showing videos from now on of heretofore unreleased levels. I'm apprehensive to release them just yet, but if you want we can arrange something just for goons - I'm not going to go full Early Access/Kickstarter spam on you guys (mostly because I think that's distasteful and don't have either of them (though I might make a Kickstarter if I can't find a publisher (have some more nested parenthesis)), and also because it's against the rules). Tell me what you think.

Also, if you want me to do a special on something that's not a level, ask about it.

Choco1980
Feb 22, 2013

I fell in love with a Video Nasty
Don't worry too much about it. Consider this a "Something Awful Exclusive Preview" of the levels if you want (which isn't early access, we don't get to play them) and don't feel stingy if there are some surprises you'd rather keep secret and not show us. You're the game maker here, you deserve at least that much.

Araxxor
Oct 20, 2012

My disdain for you all knows no bounds.

Choco1980 posted:

I'm not trying to brownnose, it's just that there are SO many amateur and indie game designers who just think "oh, well this is what they put in platformers, I better shoehorn it in" without much thought to the logic or fun of the design. Actual level design seems like a far more complicated process than merely being decent at programming games, and it shows why they're normally different positions in game credits.

It pretty much is. Good level design is harder to pull off than most people would think. There's a lot of thought that would have to go behind it. Like making sure there's no oversights such as making the level unwinnable or making it so that it's possible to skip everything within said level (unless you intend for that to happen.) Like, it's easy to make a hard and unfair level for one. Place obstacles everywhere without a second thought and all that. It's tough making a difficult and fair challenge, and making sure that any mistakes a player makes is their fault, and not the game pulling a cheap shot.

Speaking of which, what's the design process behind the levels? Not like code or anything, but how do you come up with ways you want your levels to play out and all that?

Gamesfreak13563
Jan 28, 2010

Get ready for a SHAQ DOWN!

Dr. Fetus posted:

Speaking of which, what's the design process behind the levels? Not like code or anything, but how do you come up with ways you want your levels to play out and all that?

Largely trial and error. I introduce a concept that's safe to play with, then use that concept throughout the level in dangerous forms that may require expertise of the mechanic in question to collect all the coins. The good thing about having relatively short levels is that it lets me go through and figure out of something works much faster than if I had longer levels.

Gamesfreak13563
Jan 28, 2010

Get ready for a SHAQ DOWN!
I've been working on another GML project of mine for a class, but that's now finished and I can get back to this.

If you guys have any requests for features, tell me what you think can make the game better! I'm going to start programming the level editor, and then I will release a new version. I may start a contest - anyone who can develop the best level gets it put in the game!

Gamesfreak13563 fucked around with this message at 00:38 on Nov 16, 2015

Gamesfreak13563
Jan 28, 2010

Get ready for a SHAQ DOWN!

I've been working hard these past few weeks and I've added a few new levels you guys are sure to enjoy. Plus, catch up on all the stuff that I've been showing off in videos that you don't have yet, including different colored powerups and bugfixes and stuff. I've also changed the way levels unlock. Now they unlock based on how many coins you have. This makes coins less useless to collect.

I've decided to stop uploading new versions as soon as I get a workable amount of levels - enough to flesh out world one and show off all of the blocks. At that point I'll probably run a Kickstarter to get more funds, unless I can find a publisher.

Regular posts will continue soon, detailing the creation of these new levels.

Feedback is always appreciated! You can get the newest version now at:
Phantom Block Demo - 11/19/2015

Araxxor
Oct 20, 2012

My disdain for you all knows no bounds.
Geez, some of the later levels are devious. You really ramped things up there. I really liked the creating temporary platforms level. That one was really neat.

Gamesfreak13563
Jan 28, 2010

Get ready for a SHAQ DOWN!
== Log 010: All Together, Now ==


Gameplay Video

This was to be the final level of the original World 1, but since I got rid of the concept of 'worlds,' I just decided to use "Challenging Cliffs" as a later level which uses all three of the blocks we've seen up to this point. Those of you who have played the demo also noticed that each level now has its own unique subtitle: This one's is "One Step Upward," which intentionally contrasts the subtitle I gave to the first level, "One Step Forward." It's designed the be the toughest level the player has seen up to this point and requires a substantial amount of coins to unlock as well as a good working knowledge of how the game plays to get through it.

• How did you design this level?
I threw literally everything I had designed up to this point into the level. The density of the mechanics make for a fun challenge, and you really need to be able to switch through blocks on the fly. If you couldn't keep track of both Boomer's and the cursor's position at the same time, consider Challenging Cliffs the kick in the pants you need to develop that skill - you're going to need it at some point.

• Those last five coins. You're an rear end.
I never really expect players to get all the coins in one go-around - I can build replay value by hiding some coins in plain sight that's difficult for the player to figure out how to get them. This one requires some tricky mouse movement to pull off, but it's possible!

• Besides making it easier to unlock levels now, is there any benefit to getting all the coins in a level?
The game actually supports Steam Leaderboards. You can race against other people from around the world while using the Steam version of the game. If you collect all the coins in the Steam version, you get placed on a special leaderboard - you'll be racing against people who got all the coins for that level only in a "100%" rankings list, versus not collecting all the coins and being placed in an "Any%" rankings list.

Also, I intend to have a super difficult bonus level at the end of the game, titled "Boomer's Big Finale," which will require all the coins to unlock. So there's that.

I'm thinking of streaming some level creation stuff. Anyone interested?

Gamesfreak13563 fucked around with this message at 17:55 on Nov 20, 2015

Gamesfreak13563
Jan 28, 2010

Get ready for a SHAQ DOWN!
== Log 011: Arbitrary Moving Platforms ==

No new levels today. Today we're going to focus on something a bit different: arbitrary moving platforms. Astute observers might notice that in all the levels I've shown off so far, we've only dealt with moving platforms going in a straight line horizontally or a straight line vertically - only up or down, left or right. No diagonal lines - today, we're going to fix that.

• So what's the current code?
We hold a list of the points that the moving platform visits in two arrays - ordered_points_x and ordered_points_y. I can define these points for each moving platform at creation using each instance's unique Creation Code. For example, here's the creation code for the moving platform at the end of Mt. Ether:

code:
ordered_points_x[0] = xstart;
ordered_points_y[0] = ystart;

// Horizontal line to the right
ordered_points_x[1] = 1616;
ordered_points_y[1] = ystart;

// Go up
ordered_points_x[2] = 1616;
ordered_points_y[2] = 48;

// Go right again - player has to drop the box
ordered_points_x[3] = 1840;
ordered_points_y[3] = 48;

// Go down until the player is sure to die
ordered_points_x[4] = 1840;
ordered_points_y[4] = room_height + 200;
The moving platform traverses this in order - from point[0] to point[last_point]. Once it reaches the end of the array, it checks to see if it's a loop - if the last point is the same as the first point, we know we can keep going in the same direction. Otherwise, we have to reverse direction and go back the way we came. Once we have the point we want to go to, we want to set the horizontal and vertical speed of the platform to go towards that point. Our naοve way of doing this is to simply go in the direction of the point, a pixel in the x and y directions at a time. This so far has worked for horizontal and vertical lines (and incidentally, also works for lines of the formula y = mx where m = 1, m = -1.

code:
var point_x = ordered_points_x[current_point]
var point_y = ordered_points_y[current_point]
var hsp_dir = sign(point_x - x);
var vsp_dir = sign(point_y - y);
hsp = hsp_dir;
vsp = vsp_dir;
But it fails on more complex lines. Look at our test, which randomly generates points for a platform to go through:


You'll notice in cases where the horizontal distance is much greater than the vertical distance, the platform will close the vertical distance first, leaving the platform off the line as it travels to its destination. This is not a good thing - ideally, we want the platform to follow the line at all times.

• Why don't you move by some fraction of the slope of the line?
This is a good idea. Taking the slope would work if we had arbitrary precision in the platform's position - however, we don't. Game Maker has strange collision detection when an instance's x and y values aren't integers. To prevent things like that from happening in my game, I make it so that velocity must always have integer components.

• How do you fix it?
Let's take another look at the problem. We want our platform - which has finite precision in its position and velocity - to follow the line between two points as closely as possible, moving at least one pixel a step. The solution in fact comes from the lines, and how they're drawn. Before we had displays made up of rows and columns of individual square pixels, we had what was called a vector display. Vector monitors didn't have a resolution as we understand them today - they were drawn using sloped lines instead of dots. It was easy to draw a line from one point to another - but once we started using raster displays with pixels, we have to make approximations to draw a line with discrete points. This is a process called rasterization.


A line, and its rasterization.

We'll simply use the same algorithm used to rasterize lines - in this case, Bresenham's, which keeps an error value of how far off the line we are - to set our velocity. We're gonna need some new variables, though. Let's add three - deltaerror_x, deltaerror_y, error - and set them when we change which point to chase.

code:
deltaerror_x = -1;
deltaerror_y = -1;
var deltax = ordered_points_x[current_point] - old_point_x;
var deltay = ordered_points_y[current_point] - old_point_y;
if (deltax != 0) 
    deltaerror_x = abs(deltay/deltax);
if (deltay != 0) 
    deltaerror_y = abs(deltax/deltay);
error = 0;
Why do we need a deltaerror_x and a deltaerror_y? In a situation where we have a very steep line, if we were only incrementing x on each step and adjusting y to compensate, we would shoot up steep lines way too fast. So we're going to pick the deltaerror that's lower, and rasterize in that direction, if that makes sense. We also set each to -1 at the start, and keep it there if any of the deltaerror variables would be a result of division by 0. That way, if we see either of the deltaerror variables is -1, we can tell we have either a vertical or horizontal line and simply use the simpler code we had earlier.

Now when we're actually deciding what the next speed should be:
code:
// Reset the speed to 0.
hsp = 0;
vsp = 0;

// Find the direction we're going in.
var point_x = ordered_points_x[current_point]
var point_y = ordered_points_y[current_point]
var hsp_dir = sign(point_x - x);
var vsp_dir = sign(point_y - y);

// Are we on a straight horizontal or vertical line?
if (deltaerror_x == -1 || deltaerror_y == -1) {
    hsp = hsp_dir;
    vsp = vsp_dir;
    exit;
}

// Use Bresenham's Line Algorithm to set speed in each direction.  
if (deltaerror_x < deltaerror_y) {
    hsp += hsp_dir;
    error += deltaerror_x;
    while (error >= .5) {
        vsp += vsp_dir;
        error--;
    }
} else {
    vsp += vsp_dir;
    error += deltaerror_y;
    while (error >= .5) {
        hsp += hsp_dir;
        error--;
    }
}
Does this work? Let's go back to our test to find out.


Looks like everything is good to go!

Gamesfreak13563 fucked around with this message at 23:44 on Nov 21, 2015

ATM Machine
Aug 20, 2007

I paid $5 for this
I think it's more a limitation of Game Maker, anything I do in it is absent of such precise movements usually, but this solution makes a slight stuttery movement when moving along a odd angles, which is then mirrored by the camera, leading to a lot of the scene appearing to stutter in response as well.

Though this isn't something that would stand out during game play, as there'd be other things to focus on, and real paths probably won't be as chaotic as this. If they were though, it could be slightly mask this by having the camera lag behind a very minor amount, or update every other step and ease the movement over a tiny fraction of time, but I don't know how well GameMaker would support that. This is just a minor thing that stood out to me though, and probably nothing anyone would actually notice unless pointed out.

Gamesfreak13563
Jan 28, 2010

Get ready for a SHAQ DOWN!

ATM Machine posted:

I think it's more a limitation of Game Maker, anything I do in it is absent of such precise movements usually, but this solution makes a slight stuttery movement when moving along a odd angles, which is then mirrored by the camera, leading to a lot of the scene appearing to stutter in response as well.

Though this isn't something that would stand out during game play, as there'd be other things to focus on, and real paths probably won't be as chaotic as this. If they were though, it could be slightly mask this by having the camera lag behind a very minor amount, or update every other step and ease the movement over a tiny fraction of time, but I don't know how well GameMaker would support that. This is just a minor thing that stood out to me though, and probably nothing anyone would actually notice unless pointed out.

Oh believe me, it's unlikely I'll put anything so complex in my game - in fact, I'll generally stick to horizontal and vertical lines in most cases. This is more for when the level editor comes out and players want to do more complex stuff. I tried updating the camera every other step and it makes it more jittery, not less.

And I get what you're saying about the stuttery stuff - it's actually a result of the low internal resolution. With a higher resolution, the lines would look more smooth. It bothers me too, to be honest - There's actually a case of this sort of stuttering that already happens. In the scrolling level - Paraballum Panic, I'm scrolling by one pixel every other frame, and it looks stuttery. However, I can draw the eye away from it with the scrolling background.

My camera is actually home rolled and uses smoothstep to make things appear nice and smooth.

Gamesfreak13563 fucked around with this message at 04:02 on Nov 22, 2015

Gamesfreak13563
Jan 28, 2010

Get ready for a SHAQ DOWN!
Real quick update:
Level editor status is coming along pretty well, we've got a functional way to place bricks. We're working on finding ways to define special parameters for certain objects (giving Ballums spiked helmets, selecting the color of switches, etc). When it's finished, I'll post another download and you guys can play around with it - I hope to see a lot of community levels here!

Araxxor
Oct 20, 2012

My disdain for you all knows no bounds.
So what's gonna be in the level editor? Is it gonna be stuff from what we've seen so far? Are there gonna be any new surprises? Think I might have a few concepts in mind for levels.

Gamesfreak13563
Jan 28, 2010

Get ready for a SHAQ DOWN!

Dr. Fetus posted:

So what's gonna be in the level editor? Is it gonna be stuff from what we've seen so far? Are there gonna be any new surprises? Think I might have a few concepts in mind for levels.

I plan to release the level editor before any levels featuring the last few types of blocks - so you can try those out for yourself.

NeoAnjou
Jul 22, 2010

Gamesfreak13563 posted:

If you guys have any requests for features, tell me what you think can make the game better!

One very minor thing, but where the symbol for the coin in the coin count (i.e 25/50) appears then my brain keeps seeing it as another coin to collect and expecting you to jump and get it! I don't know if I'd notice the same whilst actually playing the game though.

Not really sure what a resolution would be though... A different colour? size? make it not rotate?

Gamesfreak13563
Jan 28, 2010

Get ready for a SHAQ DOWN!
I've been hard at work on the game lately, as well as college and job searching, but I can share a tidbit with you right now. Here's a new level I've been working on. Tell me what you think!

NeoAnjou posted:

One very minor thing, but where the symbol for the coin in the coin count (i.e 25/50) appears then my brain keeps seeing it as another coin to collect and expecting you to jump and get it! I don't know if I'd notice the same whilst actually playing the game though.

Not really sure what a resolution would be though... A different colour? size? make it not rotate?

I could add a drop shadow - that might make it more apparent that it's a UI element.

Gamesfreak13563 fucked around with this message at 03:58 on Jan 24, 2016

Geemer
Nov 4, 2010



Nice to see this is still alive and kicking.

I'm not too sure about the leap of faith at the end there, but maybe it feels better when you're actually controlling it yourself.

Adbot
ADBOT LOVES YOU

Choco1980
Feb 22, 2013

I fell in love with a Video Nasty
I know I say it a lot, but I absolutely love the way you design levels. They teach without being too hand-holdy, and they're challenging without being the "super extreme!! EXPERTS ONLY! RAAAH!" that indie platformers all seem to be lately.

Also, seeing how the new powerups work is really neat!

  • Locked thread