Detecting collisions using libGDX Pixmap

I keep making prototypes about what I talk in the previous post, in this case I made an example of how to interact between the game entities (the bombs in the video) and the Pixmap data (the platform of the video) by adding some kind of basic collision detection checking the Pixmap's pixels with alpha value different from zero. I only wanted to share the a video showing the experiment:

As always, hope you like it. Probably more information on next posts.

VN:F [1.9.22_1171]
Rating: 4.6/5 (10 votes cast)
Detecting collisions using libGDX Pixmap, 4.6 out of 5 based on 10 ratings

Tags: , ,

  • Anonymous

    Really good work !

    p.s: are you arielsan made some patch for lwjgl 2.8 ? Good work!

  • arielsan

    Thanks! and yes we made some patches with ruben01 for lwjgl 2.8.0.

  • Anonymous

    Good work with LWJGL :D
    Could you in some future posts explain resizable applets?

  • arielsan

    I never worked with resizable applets but I can give them a try some of these days and write something.

  • Mario Zechner

    Sweet! Well done.

  • thegod

    hi guys,

    i've recently found your blog and found a lot of cool stuff there. is there a chance you will write some kind of mini-tutorial to setup the project to work with your commons/animation4j/etc.? got some hard times to put it all together. it's good work you're doing. sry for english

  • arielsan

    Glad you like our work.

    We will try to make an introduction and/or explain how to use our libraries, and probably try to improve the projects to be easily used by anyone.

    Thanks for writing.

  • Anonymous

    oops :D thanks anyway

  • Ariel Coppes

    I was researching a bit about resize-able applications, if you use LibGDX, then I believe the LwjglApplication class will handle the resize by itself whenever the current Canvas object size was modified.

    If you aren't using LibGDX, you could create your own ComponentListener and add it to the Canvas container in order to handle size changes and resize the corresponding LWJGL Display. I found a basic example which uses Scala, however I believe it doesn't work for all cases because it only changes the OpenGL viewport, if you are using different cameras in your game and modifying the viewport by yourself then this would fail. Also, remember you should make Display changes in the LWJGL thread.

    Hope this information could help, sorry the delay. If I find more information I will probably write a post.

  • Ariel Coppes

    Final comment, using one or another method, you probably still have to make custom logic inside your game/app to handle the resize event, relocating your gui objects, increasing/decreasing the viewport of your game camera, etc. Probably you will want to maintain the aspect of the game, so just resizing the global viewport is not an acceptable solution.

  • Pingback: Resizable Applets with LWJGL « Gemserk

  • Pingback: Modifying textures using libGDX Pixmap in runtime – Explained « Gemserk

  • Idnan

    great effort. Pls upload the source code of this tutorial.

  • Leonardo Zimbres

    hum... interesting...

  • mrtn

    can you please provide the source for this tutorial