Search Results

Search found 6 results on 1 pages for 'pulpcore'.

Page 1/1 | 1 

  • PulpCore music playback - loop sound and animate volume

    - by Peter Perhác
    I have been experimenting with PulpCore, trying to create my own tower defence game (not-playable yet), and I am enjoying it very much I ran into a problem that I can't quite figure out. I extended PulpCore with the JOrbis thing to allow OGG files to be played. Works fine. However, pulpCore seems to have a problem with looping the sound WHILE animating the volume level. I tried this with wav file too, to make sure it isn't jOrbis that breaks it. The code is like this: Sound bgMusic = Sound.load("music/music.ogg"); Playback musicPlayback; ... musicVolume = new Fixed(0.75); musicPlayback = bgMusic.loop(musicVolume); //TODO figure out why it's NOT looping when volume is animated // musicVolume.animate(0, musicVolume.get(), FADE_IN_TIME); This code, for as long as the last line is commented out, plays the music.ogg again and again in an endless loop (which I can stop by calling stop on the Playback object returned from loop(). However, I would like the music to fade in smoothly, so following the advice of the PulpCore API docs, I added the last line which will create the fade-in but the music will only play once and then stop. I wonder why is that? Here is a bit of the documentation: Playback pulpcore.sound.Sound.loop(Fixed level) Loops this sound clip with the specified volume level (0.0 to 1.0). The level may have a property animation attached. Parameters: level Returns: a Playback object for this unique sound playback (one Sound can have many simultaneous Playback objects) or null if the sound could not be played. So what could be the problem? I repeat, with the last line, the sound fades in but doesn't loop, without it it loops but starts with the specified 0.75 volume level. Why can't I animate the volume of the looped music playback? What am I doing wrong? Anyone has any experience with pulpCore and has come across this problem? Anyone could please download PulpCore and try to loop music which fades-in (out)? note: I need to keep a reference to the Playback object returned so I can kill music later.

    Read the article

  • PulpCore OGG music playback - can't loop as soon as I animate the musicVolume property

    - by Peter Perhác
    I have been experimenting with PulpCore for about a week or so and I am enjoying it very much but today I ran into a problem that I can't quite figure out. Sound bgMusic = Sound.load("music/music.ogg"); Playback musicPlayback; ... musicVolume = new Fixed(0.75); musicPlayback = bgMusic.loop(musicVolume); //TODO figure out why it's NOT looping when volume is animated // musicVolume.animate(0, musicVolume.get(), FADE_IN_TIME); This code, for as long as the last line is commented out, plays the music.ogg again and again in an endless loop (which I can stop by calling stop on the Playback object returned from loop(). However, I would like the music to fade in smoothly, so following the advice of the PulpCore API docs, I added the last line which will create the fade-in but the music will only play once and then stop. I wonder why is that? Here is a bit of the documentation: Playback pulpcore.sound.Sound.loop(Fixed level) Loops this sound clip with the specified volume level (0.0 to 1.0). The level may have a property animation attached. Parameters: level Returns: a Playback object for this unique sound playback (one Sound can have many simultaneous Playback objects) or null if the sound could not be played. So what could be the problem? I repeat, with the last line, the sound fades in but doesn't loop, without it it loops but starts with the specified 0.75 volume level.

    Read the article

  • Java + Eclipse + Pulpcore

    - by cable729
    I've never programmed in java or eclipse before, although I have used c# and visual studio. I'm trying to get started with java development, and develop 2d games, but I can't get the project to run. I've followed the tutorial here: http://cloningtheclassics.com/getting-started-with-pulpcore/ I've retried the tutorial at least 5 times, and I still can't get it to work. The error it displays is: Buildfile: C:\workspace\javapulp\project\build.xml [taskdef] Could not load definitions from resource tasks.properties. It could not be found. [taskdef] Could not load definitions from resource tasks.properties. It could not be found. -init: BUILD FAILED C:\workspace\javapulp\project\build.xml:127: Required file not found: ../../build/pulpcore-applet-debug-0.11.jar Total time: 1 second Thanks in advance!

    Read the article

  • Java File and ByteArray or InputStream - please quick help

    - by Peter Perhác
    I want to use jFuge to play some MIDI music in an applet. There's a class for the MIDI pattern - Pattern - and the only method to load the pattern is from a File. Now, I don't know how applets load files and what not, but I am using a framework (PulpCore) that makes loading assets a simple task. If I need to grab an asset from a ZIP catalogue, I can use the Assets class which provides get() and getAsStream() methods. get() returns the given asset as a ByteArray, the other as an InputStream. I need jFuge to load the pattern from either ByteArray or InputStream. In pseudo-code, I would like to do this: Pattern.load(new File(Assets.get("mymidifile.midi"))); however there is no File constructor that would take a ByteArray. Suggestions, please?

    Read the article

  • Could you please provide me with comments on a Java game of mine?

    - by Peter Perhác
    Hello there. I have marked this question as community wiki, so no rep points are thrown around. I made this game, Forest Defender, a proof-of-feasibility little project, which I would like to share with you and collect your constructive comments, first impressions, etc. It is a the first playable (and enjoyable) game I have released to the public, so I am, naturally, very eager to get some recognition by you, as my peers. I read in a StackOverflow blog, that One of the major reasons we created Stack Overflow to give every programmer a chance to be recognized by their peers. Recognized for their knowledge, their passion, [...] It comes in the form of a Java applet, I used an animation framework called PulpCore and I must say that it's been extremely enjoyable to work with it. I do recommend to people interested in Java game development. Since the product is free, fun, entirely commercial-free and I am willing to share the code to it (on request), I thought it would be OK to post this as a topic here. Moderators, please feel free to move this to another place if you deem the other place more appropriate. EDIT: I am ever so stupid to forget to include a link :-) http://www.perhac.com/shared/forest-defender/index.html

    Read the article

  • Java 2D Game Frameworks

    - by Software Monkey
    I have been looking at frameworks for writing 2D games in Java - part of a growing desire to rediscover my roots in writing those simple but addictive video games. I have googled and found some possibilities, but it's hard to judge which is best without investing significant time in each. Does anyone out there have any recommendations from experience, preferably with a list of pro's and con's for the framework. NOTE: I am not looking so much for comparisons between frameworks but, rather, feedback on any given framework from actually having used it firsthand, or knowing someone who has. The other possibility I am considering is rolling my own, but would rather not. EDIT: I am targeting Java on the Desktop, and expect capable machines, though not state of the art. Some of the 2D engines I have found: Free PulpCore (License: BSD) Slick2D (License: BSD) GTGE - Golden T Game Engine JGame GAGE - Genuine Advantage Gaming Engine GameFrame for Java Basilisk (2D and 3D) Free for non-commercial use Genuts EasyWay - a high-level 2D engine

    Read the article

1