Jump to content


borgisme5

Member Since 10 Feb 2009
Offline Last Active Apr 08 2009 08:40 PM

Topics I've Started

Code Timing

26 February 2009 - 08:40 PM

A Breakout style game

object_ball = default ball
object_ball_super = ball that goes through bricks
(object_ball_super is a child of object_ball)

Issue itself matters when the multiball pick up is picked up while there is already one in play. There can only be one kind of ball in play, either the default kind, or the power kind.

I have it so that you can have up to 27 balls in play at once, because I think it's cool.
Basically, I need it so that the first group of code does not happen if their are object_ball_super in play. Otherwise, if I have several object_ball_super in play, it will make regular balls instead of more superballs.


(This is for when the the paddle collides with the powerup icon that descends from above.)
[codebox]
with (object_ball)
{
var nnn;
repeat (2)
    {
    nnn=instance_create(x,y,object_ball_random);
    nnn.direction=random(360);
    nnn.speed=10;
    nnn.oldspeed=10;
    }
}

with (object_ball_super)
{
var nnn;
repeat (2)
    {
    nnn=instance_create(x,y,object_ball_super);
    nnn.direction=random(360);
    nnn.speed=10;
    nnn.oldspeed=10;
    }
[/codebox]

High Score Table

17 February 2009 - 04:02 PM

The default high score table is good enough for me for this simple game I'm doing, so I don't need to know how to make a custom high score table (Unless the GML for it is pretty simple, of course ;) )

How big is the default high score table in pixels? I want to make a background image for the highscore table, but since it scales any background image you set it as (using drag and drop, yes, i know.. lol), so by making an image the exact size of it, it won't scale :P

Breakout-like Game

10 February 2009 - 03:38 PM

I am fairly new to Game Maker. I am using the Lite version of Game Maker 7, but I have access to the Pro version if needed. I've picked up the Drag and Drop mechanics pretty fast, but I have yet to really use GML that much, but eager to learn, as I know you can do so much more with it. Looking for some help, which is why I am here!

I have ran into a few problems with the powerups in my game.



1.) The multiball powerup
The way I have it set up, when the game start, I have the ball spawn right above the paddle (object_ball), with a move free action where the direction is " random(30)+90 ". That way, when it spawns, it will always go up. Because of this, however, I needed to create another ball object for the multiball where the direction is " random(360) " (object_ball_random), since I don't want the new balls to always go up. object_ball_random is a child of object_ball.

However, because of this, this causes problems with other power ups.

When there are multiple balls in the playing field, only one of them will spawn more balls. I want it so that all balls in play will spawn two more.

I have the multiball powerup set up to where it creates two moving instances of object_ball_random, and the x and y coordinates are those of object_ball. I am guessing the game just picks ones of the object_ball instances in play and spawns the moving instance at that on. These balls always will spawn at the one that is there when the level starts, if that one is gone, one of the child's will get chosen.




2.) The speed up and speed down power ups

I have one power up that will set the speed of the ball(s) to 15 for 10 seconds.
I have another power up that will set the speed of the ball(s) to 5 for 10 seconds.
(What they should do)

I want them the affect all balls on the field, regardless if they were there before or after when the power up was picked up. This one has been a head ache for me because I just can't make much progress. I can get them to speed up/speed down and to override one another, but I can't ever get them to return the default speed. Then, of course, if I hit a multiball, the new ones will be at the default speed until I hit another powerup. I also am trying to get it so that in addition to the 10 second delay, any additional speed power ups will reset it. IE. if I pick up a speed boost power up and 7 seconds go by and I pick up another one, the speed boost will last for an addition 10 seconds, and if a speed slower is picked up, the speed becomes slower and it will last for 10 seconds, with the old powerup null.



3.) Multiple powerups would spawn when there were multiple balls in play. ~fixed

This script actually fixed it as I was using create random instance for the first four of my powerups, then an " else ", followed by a second create random instance. I did do this code for a random chance that a brick may or may not spawn a powerup, and then when it does, it picks a random power up to spawn.

if round(random(5))>4
{
{
instance_create(other.x, other.y, choose( object_powerup_speed_up, ..., ..., ...));
}
}

4.) Paddle gets stuck in wall with paddle extender powerup

If I pick up a paddle extender powerup when next to a wall, it will make the paddle go into the wall, and thus become stuck. I use a Change Instance from the regular paddle to the large paddle to do this. I know this has to do with collision and solid objects, but I don't know how to fix this one at all.

I've also ran into problems of the paddles not changing into the right instance. IE, going from a small to a large paddle instead of the default paddle when a paddle extender powerup is picked up. I am pretty sure this is because I am doing this far from right. I check the number of instances of the regular paddle, and if it = 1, change instance to big paddle, else, small paddle.



~~~

I basically looking for a way to make so that when a multiball power up is activated, two new balls will be created at that location, and they will go in a random direction. If a speed powerup is picked up, all the balls in play will be affected, and any new ones will be as well. If another speed powerup is picked up, it will over ride the previous one. After a time delay, they return to their start speed of 10. I also need to find out to keep an extending paddle to not get stuck in the wall and to get the right paddle to appear for the appropriate powerup.

!~Thank you for any and all help~!