Results for "Author: peter wilson"
This application is a simple and clear demonstration of the DotProduct in two dimensions. The DotProduct is almost always used by game programmers, especially in shooting games like Unreal Tournament. The DotProduct allows the programmers to decide is the user is pointing his weapon at a monster, a pickup or a door. The DotProduct is also used for Back-Face culling and lighting effects. You can even use the DotProduct for real world physics calculations like "Newton's Conservation of Momentum". In fact, this is the real reason I created this little demo. I'm currently working on my Asteroids game (also on PSC) and wanted the Asteroids to bounce off each other convincingly. Since angles were involved, I figured I could probably use the DotProduct to save on calculations. I needed a little refresher course in the DotProduct, thus this project was born. If you are not interested in the DotProduct, you may be interested in the Splash screen. It has a built in Ant Simulator which probably deserves it's own submission.
Watch Asteroids floating around in space bouncing off each other with the same realistic precision as billiard balls. No DirectX or OpenGL, just pure VB code that produces the most wonderful, mesmerizing zero-G display. This application builds on two of my previous submissions, namely the Asteroids game, and the DotProduct demonstration. It would be trivial to turn this into a 2D game of billiards. It’s also easy to change the shape of the asteroids into perfect speheres by adjusting variables in the “CreateRandomShapeAsteroid” routine. Comments are scattered everywhere throughout the code. As always, compile for speed. Press the space-bar to reset.
This VB code graphically shows the relationship between Sine and Cosine when drawing a cirlce. In my humble opinion, I think drawing a circle is the first thing all graphics programmers need to learn. Although it may look like I'm just plotting a single dot in a cirlce, there is another way of looking at this. You could say I am rotating the dot around it's origin. This is exactly the sort of code you will need to rotate a space ship around it's origin, ala 'Asteroids' style. In all my years of programming, I've never once seen an application such as this one. Hopefully, it will clear up what SIN and COS actually look like when plotted.
Learn how to create your own 3D graphics library without using OpenGL or DirectX, just pure VB code. Watch the scripted introduction complete with sound track! Walk or Fly around a 3D environment in a similar style to popular 1st person shooting games like Quake, Unreal Tournament and FarCry. Use a combination of the keys and mouse to look around just like you would in the professional games. The core 3D programming and is very stable; it won't change too much in the future, so this would be a good project to get familiar with. Comments are everywhere. If this 3D application is too complex for you, look up my previous work, especially "A 3D Lesson v2, Very Simple".
Rodger threw down the challenge to write an LED clock application in a few lines as possible. This is my solution, can anyone better this! If not, you may all kneel trembling before me and worship me as your new programming god ;-p
Watch 28 frames of animated cow walk all over your desktop and windows, munch on the grass and moo occasionally. I was inspired by a web site I found whilst researching another project. I downloaded the cow animation and thought I might as well have some fun with it. The code is a little messy because I just threw it together on a lazy Saturday night.
Simple game of leap-frog suitable for all ages. Uses multi-dimension arrays, images and bitmaps, drag-n-drop, simple game logic, auto-creation of new swamps, registry setting! Unlike other games, this one has a well-rounded finish to it, including help file. Code is commented, and does not assume too much VB knowledge. If you are not too good at Arrays, then you may need a quick refresher course, otherwise this is a good learning project for them.
This is a small application designed to mimick the look of Vacuum Fluorescent Displays (VFD). Use my VFD print method to enhance the look and feel of your next sci-fi game.
Originally started off as a lesson in Matrix Multiplication using 3D vectors; And by "3D vectors", I don't mean 3D computer graphics... I mean "vectors". I was actually half way through coding a 3D computer graphics program, when I decided I needed a refresher course in matrix multiplication... for you see to do 3D graphics, I actually use "4D vectors". Confused? Well... so was I, so I decided to drop back a dimension and learn all over from "2D graphics using 3D vectors", so that I could understand "3D graphics using 4D vectors". Anyway... so the matrix math is going well, when I think to myself, "Hmmm... maybe I should create an Asteroids game" Well... I'm half-way through debugging the AI routine for the enemy spaceships, when I decide that with all of my debugging graphics turned on, it looked kind of cool, so I thought you would want to see it before I pull out all the debugging graphics. The actually Asteroids game will probably be finished in another month or so. I don't want to release it until I've got a kick-ass AI routine for the enemy space ships (basically I want to make computer controlled ships, just as smart as human players)
Have fun flying around in 3D whilst shooting heat-seeking rockets at a UFO. Pure VB; no DirectX or OpenGL; I did all the maths myself. This is *** VERSION 8 *** - if you want to understand this code, I suggest you start with version 2 which is available on PlanetSourceCode... just search for "Peter Wilson" under the Visual Basic section. * The 'heat-seeking' rockets always point at the UFO. * The 'heat-seeking' rockets only have a short fuel supply, so after the fuel is exhausted they tumble back to Earth. * This is a quick-and-nasty submission.... there is heaps of unused code in here. * There's a few extra 3D models in the 'xfiles' folder - it's pretty easy to substitute values. * There's comments everywhere... I suggest stepping through the application using the F8 key (instead of pressing f5) * I promise to clean this up, and make a good game out of it... or something. I'm getting to the stage where I need to redesign my data structures a little better to accomodate the particle effects (like smoke, and bullets etc.)
Learn how to create your own 3D graphics library without using OpenGL or DirectX. This 3D application allows you to load DirectX data files into the application and view them in 3D. The virtual camera is cantered on the origin (although you can change this). Use the mouse to move the virtual camera around the object. This 3D application uses a Right-Handed Coordinate system (as opposed to DirectX that uses a left-handed coordinate system). The 3D maths is based on industry recognized standards as found in 'Computer Graphics Principles and Practice, Foley*vanDam*Feiner*Hughes'. The 3D maths uses column-vector notation and is very stable; it won't change too much in the future, so this would be a good project to get familiar with. This is a solid project that I will be improving on. I've listed the code as intermediate as I don't think its too hard to follow. Comments are everywhere. For those of you familiar with my previous works (look them up), this one does not have any fancy music or animation as it's focus is somewhat more serious.
This application can convert any True-Type Font into a series of polygons made entirely of straight lines defined by vertices. Possible Uses: Create your own 3D font applications ala "Xara 3D" style. Design assistance with large signs, corporate logos or banners. Create vector-style game graphics based on exotic fonts (ie. Wingdings)
I can't believe how much trouble I went to, to show you how to rotate objects (like a space-ship) around the Z-Axis. This should be a great learning project for people wanting to create their own vector-graphics games... like Asteroids.
Simple mouse trails using recursion. Move the mouse over the form to display a colourful rainbow of colours that follow the mouse movement. You'll enjoy this, if you like watching pretty colours dance about the screen.
TechniColor Mouse Trails using recursion. Move the mouse over the form to display a colourful rainbow of colours that follow the mouse movement. Click the mouse button to change the Offset values (and thus the patterns). You'll enjoy this, if you like watching pretty colours dance about the screen.
This is version three of my simple 3D lessons. The major update in this lesson, is the Virtual Camera code. You can move the camera anywhere (using the keyboard), and make the camera 'look at' a certain point. Only Dots between the Near and Far Clipping distances are visible. This 3D lesson includes some very advanced 'mathematical' topics, however I have listed the code as 'Moderate' or 'Intermediate' because you don't need to understand the advanced parts to have fun with this project.
Learn how to program in 3D using only Visual Basic - no OpenGL or DirectX. The major update in version 4 is the synchronization of MIDI music (2001 - A Space Odyssey) and 3D animation. I also wanted to experiment with some opening credits at the beginning. You can press the ESC key to skip the animation. The other major change is the various Camera variables have been cleaned up and placed into their own data type: 'mdr3DCamera'. You might also notice that I've created some additional data types (ie. mdr3DObject, mdrPolyhedron & mdrVertex). This is in anticipation of getting rid of the dots, and creating some lines drawings... should be exciting! Thanks go to everyone that has voted for my previous versions (look them up, they are easier than this one). The votes have helped me continue to improve this 3D application.
Demonstrates how to code an intelligent early warning collision detection system for a simple game of Asteroids. Uses matrix multiplication, vector maths and clearly demonstrates an excellent use for the DotProduct between two vectors. I placed this in the games section, because this is the start of a game, however I wanted to show you my debugging code before I pull it all out, as this debugging code very clearly demonstrates how to use the DotProduct between vectors. Making a good game is sometimes about Maths!
This 3D application shows you just how simple 3D computer graphics can be to program. Pure VB code and the only mathematics is division. Simple hey? Objects that are far away, appear smaller. Thus simply divide our 3D object's X and Y coordinates by it's Z coordinate. NewPixelX = X / Z NewPixelY = Y / Z That's all you need for 3D computer graphics, and that's all this program does.
Smooth animation, excellent wire frame graphics, No BitBlt, DirectX or OpenGL. Pure VB. You probably won't believe what a nice game you can make with VB. Very smooth vector-style graphics with unique pan & zoom functionality. This game is not finished, but that's only because I am putting so much effort into the actual game play. It's certainly not your average Asteroids game. I will repost occasionally as I get more functionality completed.