Edit : The article is archived!, please refer to the my XNA Picking Tutorial
This is a simple XNA 3.1 app that I wrote to demonstrate how picking 3D objects works :)…
Make sure you first check the official picking sample, you can find it here (XNA GS4).
Okay back to my app…
What makes my sample different is that you can actually see the camera frustum & the mouse ray, here’s a screen shot:
as you can see there are three viewports here:
1- Right : The main game scene, camera used : camera1…
2- Left : in this viewport the whole scene is rendered again and can be seen using a second camera (camera2), camera1 is visualized here, camera1 frustum, near/far planes and mouse ray are all rendered here so that you can see how picking works ;)…
3- Bottom : Instructions & info.
Both cameras are free look cameras similar to Counter-Strike free look cameras…
rev.1 : Fixed cam frustum bug where the tip of the frustum were stuck on some computers, fixed a typo.
Interested in programming details?
In this project you can find a free look camera class called Camera , there’s also a second camera class which is VisualCamera.
VisualCamera class inherits from Camera class and adds Read more…
In Part I , I talked about changing the spawn time using two methods : console screen , changing game files, So you see you can do much by changing the game files…. 🙂
In this article (and the next one) I’m gonna show you how to make a weapon shoot whatever you like, change reloading times and more…
For example, you can make a pistol shoot a heat seeking missile, you can create walls with your gun!…
Before starting you must understand that almost every thing in the game is an Object!, bullets ,missiles ,grenades ,sand sacks…all these are objects.
So what we’re going to do is simply opening the .tweak file associated with a certain weapon and change the line that specifies the projectile object for that weapon…
Here’s the line that specifies the projectile object of the M4 rifle (used by USMC Special Forces Kit):
What this line does is making the M4 rifle shoot projectiles of the type M4Projectile, By changing this line we can make this rifle shoot almost anything!.
Where can I find those .tweak files?
In your Battlefield2 root directory search for a file called Read more…
Battlefield2 is an amazing shooting game, although the game is a little old (2004) it’s still worth playing! 😉
The game is a military game, you can enjoy a collection of real weapons,vehicles and of course high graphics, you can play in many vast maps!
Changing Spawn Time:
Let’s say we want to change spawn time to 3 seconds! Two ways I’ve found:
Eid al-Fitr is a festival celebrated by Muslims after fasting month of Ramadan 😀
Happy Eid! 😀
Right now I’m working on terrain manipulation & rendering…
I’ve done some basic terrain rendering in the past using the Brute Force approach, What I’m trying now is the LOD (Level Of Detail ) algorithm!
I’m having some difficulties now with the normals 😦
The quad tree implementation is almost finished, right now I’m rendering the terrain using the highest level of detail ( always going to the leaves of the tree & render them ), of course that will be fixed later after I’m done with some issues like normals & some optimization…After all, what benefit is LOD without increasing the performance? 😀
Here’s a screen shot, the terrain is rendered in wireframe! no one will stand the way it looks in the solid FillMode ( the normals issue 😦 )
I painted the height map using only Windows7 Paint
I hope that I can complete this project, then I might add some trees & grass ( It’s time I learned BillBoarding ) & of course fill the river with animating water!
Note: gamasutra articles are more than one page! you can view all pages within one browser tab, just click the printable version button
As you can see, the server is under maintenance!
Usually I only upload my files to mediafire which makes sharing files easier, I have a free account there and it works fine! resume capability is available & the server is fast! 😀
The files are still there! It’s only a mater of time… 🙂