Advertisement

Results for "Author: mark van renswoude"

6_2008-2009 #197857
Direct3D -> 2D Part 3, Alpha blending!!!

I'm back, with Part 3 of creating 2D graphics using Direct3D. Part 3 is built on top of Part 1, still displaying the Mario character running around in circles, but contains some additions which I just found out: Alpha blending! (you can change the alpha value, as shown in the demo) Faster way of faking light! (this time, not using vertex color, but simply drawing a bitmap alpha-blended over the scene, more accurately simulating lighting) Using DirectDraw in combination with Direct3D! (allowing for large surfaces to be drawn, like the background) The 33 FPS in the screenshot are from my P133, however, if I turn off the background it instantly goes to 60 FPS (the maximum, since that's my monitor's refresh rate)... Enjoy! And don't forget to leave comments (and vote!)

6_2008-2009 #197858
Direct3D -> 2D

This program shows you how to use Direct3D to extend 2D games/programs. It uses no lighting or matrices or other more advanced Direct3D stuff, just shows you how to use rotation. Very basic, but allows you to do more then DirectDraw (or at least faster). Just hope someone could use this. Don't forget to leave comments (and vote)!

6_2008-2009 #197859
Show all Domains and Computers in LAN

After searching for this without results for about a year, I put all little bits of code I have found together and created these two Class Modules. One Class Module handles the enumeration of the Domains / Workgroups in your LAN, the other handles the enumeration of the Computers available in a specific domain. Included is a small demonstration program (as shown in the screenshot). Because of the Class Modules, you can easily add this functionality to any other program. This has only been tested on Win98 SE (so it does work on Win98, not like most other examples I have found, they only worked on WinNT). If anyone has problems with the enumeration on certain systems, please let me know so I can work it out. As usual, please leave comments, and vote if you like.

6_2008-2009 #197860
DirectDraw Sharks

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...

6_2008-2009 #197861
Better moving form

While looking at somebody else's code, I noticed he was doing all sorts of stuff with the MouseDown and MouseMove events. Here's a better way, it captures the WM_NCHITTEST message which Windows sends to make Windows think the user is clicking on the titlebar, thus moving the form...

6_2008-2009 #197862
Flat menu

An example of ownerdrawing a menu. But, in contrast to most samples, this one also paints the border of the menu... Next on my list is painting bitmaps on the menu for full customization, but this is a little more complicated if the borders are more than 3 pixels wide... Hope this helps :) (btw, had people test it on Windows XP, worked fine too)

7_2009-2012 #220373
Bungee Baby

The original idea, graphics and sound came from an email I got with some JavaScript code to perform the same, but it was incredibly slow, so someone asked me to create a stand-alone program out of it, and this was the result. It demonstrates the BitBlt and LineTo API, and GetTickCount used in a loop. And furthermore, it's fun! :) Just hope this helps in some way, please leave comments and don't forget to vote!

7_2009-2012 #220374
Direct3D -> 2D Part 2, Faking Light!!

After figuring out how to rotate 2D sprites using Direct3D (check my other submissions), I wanted to do lighting. After reading some tutorials I gave up, they all used 3D, while I wanted to do 2D. There are other ways of faking light; making tiles in multiple shades at either design time or run time, but they're limited... So here it is: faked light using Direct3D to simulate 2D! It looks great, runs fast (if you've got a 3D card, my P133 with Voodoo 3 could easily run it, although not on software rendering mode), and allows dynamic setting of light brightness and color. So how does it work? Easy: it sets the color of a vertex (corner) to the brightness of the light at that specific place, after which Direct3D automatically adjusts the texture! Some limitations though: Light might seem choppy when moved (like in the example), but static lights will do much better... the smaller the tiles, the less you'll notice it, but I didn't want to fill the screen with 8x8 sized tiles... This won't work with multiple lights or multiple colors of lights, you'll need to adjust some algorithms for that to work. I'm working on this problem, if I finish it, I'll post it here offcourse. Enjoy, and don't forget to leave comments and vote! (You're free to use this code in your own programs/games, but I would appreciate it if you gave me some credit, thanks!)

7_2009-2012 #220375
Direct3D -> 2D Part 3, Alpha blending!!!

I'm back, with Part 3 of creating 2D graphics using Direct3D. Part 3 is built on top of Part 1, still displaying the Mario character running around in circles, but contains some additions which I just found out: Alpha blending! (you can change the alpha value, as shown in the demo) Faster way of faking light! (this time, not using vertex color, but simply drawing a bitmap alpha-blended over the scene, more accurately simulating lighting) Using DirectDraw in combination with Direct3D! (allowing for large surfaces to be drawn, like the background) The 33 FPS in the screenshot are from my P133, however, if I turn off the background it instantly goes to 60 FPS (the maximum, since that's my monitor's refresh rate)... Enjoy! And don't forget to leave comments (and vote!)

7_2009-2012 #220376
Direct3D -> 2D

This program shows you how to use Direct3D to extend 2D games/programs. It uses no lighting or matrices or other more advanced Direct3D stuff, just shows you how to use rotation. Very basic, but allows you to do more then DirectDraw (or at least faster). Just hope someone could use this. Don't forget to leave comments (and vote)!

7_2009-2012 #220377
Show all Domains and Computers in LAN

After searching for this without results for about a year, I put all little bits of code I have found together and created these two Class Modules. One Class Module handles the enumeration of the Domains / Workgroups in your LAN, the other handles the enumeration of the Computers available in a specific domain. Included is a small demonstration program (as shown in the screenshot). Because of the Class Modules, you can easily add this functionality to any other program. This has only been tested on Win98 SE (so it does work on Win98, not like most other examples I have found, they only worked on WinNT). If anyone has problems with the enumeration on certain systems, please let me know so I can work it out. As usual, please leave comments, and vote if you like.

7_2009-2012 #220378
DirectDraw Sharks

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...

7_2009-2012 #220379
Better moving form

While looking at somebody else's code, I noticed he was doing all sorts of stuff with the MouseDown and MouseMove events. Here's a better way, it captures the WM_NCHITTEST message which Windows sends to make Windows think the user is clicking on the titlebar, thus moving the form...

7_2009-2012 #220380
Flat menu

An example of ownerdrawing a menu. But, in contrast to most samples, this one also paints the border of the menu... Next on my list is painting bitmaps on the menu for full customization, but this is a little more complicated if the borders are more than 3 pixels wide... Hope this helps :) (btw, had people test it on Windows XP, worked fine too)

Languages
Top Categories
Global Discovery