Pular para o conteúdo principal

Postagens

Mostrando postagens de janeiro, 2015

Exporting JavaFX application as an animated GIF

To try to export an animation from a JavaFX app to an animated GIF, I started on this thread in StackOverflow , then this class  from Eliot Kroo, which I am sharing on gist in case his site goes down. Right now I am going to try his class on a JavaFX application and I will share the results here. A sample animation This is the animation I generated using my code : The source for this animation is here: Based on Eliot's class, I created one which will take an amount of screenshots based on the given period and write an animated GIF on the given path(well, right now I didn't create the source yet, hope I will be able to make it work): This code have no great performance since the snapshot method is not "performatic". If we set a small period to collect the GIF's frames, we will face slowness. That's all, folks! Now you can use the above code in your application to export GIT animations from your JavaFX applications! Com...

Stacker Game in JavaFX

In this post I am going to share with you this simple game I created using JavaFX. The Stacker game The goal of the game is to reach the top by stacking rectangles. This is a well known game where when you reach the top you earn some gifts. Here is a video I took from youtube of someone playing this game: Our game is a little different. We will will only stack 1 rectangle, but the rectangle can be adjacent of the below rect, not exactly on top of it. The number of rectangles to fill will be increasing according to the level and also the speed. The game in Processing The game was previously created in Processing , but most of the code I could reuse in the JavaFX version! You can find the source for the processing version in my github . Creating games with JavaFX JavaFX was always a platform for games since its 1.0 version. I remember we even had a blog specific for JavaFX script games . Since the end of JavaFX Script and with JavaFX 2, we have some samples that m...

My experience with Processing programming language (and JavaFX X Processing)

Processing is the main language used to create Arduino code . It is also a great language to create visual applications . In this post I am going to share you some processing sketches I created and the way to follow if you are looking to have fun with this great programming language based in Java. Having fun with processing Simplicity is the word for processing. You can sit, open the IDE, have some random idea and in a few minutes you will implement it. Here are some random fun stuff I created in a few minutes Spiral As a first test with angular motion, I created a sketch to draw lines which when connected create a spiral: TV out of tune To experiment the noise function, a sketch using this function was to simulate an old TV of tune effect: "The Thing" Angular motion is always exciting. In this example I created a class called TheThing, which makes use of angular motion. I won't post all the code here, but you can see in my github . Particle gen...