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.

2D All the way! / Need SomeHelp And Critque Of My code

Author
Message
JNice013
21
Years of Service
User Offline
Joined: 10th Jan 2004
Location:
Posted: 11th Jan 2004 02:27
I'm pretty new to DB but I am trying to create a 2d side scrolling shooter. I poste the code that I have as of now but here are the problems that I can get right

1 How can I prevent the sprite from going off the screen

2 Can't get animations to work with the sprite, I want it so that if the up key is pressed it will change the sprite to a different bmp but if it is let go of it switches back to the normal bmp

3 Must I use the scroll object texture command to for the screen to scroll or is it possible to make a bmp or image scroll

"The Infamous J Nice"
IanM
Retired Moderator
22
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 11th Jan 2004 16:27
1. Use a set of 'if' statements to stop you moving outside of reasonable limits

2. Check out the link below

3. Check out the link below

We get this question quite a lot, so I posted the code in the following link.

The background is made up from some (randonly generated) images.

The sprite-changing code isn't exactly what you want, but the basic idea is to just change the image that you use.

http://developer.thegamecreators.com/?m=codebase_view&i=dc2f1b35292009ad54b84331daee10ef

For free Plug-ins, source and the DBPro Interface library for Visual C++ 6 and .NET
http://www.matrix1.demon.co.uk
comando 300
21
Years of Service
User Offline
Joined: 23rd Nov 2003
Location:
Posted: 11th Jan 2004 20:12
Quote: "How can I prevent the sprite from going off the screen"



here's the code



Is just of those days when you don't wanna wake up everything is *****, everybody sucks you really don't know why, but you wanna justify rippin' someone head off!
JNice013
21
Years of Service
User Offline
Joined: 10th Jan 2004
Location:
Posted: 12th Jan 2004 23:58
thanks for the help appreciate it

"The Infamous J Nice"

Login to post a reply

Server time is: 2025-06-30 02:40:07
Your offset time is: 2025-06-30 02:40:07