Pages

Saturday, March 15, 2014

A small journey with XNA and C#

There is something I've done a year ago, but never shared. Although it looks simple, it can produce some beautiful views. Here a preview:

To try it out: setup.zip (source code: source.zip).

As for the commands:
- C: creates one particle (holding down for more possible)
- A: makes a new spawn point for the particles
- D:  creates a "pull gravity" at the cursor's position
- P: creates a "push gravity" at the cursor's position
- V: creates a pull-point over the given location
- B: creates a push-point over the given location
- 1: increases gravity pull range
- shift+1: decreases gravity pull range
- 2: increases gravity push range
- shift+2: decreases gravity push range
- +: make the dots larger
- -: make them smaller
- ESC: toggles the command prompt (up-arrow may be used for history access). Following commands are possible:
                                                            - "SET COLOR x y z" where xxx,yyy,zzz are in [000,255] (leading zeroes are needed for 3 digits!)
                                                            - "ADD x" adds x new dots at random positions
                                                            - "REM x" removes x random dots
                                                            - "CLEAR" clears the everything
                                                            - "SAVE" saves the state and "LOAD" loads it

Have fun!

No comments:

Post a Comment