Important alert: (current site time 7/16/2013 3:21:30 AM EDT)
 

winzip icon

DirectDraw Sharks

Email
Submitted on: 12/29/2000 7:31:58 AM
By: Mark van Renswoude  
Level: Intermediate
User Rating: By 27 Users
Compatibility: VB 5.0, VB 6.0
Views: 24247
author picture
 
     This program uses DirectDraw 7 to display sharks swimming around and other stuff (check the screenshot). I created this because I 'discovered' class modules to move sprites around which simplifies the code alot, and allows easy implementation of more sprites. The sprites have been taken from the SNES game 'Donkey Kong Country', that explains the monkey :-). The program runs really great, even on my P133 with 1000 sharks... maybe someone could help me create a screensaver out of this? As usual, please leave feedback so I know what people think about it...

 
winzip iconDownload code

Note: Due to the size or complexity of this submission, the author has submitted it as a .zip file to shorten your download time. Afterdownloading it, you will need a program like Winzip to decompress it.Virus note:All files are scanned once-a-day by Planet Source Code for viruses, but new viruses come out every day, so no prevention program can catch 100% of them. For your own safety, please:
  1. Re-scan downloaded files using your personal virus checker before using it.
  2. NEVER, EVER run compiled files (.exe's, .ocx's, .dll's etc.)--only run source code.
  3. Scan the source code with Minnow's Project Scanner

If you don't have a virus scanner, you can get one at many places on the net including:McAfee.com

 
Terms of Agreement:   
By using this code, you agree to the following terms...   
  1. You may use this code in your own programs (and may compile it into a program and distribute it in compiled format for languages that allow it) freely and with no charge.
  2. You MAY NOT redistribute this code (for example to a web site) without written permission from the original author. Failure to do so is a violation of copyright laws.   
  3. You may link to this code from another website, but ONLY if it is not wrapped in a frame. 
  4. You will abide by any additional copyright restrictions which the author may have placed in the code or code's description.


Other 7 submission(s) by this author

 


Report Bad Submission
Use this form to tell us if this entry should be deleted (i.e contains no code, is a virus, etc.).
This submission should be removed because:

Your Vote

What do you think of this code (in the Intermediate category)?
(The code with your highest vote will win this month's coding contest!)
Excellent  Good  Average  Below Average  Poor (See voting log ...)
 

Other User Comments
12/29/2000 10:32:37 AMCovertLoop

This has got to be the BEST show of animation I have ever seen on PSC. If you vote this program bad, something is definitely wrong with you. 5 from me.
(If this comment was disrespectful, please report it.)

 
12/29/2000 10:42:06 AMAckbar

This is great. It's smooth, fast, and looks cool. Great job. 5 from me as well.
(If this comment was disrespectful, please report it.)

 
12/29/2000 11:17:11 AMChris

Ditto...
(If this comment was disrespectful, please report it.)

 
12/29/2000 11:26:04 AMPowersoft Programming

Wow, all the positive votes and comments for something I though to be just a simple DirectDraw test...
Thanks, I really appreciate it!!
(If this comment was disrespectful, please report it.)

 
12/29/2000 3:07:37 PMViper Tec.

You should add AI to this. Diddy trys to avoid the sharks, but if one hits him, it makes him jump back or something. That would make this one cool screensaver.
(If this comment was disrespectful, please report it.)

 
12/29/2000 3:24:57 PMPowersoft Programming

Well, I won't be updating this, since I'm working on a DirectDraw RPG Engine (with Map Editor) right now, I just hope this project helps people starting with DirectDraw...
(If this comment was disrespectful, please report it.)

 
12/29/2000 5:10:39 PMSimon Price

This is really cool. I say that even though the first time I tried it, the program messed up my screen, only filled one corner and the transparency didn't work (I could see overlapping purple rectanges on every sprite). That was because the program wouldn't change my display mode to 640 x 480 x 32, since I only have up to 24 bit color. So I changed the code to 24 bit color and it worked brilliantly. Very clever animation, I think the term is called parallel perspective that you used on the bubbles. 5/5 from me. You know what to do to improve this (just in case..., enumerate monitor display modes so your program doesn't mess up on us people who have cheap monitors!).
(If this comment was disrespectful, please report it.)

 
12/30/2000 9:05:06 AMNathan Chere

Looks awesome... I'd be glad to send you a tutorial I made on making screen savers in VB if you're so inclined. 5 globes from me!
(If this comment was disrespectful, please report it.)

 
12/30/2000 9:11:33 AMPowersoft Programming

I found some really good screensaver examples here on PSC, and if I get enough votes for this, I will add the AI and convert it into a screensaver...
(If this comment was disrespectful, please report it.)

 
12/30/2000 2:24:38 PMiawix

FINALLY! VB animation beats SNES animation!! 5 Stars! You're the only one whos been able to do it!
(If this comment was disrespectful, please report it.)

 
12/30/2000 3:20:07 PMAndrew Killer

Excellent, i really must learn DX someday :D
(If this comment was disrespectful, please report it.)

 
12/30/2000 5:14:13 PMNathan Chere

I said before that it looks awesome but when I downloaded it I was far from impressed. There was no transparency just purple backgrounds, the window is obviously only catered for 640x480 displays and it made the rest of the screen outside that box turn to fuzz, and it crashes VB whenever I exit from it. I change my vote to a 2 (I'm gonna be REAL unpopular around here now).
(If this comment was disrespectful, please report it.)

 
12/30/2000 5:16:01 PMNathan Chere

Gotta admit though, you did a great job of ripping the sprites from DKC
(If this comment was disrespectful, please report it.)

 
12/30/2000 11:16:10 PMDarkSkies

I too had the problem with the display as I had
my resolution set to 16bit changed it to
32 and no problem. Nice Job, a big 5 here!
(If this comment was disrespectful, please report it.)

 
1/7/2001 11:35:22 PMHEllRiZZer

What Map Editor r u using? the one u made by urself or a Advanced Map Editor/RPG Editor?
(If this comment was disrespectful, please report it.)

 
1/8/2001 3:21:27 AMPowersoft Programming

I'm creating one myself since the maps will have it's own data format.
(If this comment was disrespectful, please report it.)

 
1/9/2001 3:47:50 PMRobert

This is great, its the first Animation i've got off PSC thats actually worked on my ancient p166.
(If this comment was disrespectful, please report it.)

 
1/15/2001 3:42:16 AMNathan Chere

Hehe... I'm going to be a pain in the @ss and change my vote AGAIN... but this time back up to a 5 because while the actual program was nothing special it's helped me heaps with learning how to display 2D stuff in DX.
(If this comment was disrespectful, please report it.)

 
1/16/2001 2:38:34 AMPowersoft Programming

Well, better late than never ;-)

But seriously, I'm glad this program was able to help you out.

Btw, thanks everyone for helping me win the PSC Coding Contest!!
(If this comment was disrespectful, please report it.)

 
1/16/2001 12:15:31 PMDustin_00

For those seeing the Magenta (Pink) boxes:

Take the bmps and turn all black pixels to (0,0,1) (1 blue), then turn the (255,0,255) to (0,0,0). Since the program isn't attaching the transparency to the color palette to get it's real value, only Black (and I think White) are going to work across all color depths.
(If this comment was disrespectful, please report it.)

 
1/28/2001 11:19:17 AMturb

Tryed it got this error:Run-Time error "2005532447(887600e1)": Automation error:I'm not familar with this code so is it simple? Thanks
(If this comment was disrespectful, please report it.)

 
2/21/2001 5:48:39 AMRogier

Really nice done! To create a screensaver of it ren the .exe to .scr and make it start with the /s param or options with the /p good luck and keep up the good work
(If this comment was disrespectful, please report it.)

 
2/21/2002 1:02:28 PMChase Gale

Very Impressive. Although after looking through the code, I've reassured myself to keep my day job doing business apps =). 5 Globes from me.
(If this comment was disrespectful, please report it.)

 
6/9/2002 2:06:53 PMAML

I changed my colour to 32 and it worked only the rest of my screen screwed up. 5 globes.
(If this comment was disrespectful, please report it.)

 
5/8/2003 1:45:54 PMA1Programmer

Looks great... But its just 2d images... nothing special...
(If this comment was disrespectful, please report it.)

 
6/12/2003 10:03:46 PM

Excellent sample program. :) Keep up the good work.
(If this comment was disrespectful, please report it.)

 
2/7/2004 1:42:40 AMPaoPao

you got 5 circles from me! thank you for posting a tutorial of this kind and i would like to ask you if i can reuse your code for my undergraduate thesis? these codes have the same function as what my undergrad thesis would be. if ever i can finish my program, i would love to give you a copy from the modified project. my thesis is a game where a fisherman will catch fishes. if you can give me a suggestion, you can email me at paolo_parungao@yahoo.com. thanks and more power!
(If this comment was disrespectful, please report it.)

 
6/7/2004 8:49:40 PMMunkee

how would i set a background picture?
(If this comment was disrespectful, please report it.)

 

Add Your Feedback
Your feedback will be posted below and an email sent to the author. Please remember that the author was kind enough to share this with you, so any criticisms must be stated politely, or they will be deleted. (For feedback not related to this particular code, please click here instead.)
 

To post feedback, first please login.