come with me, on the way I'll explain.
JavaFX, game demo
A simple demo using some techniques described in the post JavaFX side scrolling gaming.
Original ogg video: blackdot.ogg
Source (NetBeans project): BlackDot.tar.gz
Source (one file only): blackdot.fx
Java Web Start: launch.jnlp
Java Font List
5 January, 2010 - 6:10 pm
Tags: AWT, fonts, Java, JVM, Larabie, Larabie Fonts, programming
Posted in english | Comments Off
Here’s a program that lists fonts available in your JVM. You can also set the environment variable JAVA_FONTS to specify the font directory.
import java.awt.GraphicsEnvironment;
public class ListFonts {
public static void main(String args[]){
GraphicsEnvironment e = GraphicsEnvironment.getLocalGraphicsEnvironment();
for(String font:e.getAvailableFontFamilyNames()){
System.out.println(font);
}
}
}
By using pipes you can count how many fonts you have:
java ListFonts|wc -l
On my Ubuntu machine here I got 556 because [...]
Python Fast XML Parsing
25 December, 2009 - 3:04 pm
Tags: dtd, expat, game, programming, pygame, Python, sax, schema, urllib, XML
Posted in english | 1 comment
Here is a useful tip on Python XML decoding.
I was extending xml.sax.ContentHandler class in a example to decode maps for a Pygame application when my connection went down and I noticed that the program stop working raising a exception regarded a call to urlib (a module for retrieve resources by url). I noticed that the [...]
Tiled TMX Map Loader for Pygame
I’m using the Tiled Map Editor for a while, I even wrote that tutorial about it. It’s a general purpose tile map editor, written in Java but now migrating to C++ with Qt, that can be easily used with my set of free pixelart tiles.
A map done with Tiled is stored in a file with [...]
Pygame: Running Orcs
11 December, 2009 - 7:47 am
Tags: game, orc, Pixelart, programming, pygame, Python
Posted in english | No comments
Here is a Pygame Sprite animation using the approach presented by Joe Wreschnig and Nicolas Crovatti. It’s not yet exactly what I need but is very suitable.
import pygame, random
from pygame.locals import *
class Char(pygame.sprite.Sprite):
x,y = (100,0)
def __init__(self, img, frames=1, modes=1, w=32, h=32, fps=3):
pygame.sprite.Sprite.__init__(self)
original_width, original_height = img.get_size()
self._w = w
self._h = h
self._framelist = []
for i in xrange(int(original_width/w)):
self._framelist.append(img.subsurface((i*w,0,w,h)))
self.image = [...]
Java: Accessing Private Members
14 November, 2009 - 4:27 am
Tags: Class, Douglas Adams, Field, getclass, getDeclaredField, Hack, Hacking, Java, Life, Object, Object-Oriented Programming, OOP, Reflection
Posted in english | 3 comments
Using reflection to change the accessibility of a private object field and access it at runtime.
import java.lang.reflect.Field;
class Life {
private int meaning = 42;
}
class Hack {
public static void main(String args[]){
Life life = new Life();
[...]
Jedi Name
8 November, 2009 - 5:47 pm
Tags: Java, Jedi, joke, programming, star wars
Posted in english | No comments
A simple Java class that calculates your Jedi name based on your first, last name, mother’s maiden name and the city you grew up.
/*
Jedi first name: 1st 3 letters of last name + 1st 2 letters of first name
Jedi last name: 1st 2 letters of mother’s maiden name + 1st 3 letters of [...]
Cameraman Duke
One more Duke.
Source: cameraman_duke.svg
7 anos de CEJUG
16 September, 2009 - 8:58 pm
Tags: café com tapioca, cartaz, CEJUG, evento, fa7, Física, fortaleza, Java, poster
Posted in português | 2 comments
fontes: cct-set-2009.zip
Quando: esse sábado agora, 19 de Setembro de 2009.
Onde: na Faculdade 7 de Setembro (Rua Alm. Maximiniano da Fonseca, 1395).
Preço: Gratuito.
O CEJUG está comemorando seu sétimo aniversário com um Café com Tapioca especial e imperdível com diversos palestrantes nacionais e muitos sorteios de brindes. A programação completa e as incrições podem ser feitas atráves [...]
Tomorrow Java
29 August, 2009 - 10:28 pm
Tags: CEJUG, EJB, Java, Java 7, Java EE, JavaFX, Tomorrow Java
Posted in english | 2 comments
Como prometido, palestra que eu e o Rafael Carneiro fizemos para apresentar no Café com Tapioca desse mês.
Tomorrow Java
View more documents from José Maria Silveira Neto.
Update: O Paulo Jr também fez uma cobertura do evento e da apresentação dele.
Pygame, Simple Space Effect
12 August, 2009 - 7:14 am
Tags: game, game development, game loop, list comprehension, pygame, Python, SDL, Simple Direct Layer, sliding stars, Space, space effect, stars
Posted in english | 1 comment
This is a simple space effect of sliding stars using Pygame.
Direct link to video: simple_space_effect_01.ogv
We set some constants like the screen size and the number N of star we want.
N = 200
SCREEN_W, SCREEN_H = (640, 480)
Using list comprehension we create a list of random points in the screen, that will be our stars. The size [...]













26 August, 2008 - 4:47 pm
nice job.
27 August, 2008 - 3:43 pm
look to another game with source
http://molgav.nn.ru/index.php?option=com_content&view=article&id=472&Itemid=53
20 September, 2008 - 1:25 pm
Very good comments and pictures. My Favorit Blog. Thank you Autoversicherung
2 April, 2009 - 4:59 am
The demo messed up a little for me, when I moved it showed a box around me. When I went over a dark cloud, it had a yellow box around that.
There was also some flicking.
3 October, 2009 - 1:35 pm
Can there be Games developed using JavaFX with Backend database interaction and much more?
I am interested towards learning ways to develope Strategy games using JavaX.
Thanks in advance.