Giter VIP home page Giter VIP logo

sfml.jl's Introduction

SFML.jl Build Status

This is a binding of the C++ game and multimedia library SFML (Simple and Fast Multimedia Library), developed by Laurent Gomila, for Julia. SFML is often used for game development but it can be used for anything graphics-related.

It also has audio libraries and networking libraries.

There is currently almost complete support for graphics, great support for audio, and complete support for network.

SFML.jl works on Mac OS X, Linux, and Windows.

Take a look at the examples folder to see some usage examples.

For much larger examples (games) see these two examples: Jumping Game and Space Shooter (this one is more complex).

You can view a talk I gave about SFML.jl at JuliaCon 2015 here. All the demos that I used in that talk are available in the JuliaCon-SFML repository.

Installation

To install on any OS, run:

julia> Pkg.add("SFML")

If you want to install the master version use:

julia> Pkg.clone("SFML")
julia> Pkg.build("SFML")

Linux

Please make sure you have Glibc 2.14 installed, and let me know if there are any build problems on Linux (I don't use Linux very much). The Linux binaries don't come with any of the dependencies so you have to install them yourself. Here is the list:

  • pthread
  • opengl
  • xlib
  • xrandr
  • freetype
  • glew
  • jpeg
  • sndfile
  • openal

On Debian you can install the package libsfml-dev which will also install all dependencies. You can also run the commands here (you don't need to install cmake-gui).

Screenshots and Gifs

It is very simple to take a screen shot using SFML. Just use screenshot(window, filename).

You can also take a screenshot and store it in an Image object without saving the image using image = capture(window)


To create a gif, you must have imagemagick installed.

Making gifs is only slightly more complicated. You can use the make_gif(window, width, height, duration, filename, delay) function (duration and delay are in seconds).

When you run the program, it will asynchronously create the gif and will give you constant feedback in the console. If you don't see anything in the console, add a sleep(0) declaration at the start of the animation loop to allow Julia time to switch between the processes.

The gif creation is done when it says Created gif XXX.gif.

What has not been bound (yet)

  • SoundStreams
  • SoundStreamRecorders
  • SFML threads (pthreads)
  • Transforms

For the first three, we will probably have to wait for Julia to support multithreading.

License

This software is a binding of the SFML library created by Laurent Gomila, which is provided under the Zlib/png license.

This software is provided under the same license as SFML, the Zlib/png license.

sfml.jl's People

Contributors

zyedidia avatar jw3126 avatar haberdashpi avatar ibadr avatar iainnz avatar scls19fr avatar dbeach24 avatar zehcnas34 avatar tom--lee avatar tkelman avatar wookay avatar lschuma avatar

Watchers

Daniel Molina avatar

Forkers

raphbacher

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.