Brick Breaker 3D
#1
Posted 26 February 2012 - 10:13 PM
#2
Posted 26 February 2012 - 11:03 PM
so I thought the same thing went for prison ball and therefore decided that that game sucked
Oh I say... awfully rough, what?
and I could do better.
...And your off to a good start! I love the screen shaking. And that big ball is really good. (prison ball's ball was far too small. Big mistake!)
The bouncing on the bat is a bit rough, I can't seem to aim it. I had to be patient, and wait for it to get through that gap in the second level.
So just 2 levels so far, right? 'cus I got an error after I beat the second one..
Anyway, your off to a good start! G'luck, I'll keep an eye on your progress.
[start spam]
I wrote up a 3d breakout 'tutorial', if your interested:
http://gmc.yoyogames.com/index.php?showtopic=504824&st=0&p=3730408&fromsearch=1&#entry3730408
It shows how to do little tricks&tips, (like making a ball visible behind blocks) and such like. More of an example, and pointing out little techniques that other 3d breakout games use, than a tutorial, really.
you sound pretty independant, but yeah, I encourage you to read through it at least! You may spy a feature which will tip your game from cool, to epic!
[end spam]
#3
Posted 26 February 2012 - 11:24 PM
But, you are the creator of prison ball, are you not? I'm honored that you said what you did :D. Thank you so much! I will definatley have a look at the tutorial and be working alot more on this game.so I thought the same thing went for prison ball and therefore decided that that game sucked
Oh I say... awfully rough, what?![]()
and I could do better.
...And your off to a good start! I love the screen shaking. And that big ball is really good. (prison ball's ball was far too small. Big mistake!)
The bouncing on the bat is a bit rough, I can't seem to aim it. I had to be patient, and wait for it to get through that gap in the second level.
So just 2 levels so far, right? 'cus I got an error after I beat the second one..
Anyway, your off to a good start! G'luck, I'll keep an eye on your progress.
[start spam]
I wrote up a 3d breakout 'tutorial', if your interested:
http://gmc.yoyogames.com/index.php?showtopic=504824&st=0&p=3730408&fromsearch=1&#entry3730408
It shows how to do little tricks&tips, (like making a ball visible behind blocks) and such like. More of an example, and pointing out little techniques that other 3d breakout games use, than a tutorial, really.
you sound pretty independant, but yeah, I encourage you to read through it at least! You may spy a feature which will tip your game from cool, to epic!
[end spam]
#4
Posted 26 February 2012 - 11:26 PM
#5
Posted 27 February 2012 - 12:21 AM
#6
Posted 27 February 2012 - 12:45 AM
Well you guys, I am at a road block of sorts right now. I can not improve the aiming system as far as I know at the moment,
I played many different breakout games (both 3d, and 2d) while making PB. There are several different methods most people use.
-'Fixed'. The ball always moves at a 45 degree angle, you just have to bounce it. This 'can' work quite well, but it depends on the room! A taller, thinner room, or a wider, short room so that there is little chance of the ball bouncing for ages without hitting anything!
-'aiming'. You hit the ball on the left side, and it bounces hard left, hit it in the middle, it flies up, and so forth.
-'Precise colliding'. When they have a curved bat! Shaped like a dome, the ball bounces off precisely.
If you are using the mouse, there is no hspeed or vspeed. Therefore i can not check the speed the paddle is going.
Could you move the bat with hspeed? If mouse is to the left, then hspeed-something, else, if to the right, etc.
#7
Posted 27 February 2012 - 12:51 AM
Well that is a good idea. Do me a favor, click your middle mouse button. Now move it up and down the page, starting slowly and notice how the further away from the point where you clicked your mouse is, the faster it goes. I think this is what I am going to do using point_distance. Thanks!Could you move the bat with hspeed? If mouse is to the left, then hspeed-something, else, if to the right, etc.
#8
Posted 27 February 2012 - 12:54 AM
#9
Posted 27 February 2012 - 01:07 AM
Quick update. Unfortunatley, since it is drawn in 3d, that does not work and it always goes too fast. I dont know what to do! I was also thinking that I could adjust the direction via the arrow keys and an arrow pointing to the direction it will go, but I tried it and it is too hard to control relative to the speed the game is playing at.Didn't know about that middle click trick. Nice!
while(place_meeting(x,y,other))
{
y-=1;
}
direction=90-(x-other.x);This seems to be the code you used in your tutorial when the ball collides with the paddle. I do not understand :S . The thing with my game is, it is INCREDIBLY simple. As in other than the 3d functions, a beginner could probably understand. Do you mind explaining to me how this code works?
#10
Posted 27 February 2012 - 01:31 AM
while(place_meeting(x,y,other))
{
y-=1;
}
simply moves the the ball 'up' so that it no longer collides with the bat. So it moves up 1 pixel, checks, still colliding, move up again, etc.
We don't want the bat, or ball to be solid (if they are, they automatically move outside each other). And using a function like move_outside_all the ball might end up beneath the bat.. or colliding with someother object.
The next bit:
direction=90-(x-other.x);
Is what we use to determine our direction.
If we center your bat sprite, then the bat x is the middle of the bat, and the ball x is the middle of the ball.
If the ball bounes directly in the middle of the bat, we get something like this:
direction=90-(0-0);
Which is, direction=90. Which is straight up!
If the ball is to the right of the bat a bit, say, 40 pixels to the right, we get this:
direction=90-(40-0);
Which ends up as
direction=50; Which is angled to the right, and up.
If the ball is to the left of the bat, we get.. well, you get the idea!
So it isn't perfect, for longer bats, you may want to change it to something like this:
direction=90-((x-other.x)/2);
The other part of the code refers the the other object in the collision(in this case, the bat.)
#11
Posted 27 February 2012 - 01:41 AM
Oh! That makes sense. You know what sucks? When I made the projection, I made it sideways because I stupidly didnt think of just making the width 480 and the heigh 640 :S. But it gets you thinking when you draw models or when you want to do most other movements :D.The first bit here:
while(place_meeting(x,y,other)) { y-=1; }
simply moves the the ball 'up' so that it no longer collides with the bat. So it moves up 1 pixel, checks, still colliding, move up again, etc.
We don't want the bat, or ball to be solid (if they are, they automatically move outside each other). And using a function like move_outside_all the ball might end up beneath the bat.. or colliding with someother object.
The next bit:direction=90-(x-other.x);
Is what we use to determine our direction.
If we center your bat sprite, then the bat x is the middle of the bat, and the ball x is the middle of the ball.
If the ball bounes directly in the middle of the bat, we get something like this:
direction=90-(0-0);
Which is, direction=90. Which is straight up!
If the ball is to the right of the bat a bit, say, 40 pixels to the right, we get this:
direction=90-(40-0);
Which ends up as
direction=50; Which is angled to the right, and up.
If the ball is to the left of the bat, we get.. well, you get the idea!
So it isn't perfect, for longer bats, you may want to change it to something like this:direction=90-((x-other.x)/2);
The other part of the code refers the the other object in the collision(in this case, the bat.)
#12
Posted 27 February 2012 - 02:01 AM
#13
Posted 27 February 2012 - 02:15 AM
I have come across a problem. That code makes it so that it goes to the left at all times. I even tried adding your paddle movement code and it still doesnt work... What am I doing wrong? I changed the y-=1 to x-=1 and the direction x and x to y and y and its not working :S.Oh, right.
In fact case, you'd use the same code, only use the y element!
#14
Posted 27 February 2012 - 02:44 AM
-Change the 90 to either 0, or 180.
(90 is straight up. 0 is direction to the right. And 180 is direction to the left horizontally.
If your bat is on the right side of the screen, you'd want 180.
#15
Posted 27 February 2012 - 03:40 AM
#16
Posted 27 February 2012 - 03:52 AM
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users











