More servicesWindows Live
HomeHotmailSpacesOneCare
 
MSN
Sign in
 
 
Spaces home  Toni Greco's SpacePhotosProfileFriendsBlog Tools Explore the Spaces community

Blog

March 05

NXC and C# applications to test NXT features

The NXC application (that use BTlib.nxc made by Daniele Benedettelli) is a sample to test NXT motors/sensors/buttons/display/bluetooth
(default ports connection) features.
To test a remote control via bluetooth you can use the C# application included.
 
Steps tu uses both (C# and NXC) applications together:
1) Turn on NXT.
2) Run C# application and click connect.
3) Wait until connection is active.
4) Run NXT application (FeaturesTest1.nxc).
 
Download source code:
 
NXT FeaturesTest1 diplay NXTRemoteCommander (C#)
 
December 21

My self in ASCII art

Click to this link to see me in ASCII art: Toni Greco. A bocca aperta
December 11

Console Game Application that use ASCII art

These console applications shows that is possible to write a simple videogame just knowing only the basics things (not array, not method, ...) about programming  using C#.
 
The first sample just the basic to start to work, the second one is little bit more complete.
 
User help
Press any key to close intro animation screens.
Press Esc to quit while playing.
Use left and right arrow to move your ship.
Use space bar to shot (only one shot can be on screen a time).
 
Hints
Imperial Shuttle is unvulnerable.
The caption of console window show title and user/computer points,
for example:
                 Console Stars Battle (5 - 3)
The program terminate when user and/or computer gains 100 points.
Try it in full-screen too (Alt-Enter keys).
 
To download these projects:
 
 
Console Stars Battle 1Console Stars Battle 2
 
 

A simple blog editor built with Flex

This sample use Flex (Builder demo version or free command line SDK) to build a Flash (version 9 required) web application.
This application is a simple blog news editor.
 
You can download Flex Builder and/or SDK starting from here: http://www.adobe.com/it/products/flex/flexbuilder/.
To work only with SDK i suggest to use JEDIT (http://www.jedit.org/) following instructions explained here:
This sample uses SQL Server and .NET Handler.ashx (C#) in server side.
 
At this time login/register parts are not implemented, so you can try application clicking to login (or Cancel to enter in read only mode) without write name annd password.
 
Link to try apllication: http://www.tonigreco.it/blog/blog.html.
Please don't change the content of news already inserted, if you want you can add one or more and edit these.
Some times i will delete the news added not bt me.
 
 
Below here you can see some pictures, SQL Server table too.
 
Flex Builder Flex & JEdit
August 21

AJAX, JSON, ASP.NET(C#), SQL-Server simple sample

Building a web site we can use many different technologies. This example show how integrate AJAX with data in JSON format. Data is build from  ASP.NET page (code in C#) reading from remote SQL Server.
 
To see the example at work click here: http://www.tonigreco.it/DBtoAJAXrequest2005/.
 
Javascript source code is adapted by me from article by Alessandro Lacava (http://www.alessandrolacava.com).
 
To download the project: http://www.tonigreco.it/_xna_/download.asp?name=DBtoAJAXrequest2005.zip.

When security is a concern it is better to use a JSON parser: http://www.json.org/js.html.
Javascript parser source code: http://www.json.org/json.js.
It's also a good idea to use a "JavaScript Verifier": http://www.jslint.com/.
July 15

Conchiglia 2007

<This news is only for italian school, so it's in italian language>
 
Dal presente link è possibile scaricare un documento PDF riguardante gli adempimenti per l'esame di stato di quinta superiore, con particolare riferimento al programma Conchiglia: Conchiglia2007.pdf.
 
Il presente documento è stato redatto, la prima volta, dopo aver terminato gli esami di stato del 2005 ed aggiornato dopo l’esame del 2007. In entrambi i casi ho utilizzato alcuni appunti e tutto quello che sono stato in grado di ricordarmi. Ne consegue che non si tratta di un documento ufficiale e che probabilmente conterrà vari errori ed imprecisioni. Se, per un prossimo esame, lo volete utilizzare come supporto di riferimento non dimenticatevi che lo fate a vostro rischio e pericolo, e che l’autore del presente documento non può essere ritenuto in alcun modo responsabile per problemi, errori, omissioni e quant’altro derivi dall’utilizzo - parziale o completo - e dalla consultazione del presente documento.
July 11

Path Finding test with Lego NXT

This time the NXT robot try to follow a path on the same route used with RCX robot.
Downloads:

Second pic shows a custum block example. Using blocks can make the projects more short and nice .

June 28

First tests with Lego NXT

The first NXT robot I built it's about the same that paper manual show.
I added a touch sensor on the arm, I raised ultrasonic sensor (now it work better). I maked also some other little changes too.
 
Here the connections list:
 
PORT DEVICE
A Arm Motor
B Right Wheel Motor
C Left Wheel Motor
1 Touch Sensor
2 Audio Sensor (Microphone)
3 Forward Light Sensor
4 Ultrasonic Sensor (Distance)
 
The first program (pic 2) simply read light sensor (other version read also the ultrasonic) to show on display.
The second program (pic 1, but use this link to see it better: http://www.tonigreco.it/_xna_/download.asp?name=FindHitRedBall.jpg), after an audio command, make robot advances until it's near to the ball, then it try to center on it (to see better its color), then it try to hit the ball.
You can also see the movie of second program:
 
MINDSTORMS Projects:
May 07

Working to extend AnimationPlayer of "Skinned Model Sample"

I am working to extend AnimationPlayer. Here a list of what i wanna add.
  1. blending two animation clip (track/AnimationSet)
  2. blending betweens two consecutive keyframe transform (so they can be less numerous)
  3. store bone name to quick search for these uses:
    1. add some vertex to selected bone: I use these to find, for example, where a line of a blade sword is, for collision test
    2. add a transform to a bone: I use it, for example, to calculate transform of sword mesh to put it in hand of animated model
    3. set for each bones (and its soons) to use a specific clip animation (AnimationSet)
  4. inverse cinematic, for example, to rotate model head so it look at a specific direction
  5. using only one instance of the same FX file
  6. add shadow map (and post filter) and better light calculation in FX file (4 light max)

Here some pictures:





Go to site download area to see some movies: click here.

The source code will be downloadable from my blog pages when it will be completed.
At this time is not completed, I am working on other features, but not very fast, just in free time.
Source code has many dirty parts inside, because I am doing many experiments, I also will clean it before share it.
I will write here (in this post) code progressions, and also when it will be ready for download.
April 18

My Lego Mindstorm experiments with my students

I started to make some experiments with Lego Mindstorm RCX, to make some lessons for my school students.
I use leJOS plugin for Eclipse to work with Java.
 
To see an example:
 
To see a movie about path finding RCX robot:
 
 
March 09

My collaboration with Mphinite

I started a collaboration with Mphinite to look for potential companys interested to their services.

Mphinite supplies Engineering Design (CAD/CAM/CAE) services:
 
  • 2D/3D modelling design (conversions too, also from paper support)
  • mechanical simulation (static, dynamics and for the vibrations)
  • thermal simulation
  • numerical control programming
  • multimedia (animated 3D movies for presentations, publicity, and for "electronic handbook" of the apparatuses
The MPHINITE has a long experience in these fields and offers its services at competitive prices.

In my "Mphinite album" on the right you can see some examples of their works.
To see some movie examples please click these links:
If you want more info you can write to me at
  
(I am sorry for this antispam precaution)
 
March 08

XNA Skinned Model Sample

 
At the end an animated sample from Microsoft comes: XNA Skinned Model Sample.
Dowload it from "Creators Club Online":
More good samples from this link:
 
I will use this sample to convert my "Dwarf VS Ninja fighting game" project from C#/MDX to XNA: you can see it in second picture.
Last picture shows a shadow map test.
First picture shows the "MD2/MS3D to X converter" (and Mesh Viewer). I wrote it from application wrote by Jim Adams for the "Advanced Animation with DirectX" book. With my extensions it is possible to save, in X file, many AnimationSets from one animation track stored in MD2/MS3D file.
March 05

Who I am in few words

Name: Toni Greco
Born: 1963/02/19 at Cesena (Italy)
 
Married with Susanna Favali - the girl of my dreams
 
Bachelor: Electronic Engineer
 
Programming Linguages
  • Assembly 80x86
  • Pascal
  • C/C++
  • Java
  • Visual Basic 6
  • HTML/DHTML javascript
  • ASP
  • .NET/C#/ASP.NET
Jobs
  • Teacher of computer science (at ITIS Cesena and, for two years, at University)
  • Programming of "3D World Tennis" (a 3D game for DOS sold in Italy)
  • Magazine writer (DEV - Infomedia)
  • Managerial Applications writer (VB6/SQL/Access)
March 04

Moon Eclipse

I taken some photos during the moon eclipse at 03/03/2007.
I used OLYMPUS µ740.
March 02

3D Studio Max short Movies

3D Studio Max is a wonderful application.
My school students and I tryed Trial version (8 and 9), here you can see some pictures and movies from these experiments.
For the walking girl I used DAZ Studio.

Go to dowload area or click links below:
Simple animation
Cylinders animated with bones
A man walking in the street
Particicles animation
Physics simulation
Visibility animation
Walking in city street (slow version)
March 01

New Game Editor

At the end I have decided to not use XNA to build my videogame editor: I think XNA is not the best for this task.
Probably I will write a player using XNA too.

This last version uses C#, Managed DirectX and one DLL written in C++ unmanaged.

  • The first photo shows old version written using C++ and DirectX.
  • The second photo shows current interface of  "3D Game Editor".
  • The third photo shows first version written - some years ago - in VB6/C++ and using OpenGL.
November 30

Rendering to Form's PictureBox (for XNA GSE Beta 2)

This sample show how to render a 3d object (textured cube) to picturebox.
You can use some keys to move camera and click to button to reset view to starting point.
If you resize form the projection matrix it is updated automatically.
It work with XNA GSE Beta 2.
November 16

Interactive 3D graphic application (XNA GSE Beta 2)

Tutorial 2 - from XNA help and forum community contributes - by Toni Greco

This sample show how to load/draw 3D models and move the camera to all directions using keyboard.

It uses three kind of 3D objects:
FBX file (ship),
X file (asteroid),
low level with vertex buffer (cube).
All three cases can be rendered using standard basic effect, or HLSL fx file:
see the first rows of Game1.cs to choice which rendering type to use.
Link to download the project:

A 2D sample code for my Tutorial 1 (XNA GSE Beta 2)

I converted the code to use in my first tutorials for my students (I teach computer science in a secondary school) to Beta 2.
 
Please feel free to write suggestions and/or use it if you like.

/// <summary>
///
Tutorial 1 - from XNA help and forum community contributes - by Toni Greco
///
_Interactive 2D graphic application_
///
_ XNA Beta 2 _
///
Features:
///
resizable window
///
toggle fullscreen/window mode (type Home-Enter)
///
control player ball with arrow keys
///
background fixed (bitmap from Beta 1 Spacewar demo)
///
XACT sounds
///
press Esc to exit
///
it shows fps using XNAExtras (the same from Beta 1)
///
it don't try to maximize fps (vertical sync. = true) to avoid flicker in fullscreen
///
simple collision test/response circle to circle
///
sprite with transparent and semi-transparent pixels (alpha channel in dds)
///

///
Special thanks to Gary Kacmarcik sharing his
///
"Creating Bitmap Fonts using bmfontgen".
///
I used here the same version that Gary Kacmarcik wrote
///
for XNA Beta 1, but it work without changes, but remeber
///
to make its resource (PNG and XML files) not buildable from Visual Studio.
///
In XNA Beta 2 we can load (and then use) textures at run time
///
like in beta 1 without build it to xnb files, but is not recommended.
///

///
If I don't call audioEngine.Update() sounds work without problems for me,
///
but it is better to call it to be sure it work in all cases.
/// </summary>

The link to download the project:
http://www.tonigreco.it/_xna_/download.asp?name=WindowsGame2D.zip