Skip to content

Tag: english

JavaFX: Side-scrolling

An side-scrolling game attempt.

an plane

I used two images, this mountain background made with Gimp (xcf sources here) and that ship above made with Inkscape (svg sources here).

[youtube]5F4STuluSiM[/youtube]

import javafx.ui.*;
import javafx.ui.canvas.*;

var scroll;
scroll = [1..800] dur 60000 linear continue if true;

var mountains = Clip{
    transform: bind translate(-scroll,0)
    shape: Rect {x:bind scroll, y:0, width:400, height:200}
    content: [ImageView {
            transform: translate(0,0)
            image: Image { url: "http://silveiraneto.net/downloads/mountains.png"}
        },
        ImageView {
            transform: translate(800,0)
            image: Image { url: "http://silveiraneto.net/downloads/mountains.png"}
        }
    ]
};

var h = 50;

var ship = ImageView {
    cursor: HAND
    transform: bind translate(0,h)
    image: Image { url: "http://silveiraneto.net/downloads/jfx_plane.png"}
    onMouseDragged: operation(e) {
        h += e.localDragTranslation.y;
    }
};

Canvas {
    content: [mountains, ship]
}

Reggie and Simon here in Fortaleza

Reginald (Reggie) Hutcherson is the manager of the Sun Technology Evangelism group. Simon Ritter is a Java Technology Evangelist at Sun Microsystems. They were here in Brazil to some events and we bring them to Fortaleza (Ceará) to talk too in our local jug event (Café com Tapioca de Coco).

Plaquinha
Sign we made to find them in the airport.

Airport

Me and Rafael got them in the airport and showed some some cool places in the city. They already knew what they wanted to eat: barbecue!

Simon Ritter

Reggie and Simon
Reggie, me, Rafael and Simon.

They are really cool guys. Soon I’ll put some photos of event itself.

Unfortunately I could not stay for the event due my flight to São Paulo in order to be in the Campus Party Brasil 2008.