Giter Club home page Giter Club logo

gosu-android's People

Contributors

captainjet avatar donv avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Forkers

ruboto plombix

gosu-android's Issues

Touch event coordinates not relative to Gosu::Window size.

Touch events (touch_began etc) report X and Y values relative to the SurfaceView size instead of the Gosu::Window size.

This was reproduced when creating a Gosu::Window with 320x240 size in landscape mode on an HTC, where I could get X values > 1000 (as I can move the touch outside the screen into soft-button area).

From logs:
I/System.out( 649): MainGameWindow - 320, 240
I/System.out( 649): SurfaceView: 960, 540
I/System.out( 649): [GameScreen] draw... @ (1063, 531)

touch_ended never called

Hi,

It's me again. I'm interested in maintaining/extending this project in the very short term (like 1-3 weeks) to get one of my proof-of-concepts done. I will submit PRs for things I change.

For now, I need help. When I define touch_ended events in my GameWindow class, they're never called. I don't know why.

I looked through the code, and it seems fine. The handlers are defined equally for all three touch_* methods. I can't see where the problem is.

I'm using the v0.0.5 gem, if that matters.

Audio Plays Repeatedly (unlike Gosu)

Hi,

I noticed two distinct differences between Gosu and android-gosu.

  1. If I load a huge sound (5MB+) in MainWindow.initialize, gosu freezes with the game not loaded or displaying anything, while gosu-android starts the game and the sound loads later.
  2. If in draw or update I call sound.play (I know, I know, it's crazy), gosu waits until the sound finishes before restarting it (normal looping). gosu-android stops and restarts, so it sounds like the first fractional second of the sound is stuck.

The first issue is not really a problem (where's my Ruboto loading screen?!), but I would like to resolve the second issue. I'll take a look at the code tonight if I can, and see if it's easy to do so. Please confirm if that change is okay with you :)

@neochuky

Stack Level Too Deep Crash

Hi,

I just installed gosu today via Ruby 1.9.3 (gem install ...) on Windows. I have confirmed that:

  • I can create a working Ruboto app (non-gosu)
  • I can create a working Gosu app (Windows)

However, I can't get a working combination of the two. When I generate a new ruboto sample app and just add require 'gosu', I get this exception at runtime:

FATAL EXCEPTION: Thread-11 org.jruby.embed.EvalFailedException: (SystemStackError) stack level too deep .. at RUBY.JavaImports(file:/data/app/com.blastcube-1.apk!/lib/requires.rb:7

Full exception is pictured below. I followed the deployment instructions from the trunk branch

Screenshot below of logcat on Bluestacks.

logcat

Exception trying to play the song in the arkanoid example

Hi!

This looks great! I tried the arkanoid example with Ruboto master, and it works perfectly except that I get an exception when trying to play the background song:

E/MediaPlayer(16127): Unable to to create media player
I/System.out(16127): initialize failed: setDataSourceFD failed.: status=0x80000000
I/System.out(16127): android.media.MediaPlayer.setDataSource(Native Method)
I/System.out(16127): android.media.MediaPlayer.setDataSource(MediaPlayer.java:1225)

Is this a known issue?

The beep plays fine.

gosu_android and not gosu ?

Hi,

I've been dabbling with gosu_android for a while. I'm planning on making a cross-platform (Windows + Android) app with Gosu + Gosu Android.

In the past, I could use require 'gosu', and it would work across platforms. Now, I need:

if RUBY_PLATFORM =~ /java/
    require 'gosu_android'
else
    require 'gosu'
end

I protest! I'm sure you changed this for a very good reason; what was it, and would you consider reverting this back to the old behaviour?

Touch coordinates are offset in Genymotion

Hi,

I seem to have encountered a strange bug. When printing out the coordinates on touch_moved, it seems like (on Genymotion, at least) the coordinates are offset by some pre-determined amount.

When I click/move in an area around the top-left corner of the screen, I get x=0, y = 56.476 (approximately), consistently.

It could be an emulator-specific bug. I don't have a device handy to test on. I know Bluestacks had its own strange bugs in the past.

Port RTanque to Android

This is a great programmable tank game. Would be fun to play it on Android. Cool features would be to program the tank directly on the device, upload tank definitions to a server, and enable tournaments with other people's tanks.

Image Appears Garbled

I have a simple game that draws an image on screen.

class GameWindow < Gosu::Window
    def initialize
        @done = true
        super 640, 480, false
        self.caption = "Gosu Tutorial Game"
        @background_image = Gosu::Image.new(self, Ruboto::R::drawable::background, true)                    
        @x = @y = 0
    end

    def draw    
        puts "Coordinates are #{@x}, #{@y}; done is #{@done}"
        raise "LOL WUT" if @background_mage.nil?
        @background_image.draw(@x, @y, 0)
    end
end

I get a black screen. logcat gives me this interesting result:

Coordinates are , ; done is true
LOL WUT (RuntimeError LOL WUT ["..."]

In other words, @done persists, while @x, @y, and @background_image become nil. It's strange. If I add a .nil? check/throw after assigning a value to @background_image, it passes; so it seems like the image gets created, very temporarily, and then it vanishes.

This is the same on both BlueStacks and my Galaxy Discover.

Set up automatic testing with travis-ci

This is to ensure that gosu-android works with different Android versions, at least api levels 10,15, and 16. It also protects against regressions for the tested features.

Ruboto is already being tested on travis-ci, so you can copy the setup from there.

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.