Archive for the ‘3D’ Category
Questo progettino in XNA che vi presentiamo è un semplice “simulatore di volo spaziale” dove il giocatore dovrà comandare un’astronave e distruggere tutti i nemici che incontra in mezzo al percorso.
Partiamo dal presupposto che la nave in realtà non va mai avanti (ovvero non modifica mai la sua posizione Z): poco più in basso del modello dell’astronave è infatti posizionato un modello simil-sferico (molto grande) che ruota in continuazione attorno al suo asse X, creando così un effetto di movimento in avanti molto suggestivo ed efficace.

Le astronavi si muovono verso il giocatore con un moto rettilineo uniforme, e viene fatto in continuazione un calcolo delle intersezione tra:
• bounding box di nemici e astronave (metodo TestCollisionBetweenShips)
• bounding box di nemici e i missili che lanciamo (metodo TestCollision)
A seconda del fatto che colpiamo o veniamo colpiti dai nemici, possiamo guadagnare o perdere punti (e vite). I punti appaiono in alto a sinistra in un HUD molto semplice. I nemici non sparano missili, però se “oltrepassano” l’astronave del giocatore, si perdono comunque dei punti… e siccome lo scopo del gioco è quello di arrivare alla fine del percorso (ovvero dopo una trentina di nemici) facendo il maggior numero di punti possibile, ovviamente bisogna cercare di eliminare più nemici possibili.
Dopo aver colpito 10 nemici, è possibile usare lo scudo (una sfera che ruota attorno all’astronave) premendo il tasto Z, che vi proteggerà dai nemici che vi vengono incontro.
Aggiungere nemici è molto semplice: c’è un metodo setOstacoli() chiamato da Update, che si occupa di specificare per ogni nemico:
• il modello da caricare, con eventuale texture
• eventuale ridimensionamento
• vettore di posizione iniziale da cui deve partire (X e Y in un intervallo ben determinato, mentre la Z quasi sempre a -4000)
• velocity vector
• quanti punti deve assegnare al giocatore, nel caso venisse eliminato
• quando deve apparire (scrivendolo in millisecondi)
• un’eventuale flag (is_vita) se la nave in avvicinamento non è un nemico ma una vita in più per il giocatore
Sono tutti attributi definiti nella classe GameObject, che si occupa di gestire tutti i modelli 3D.
thanks to: DeviantArt per i modelli 3D
Enjoy!
Rispogliavo vecchi lavori fatti in passato prima ancora di sapere cosa era un’esame universitario e dove le giornate trascorrevano molto più leggere di questi giorni passati a studiare numeri teoremi e definizioni.. Questo è un mio piccolo lavoretto fatto con Lightwave versione 7.5? Eh si, mi sa che è passato un bel pò di tempo dall’ultima volta che lo ho toccato!
Comunque vi regalo questo sfondo, che con qualche giusta modifica potrebbe diventare veramente carino
Io lo avevo fatto per il mio pc, datochè su internet non avevo trovato uno sfondo che mi piacesse, ed avevo voglia di imparare a usare un modeler 3D, ho fatto tutto di mano mia!
Heeeeeyyyy guys, I’m doing my best to keep on with courses, there goes the full source code I’m showing @ Uni in my Town:
Fist of all I want to show the full license, along with all files:
Microsoft Permissive License (Ms-PL)
This license governs use of the accompanying software. If you use the software, you accept this license. If you do not accept the license, do not use the software.
1. Definitions
The terms “reproduce,” “reproduction,” “derivative works,” and “distribution” have the same meaning here as under U.S. copyright law.
A “contribution” is the original software, or any additions or changes to the software.
A “contributor” is any person that distributes its contribution under this license.
“Licensed patents” are a contributor’s patent claims that read directly on its contribution.
2. Grant of Rights
(A) Copyright Grant- Subject to the terms of this license, including the license conditions and limitations in section 3, each contributor grants you a non-exclusive, worldwide, royalty-free copyright license to reproduce its contribution, prepare derivative works of its contribution, and distribute its contribution or any derivative works that you create.
(B) Patent Grant- Subject to the terms of this license, including the license conditions and limitations in section 3, each contributor grants you a non-exclusive, worldwide, royalty-free license under its licensed patents to make, have made, use, sell, offer for sale, import, and/or otherwise dispose of its contribution in the software or derivative works of the contribution in the software.
3. Conditions and Limitations
(A) No Trademark License- This license does not grant you rights to use any contributors’ name, logo, or trademarks.
(B) If you bring a patent claim against any contributor over patents that you claim are infringed by the software, your patent license from such contributor to the software ends automatically.
(C) If you distribute any portion of the software, you must retain all copyright, patent, trademark, and attribution notices that are present in the software.
(D) If you distribute any portion of the software in source code form, you may do so only under this license by including a complete copy of this license with your distribution. If you distribute any portion of the software in compiled or object code form, you may only do so under a license that complies with this license.
(E) The software is licensed “as-is.” You bear the risk of using it. The contributors give no express warranties, guarantees or conditions. You may have additional consumer rights under your local laws which this license cannot change. To the extent permitted under your local laws, the contributors exclude the implied warranties of merchantability, fitness for a particular purpose and non-infringement.
Hi folks!
I’ve been doing basically documentation on my sources. But will takes too long to post it about, so I’ve decided to release all source and post documentation later.
So here the full surce code of my last seminar on 3D UI plus a 2h & 30 video (in italian) explaining all stuff!
I’ve took some example code from various sites so now I’ll put here those I can remember, and later I’ll add all the rest for sure!
Thanks to Sacha Barber for his cool Sonic Player, Rob Burke for his wonderful work for javazoom porting to .NET, Ian G for the coolest work with harmonics example with .NET, my brother Xarabas for helping me in FFT algorithm (kinda hard hu?
all explanations in!)
Here goes some screenshots on what you’re gonna find in src 

Here goes all source:
Multimedia Player (some bugs still occur)
UI 3D Animation (with shaders)
How to use Blur Effect (Pixel Shader)
How to use Fade Effect
How to use Pulse Effect (Pixel Shader)
How to use Glow Effect (Pixel Shader)
UI Speech Recognnition in WPF
And the 2:30 hours video! (hey took me some days
)
Enjoy it! Comments apreciated
-dave






