Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

DarkBASIC Discussion / breakout background

Author
Message
eek
20
Years of Service
User Offline
Joined: 26th Dec 2004
Location:
Posted: 10th Aug 2006 06:57
I'm having another problem with creating breakout. It works, until I try to add a matrix as a background. I have a reason to use the matrix as the backdrop, so changing the background isn't something i would want to do. The code is below, and when I add something like make matrix 10, 500.0, 500.0, 50, 50, it changes the camera or something. Dunno what's goin on. Thanks for any help.

Gamedesign er20
18
Years of Service
User Offline
Joined: 30th Jun 2006
Location: The one place you would never look...
Posted: 10th Aug 2006 18:13 Edited at: 10th Aug 2006 18:14
Well I'm not sure about the matrix, but collision detection is a little buggy, I mean is the ball suposed to pass right through the wall into nothing and you just sit there waiting for it to come back?
start by working on that, if you need any more suggestions, or advice just come back to the forums.

Cocacola and Pepsi aren't that differnt. Deal with it.
eek
20
Years of Service
User Offline
Joined: 26th Dec 2004
Location:
Posted: 11th Aug 2006 03:05 Edited at: 11th Aug 2006 03:07
Thanks for the advice. The collision is definately more important than the background, but I am going to have to do both eventually anyways. Currently I was trying to implement this background effect, so if anyone has any ideas on what the problem is, feel free to let me know. Thanks again.
Latch
18
Years of Service
User Offline
Joined: 23rd Jul 2006
Location:
Posted: 11th Aug 2006 03:26
Hi eek,

It seems that if you create your matrix BEFORE you run your initialization and set your camera position, it will not affect said camera position.

I added the matrix near the top of your source. Of course, you'll want to size and position it appropriately:



Enjoy your day.
eek
20
Years of Service
User Offline
Joined: 26th Dec 2004
Location:
Posted: 11th Aug 2006 05:30
Wowee! Thanks a lot Latch. This had me completely stumped, and the solution was as simple as that. Thanks for the help!
Gamedesign er20
18
Years of Service
User Offline
Joined: 30th Jun 2006
Location: The one place you would never look...
Posted: 11th Aug 2006 19:57 Edited at: 11th Aug 2006 19:57
I have another piece of advice, no matter how I move the paddle to hit the ball it always goes right, and since the collision detection is down in the right wall it gets stuck,so maybe along with working on collision detection you should also work on the way the ball bounces off the paddle, but thats just my opinion,you can do what ever you want because it's your game

Cocacola and Pepsi aren't that differnt. Deal with it.
eek
20
Years of Service
User Offline
Joined: 26th Dec 2004
Location:
Posted: 12th Aug 2006 00:48 Edited at: 12th Aug 2006 00:48
Well yeah. The ball doesn't actually "bounce" off the paddle yet. It just bounces when it gets to certain point, which happens to be where the paddle collision should be happening. I still have a ways to go on the game, most of the core is still unfinished. Thanks for the help.
Gamedesign er20
18
Years of Service
User Offline
Joined: 30th Jun 2006
Location: The one place you would never look...
Posted: 12th Aug 2006 01:12
Your wellcome, I look forward to playing the finished game in the future

Cocacola and Pepsi aren't that differnt. Deal with it.

Login to post a reply

Server time is: 2025-05-25 06:22:34
Your offset time is: 2025-05-25 06:22:34