Would like help with powerups in my game after lesson 14.
Would like help with powerups in my game after lesson 14.
Hello Chili and everyone. Ive made this game after lesson 14. This a ship game I've recently made. I fixed the game from crashing. I get the The speed boost and the backwards boost to work.But I would still like to get the 3 bullet shoot powerup and the orb defender powerup to work before i post my game on the forum. Object of game don't let ships get to bottom of screen and to don't get hit by the ships bullets. Controls: up, down, left, right, and space to shoot and enter for menu select.
- Attachments
-
- Chili DirectX Framework - shipgame - Copy.rar
- (664.57 KiB) Downloaded 345 times
Last edited by cameron on July 23rd, 2012, 2:37 am, edited 8 times in total.
Computer too slow? Consider running a VM on your toaster.
Re: Help with my first game after lesson 14.
it didnt crash for me
What you call a bug...I call a new feature!
Re: Help with my first game after lesson 14.
it happens under some circumstances that I dont know of it always crashes for me once i get into it.
Computer too slow? Consider running a VM on your toaster.
Re: Help with my first game after lesson 14.
I think i may have made some mistakes in my code.
Computer too slow? Consider running a VM on your toaster.
- magusofmirrors
- Posts: 56
- Joined: May 12th, 2012, 10:03 pm
Re: Help with my first game after lesson 14.
You think? ...cameron wrote:I think i may have made some mistakes in my code.
Yeah, just use debugging skills that chili teaches and you should be able to hunt it down.
The admins are coming!!!
Re: PLEASE HELP with my first game I made.
The first step of debugging is identifying the conditions for reproduction of the bug. Without this information it is very difficult to debug a program.
Chili
Re: PLEASE HELP with my first game I made.
Just a quick tip, I noticed that you had some logic in the compose frame function. You should always put logic in a function, sometimes a little is ok in the compose frame, but you had a lot.
MOOOOOO
Thanks for the help.
Any tips/comments were helpful i have fixed most of the errors. Maybe ill post my finished game on the forum .But im still trying to figure out how to get the speed boost to work out.
Computer too slow? Consider running a VM on your toaster.
Re: PLEASE HELP with speed boost collison.
A speed boost is easy to do. You need to add another variable (you should probobly use a float) and you need to add it to your drawing function. Set the value of the variable to 0. Then add a conditional statement, for example:
You need to test for the kbd.RightIsPressed() because the speed is positive. You also should have a ySpeed variable so that you can tests for the case that up or down is pressed. You also need to change the value's according to the direction that they are going. I hope this helped
Code: Select all
if (kbd.EnterIsPressed && kbd.RightIsPressed())
{
xSpeed = 3;
}
MOOOOOO
Re: PLEASE HELP with speed boost collison.
No i want it to be like a powerup that falls from the top of the screen and if your ship and the power up overlap it increases your speed for a certain amount of time. I cant get the collision of the powerup and your ship to work. Sorry for the confusion.
Computer too slow? Consider running a VM on your toaster.