B4J Library SimpleGameEngine

Discussion in 'B4J Libraries & Classes' started by Informatix, Apr 10, 2017.

Similar threads

B4J Tutorial GameView - Simple Sprites Engine
B4J Tutorial [WebApp] (mini) Template Engine
B4J Tutorial SQL Tutorial
Share My Creation PacDroid
B4J Library jGoogleMaps library
  1. Informatix

    Informatix Expert Licensed User

    This is a game framework for B4J that includes many features of advanced game frameworks like libGDX but is designed to be as simple to use as possible.
    It can be used for games of course, but also for animations, slideshows, paint program, etc. It is more complete than the Canvas library.

    This framework has been entirely written from scratch (except 20-30 lines taken from libGDX for the most technical parts of the tiled map reader). The Java source code is available against a donation of 10 euros or more.

    Don't miss this game made with SGE (PacDroid, a Pacman clone):
    https://www.b4x.com/android/forum/threads/pacdroid.78617/

    Let me know if you are using this library for a real project. And, of course, feel free to post comments and suggestions.

    Actors:
    sgeActor
    sgeGroup
    sgeRootGroup

    Audio:
    sgeMusic
    sgeSound

    Automation:
    sgeAction
    sgeActions
    sgeInterpolators

    Camera:
    sgeCamera

    Drawing:
    sgeGraphics

    Effects:
    sgeEffect...

    Input:
    sgeInput
    sgeKeyEvent

    Geometry:
    sgeBoundingBox
    sgeCircle
    sgeIntersections
    sgePoint2D
    sgePolygon
    sgeSegment
    sgeSpline

    Maps:
    sgeMapCell
    sgeMapTile
    sgeMapTileset
    sgeTiledMap
    sgeTiledMapImageLayer
    sgeTiledMapObject
    sgeTiledMapObjectLayer
    sgeTiledMapTileLayer

    Navigation:
    sgeNavigationGrid
    sgeNavigatorAStar

    Steering behaviors:
    sgeBehavior
    sgeBehaviorFollowPath
    sgeBehaviors
    sgeVehicle

    Visual objects:
    sgeAnimation
    sgeRegion
    sgeText

    Miscellaneous:
    sgeAssetManager
    sgeScreen
    sgeUtils
    Search tags: Simple Game Engine, jSimpleGameEngine
     

    Attached Files:

    Last edited: May 21, 2017
    JanG, ilan, Laurent95 and 10 others like this.
  2. wonder

    wonder Well-Known Member Licensed User

    Awesome, thank you so much!! :) I'll have a look during this week.
     
    Informatix likes this.
  3. Jaames

    Jaames Active Member Licensed User

    No other words than, You are amazing ... Thanks a lot for sharing this.
    I tried it on fairly old laptop and all examples run smooth as butter :)
     
    Informatix likes this.
  4. sorex

    sorex Expert Licensed User

    works fine here aswell, good job.

    the tilemap give this red error in the log > Unexpected event (missing RaiseSynchronousEvents): sge_start

    but it works fine.
     
    Informatix likes this.
  5. Informatix

    Informatix Expert Licensed User

    I never use the debug mode so I never see this kind of errors. Maybe someday I will understand where to put the RaiseSynchronousEvents annotations to get rid of these errors... In the meanwhile, ignore them or run in Release mode.
     
    Jaames likes this.
  6. Erel

    Erel Administrator Staff Member Licensed User

    Any method that is called from B4J and raises an event (with ba.raiseEvent or raiseEvent2) before the method returns should be tagged with this annotation.
     
  7. Informatix

    Informatix Expert Licensed User

    I was kidding. ;) I just forget to put these annotations.
     
    Peter Simpson and Erel like this.
  8. Informatix

    Informatix Expert Licensed User

    I tried to add them this time but that does not work. Some of them are in the XML file of the library, some others not and thus are not taken into account. Don't know why. I don't know the version of my BADoclet. Its size: 18343 bytes and 962.
     
  9. Erel

    Erel Administrator Staff Member Licensed User

    It is probably not related to the doclet version. If you like send me the complete project and I'll try it here.
     
  10. PABLO2013

    PABLO2013 Active Member Licensed User

    TKS 1000
     
  11. Informatix

    Informatix Expert Licensed User

    Beta 0.5: new features (music, sound, object layers of tiled maps, isometric maps, hexagonal maps, interpolators, export/import of navigation grids, sgeUtils class, polylines), new demos, fixed bugs.

    I don't plan to add new features for now. This beta version covers most needs for a game.

    Let me know if you use it in a real project and, of course, feel free to post comments and suggestions.
     
    Toley and Jaames like this.
  12. Eme Fibonacci

    Eme Fibonacci Active Member Licensed User

    Hello,

    Do you intend to make a version for B4A?

    I hope so.
     
  13. Jaames

    Jaames Active Member Licensed User

    DonManfred and Informatix like this.
  14. Informatix

    Informatix Expert Licensed User

    No. See why in the post above.
     
    DonManfred likes this.
  15. Eme Fibonacci

    Eme Fibonacci Active Member Licensed User

    I did not understand. You can say? Code Speed?

    I hope you reconsider because you seem to be a great expert in games and it would be nice to have a library easier than libgdx for b4a.

    Ok, I See.
    [Lib] Accelerated surface;)
     
    Last edited: Apr 18, 2017
  16. Informatix

    Informatix Expert Licensed User

    If I had to port SGE to B4A, it would be built upon libGDX, and I don't want to spend my time doing that.
     
  17. ilan

    ilan Expert Licensed User

    thanks a lot, this is awesome.
    now we have a Game Engine and Jbox2d (deadly mix)

    how could i missed this thread o_O
     
    Last edited: Apr 20, 2017
    Jaames likes this.
  18. Informatix

    Informatix Expert Licensed User

    I found where was the problem. The methods raising events were in a hidden abstract class. I just moved the annotation to the public callers of these methods and that works fine in Debug mode.
    These changes will be in the next beta version.
     
    Jaames and Erel like this.
  19. JanG

    JanG Member Licensed User

    Pretty cool! It works on the raspberry pi as well. Yes, with some modifications and problems (e.g. sound and keyboard input). But the PacDroid sample is running with moving ghosts/apples.

    Thanks a lot!
     
    Informatix and Erel like this.
  20. Informatix

    Informatix Expert Licensed User

    In case someone wonders, I confirm that SimpleGameEngine is not concerned by the animation issue under Windows reported by many Java users AS LONG AS you set the smoothness parameter to 10 or more when you initialize SGE. You can notice this problem by setting this parameter to 1 or by using the Canvas+Timer libraries for example.
    This bug is well described since 2015 but it is still not fixed:
    https://bugs.openjdk.java.net/browse/JDK-8136536
     
    Jaames and Erel like this.
Loading...