0

Just an update..

Its been q while since I had anything interesting to post up here so I thought I would do a catch up post for ya’ all.

Firstly I am still employed full-time as a coder. I develop client/server apps. Currently I am working on version 3.1 of PHP Season Pass The planned Java version (SkiPos) has been put on hold indefinably due to some people not being able to deal with change or new things and demanding to stick with the decades old systems they have. Not up to me that one. I do want to see it finished. If there comes a time I have nothing to do I’ll put some effort in to getting that compleated. The latest version of PHP Season Pass has a few changes to the data base and order management system to 1, limit orders to one per seaon per member 2. I ahve added the ability to sell products for any future season along side current season products on the same order. Talk was to make it so users would have to create orders for next seaon in this one was shot down by yours truly as the problems this would cause just grew in number the more I worked through the idea. With the creative use of accounting terminology and programing slite of hand I proved my solution to be the better and soe implemented it. All of 15 lines of code that it turned out to be. I have also improved the ‘on order member edit’ functions. Users can now edit member account details, clone members and take or upload member pictures right from the main order page. This was done with the addition of new Javascript and ajax code and a huge amount of testing. first opinions are that its sweet and will save a lot of time and prevent many of the problems users where having with duplicate member accounts.

OSD development is now on hold also. The users it has are happy with its current functionality so why poke at it. Further development of OSD will be on a per client request basis. Solutions developed for clients that are deemed to befits all users will be pushed up to the main branch where possible and practical. Also note that if no further development of OSD is requested by this time next year I will release OSD as an open source project for anyone that wants it.

As you may have seen here, I have started work on a game project called Dyson Wars. Dyson Wars is now my flag project. Details of it and the dev process can be found at dysonwars.com/deblog. Please check it out as I think its going to be an awsome game when compleated.

Lastly is my ‘tinker’ project called Survive this then! No site or devblog for this one yet. Its been in development for about three months now and I plan on a release just before Christmas this year. STT! is a top down 2.5D puzzle/shooter for the android and Windows markets. Simple in design and game play but massive on innovation and adictiveness. Using your own music play lists, this game tailors its graphics, game style and tempo to you. You decide what music you want in your play list and the game speed adjusts to match the beats of your tunes as you play. Play fast rock and get alien invasions, play classical and get butter flies and tweety birds. Play punk and get skin head mashers chasing you as you work to solve puzzles and earn coins to buy power ups and solutions or even new play styles when more are added. I plan on pushing out a simple limited/add supported version for free with the full version selling for around $2.00. The paid version will include more game themes, no adds, cheaper power ups and more levels.

Leigh

0

JMonkey Engine 3 : Example of vertex docking ( snap to grid ) mouse picking and more

Here is a test app to help explain how to find a vertex in a geometry and attach another geometry to the vertex…..

All that code below will give you something like this:

what it shows you...

what it shows you…

Check out the comments in the code for details on whats going on, but use the left mouse button to drag the yellow ball. The red arrow shows you where the pick is currently on the surface of the sphere. Release the mouse and the yellow ball sticks to the sphere. Enjoy. Press T to toggle snapping and watch as the yellow ball jumps from vertex to vertex..wow!.

UPDATE : I found an issue in my first version that caused the yellow ball to be placed in the wrong location if the picked geometry was moved from 0,0,0. This version shows how snapping can be done between separate geometries. I intend to write a better demo to show how to move nodes around and dock them to other nodes using this method. Watch out for that next week.

The Main file. You will need the mouse sensor control below also.

MouseSensor.java

0

JME3 Eight point rotation control for spatial on the guiNode

This control class adds eight points of rotation to a spatial. this version was written for use with a spatial attached to the GUINode. It can be applied to Nodes on the rootNode as well with just a bit of tweaking.

this is the GUINODE version

And this is the RootNode version.

0

JME 3 orbiting nodes

Hi, well I have started learning to use the JME3 engine and I must say for what I have seen so far its vary good. There is, as with anything like this a bit of a steep learning curve, but its not too hard and there are plenty of docs and tutorials on the web.

So the point of this post is that I solved my first problem in JME3 that I thought was noteworthy. I’m just messing and learning at the moment and one of the things I wanted to try was to build a simple solar system complete with a star, planets and moons. The first two parts where easy, but getting the moons to orbit the planets as desired caused me no end of head scratching. I posted up and the JME forums to ask for advice and got it. The advice was that I was doing to all wrong. Ha! so I started over and took the pointers I was given and came up with the code below. If you have the JME3 SDK you can run this and it will show a very simple system with a sun and a planet and moon orbiting as they should. I’m posting this because I think its something others could use and will save them days of frustrations.

Enjoy

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
 package mygame;
 
import com.jme3.app.SimpleApplication;
import com.jme3.material.Material;
import com.jme3.math.ColorRGBA;
import com.jme3.math.Vector3f;
import com.jme3.renderer.RenderManager;
import com.jme3.scene.Geometry;
import com.jme3.scene.Node;
import com.jme3.scene.shape.Box;
import com.jme3.system.AppSettings;
 
/**
 * test
 *
 * @author normenhansen
 */
public class Main extends SimpleApplication {
 
    public static void main(String[] args) {
        Main app = new Main();
        AppSettings gameSettings = new AppSettings(false);
        gameSettings.setFullscreen(false);
        gameSettings.setResolution(1680, 1050);
 
        gameSettings.setVSync(false);
        gameSettings.setTitle("Dyson Wars");
        gameSettings.setUseInput(true);
        gameSettings.setFrameRate(500);
        gameSettings.setSamples(0);
        gameSettings.setRenderer("LWJGL-OpenGL2");
        app.settings = gameSettings;
        app.setShowSettings(false);
 
        app.start();
    }
    private Node sun; // the sun
    private Node planetOrbitNode; //the planets orbit node
    private Node planet; // the planet
    private Node moonOrbitNode; // te moons orbit node
    private Node moon; // the moon
 
    @Override
    public void simpleInitApp() {
        cam.setLocation(new Vector3f(0, 0, 20));
        cam.lookAt(new Vector3f(0, 0, 0), Vector3f.UNIT_Y);
        flyCam.setMoveSpeed(100);
        flyCam.setZoomSpeed(1);
 
 
        Node system = new Node("System");
 
        sun = new Node("Sun");
        Geometry g_sun = new Geometry("Sun", new Box(0.5f, 0.5f, 0.5f));
        Material m_sun = new Material(assetManager, "Common/MatDefs/Misc/Unshaded.j3md");
        m_sun.setColor("Color", ColorRGBA.Orange);
        g_sun.setMaterial(m_sun);
        sun.attachChild(g_sun);
 
 
        planet = new Node("Planet");
        Geometry g_planet = new Geometry("planet", new Box(0.5f, 0.5f, 0.5f));
        Material m_planet = new Material(assetManager, "Common/MatDefs/Misc/Unshaded.j3md");
        m_planet.setColor("Color", ColorRGBA.Green);
        g_planet.setMaterial(m_planet);
        planet.attachChild(g_planet);
        planetOrbitNode = new Node("PON");
        planetOrbitNode.attachChild(planet);
        planet.setLocalTranslation(0, 3, 0);
 
        // 
        moon = new Node("moon");
        Geometry g_moon = new Geometry("moon", new Box(0.25f, 0.25f, 0.25f));
        Material m_moon = new Material(assetManager, "Common/MatDefs/Misc/Unshaded.j3md");
        m_moon.setColor("Color", ColorRGBA.DarkGray);
        g_moon.setMaterial(m_moon);
        moon.attachChild(g_moon);
 
        // attach the moon to its orbit node
        moonOrbitNode = new Node("MON");
        moonOrbitNode.attachChild(moon);
        moon.setLocalTranslation(0, 1.5f, 0);
        // attatch the moons orbit node to the planet
        planet.attachChild(moonOrbitNode);
 
 
        system.attachChild(planetOrbitNode);
        system.attachChild(sun);
        rootNode.attachChild(system);
 
    }
 
    @Override
    public void simpleUpdate(float tpf) {
        this.moonOrbitNode.rotate(0, 0, -0.002f);
        this.moon.rotate(0, 0, 0.001f);
        this.planetOrbitNode.rotate(0, 0, 0.001f);
        this.planet.rotate(0, 0, 0.001f);
        this.sun.rotate(0, 0, -0.002f);
    }
 
    @Override
    public void simpleRender(RenderManager rm) {
        //TODO: add render code
    }
}