Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
Thomas Cashman
@tomcashman
No we had a lot of object templates and wanted to manage them in a separate folder from the maps since there’s around 200 maps
Tor (torbuntu)
@Torbuntu
Wow! That's amazing.
Tor (torbuntu)
@Torbuntu
Where did the name Mini2DX come from?
Thomas Cashman
@tomcashman
Well originally it was a re-implementation of Slick2D using LibGDX so the 2DX came from combining those. Then I just liked the word mini to describe how light the framework is to use
Tor (torbuntu)
@Torbuntu
That's kind of what I always assumed :D I love it!
How's the monogame stuff coming? Or is that still on the backlog for a while?
Thomas Cashman
@tomcashman
Monogame ain’t going well. Turns out IKVM.NET won’t work as a transpiler that produces code compatible with consoles. So now I have to implement my own transpiler.
Tor (torbuntu)
@Torbuntu
😱 oh no...
Does Haxe have any sort of way to convert java source projects to a cross platform executable? I've only briefly been made aware of that the other day, but it promises some huge things.
Tor (torbuntu)
@Torbuntu
Oh I'm dumb. Haxe compiles to a target from haxe, no transpiling
Tor (torbuntu)
@Torbuntu
Is there any plan to make Mini2DX a modular project to take advantage of the java 9+ module system for smaller deployments?
Thomas Cashman
@tomcashman
No plan at the moment. Need to learn the module system still XD
Tor (torbuntu)
@Torbuntu
Haha gotcha 🤣 I keep putting it off myself but reading about it gets me kind of excited for the implications.
But you've got so much on your plate already 😣
I'm super hyped about Mini2DX 2 though. The extended platform support highly peaks my interest.
Thomas Cashman
@tomcashman
I’ve so much work to do 😥
Tor (torbuntu)
@Torbuntu
You're still the only one working on this? (And alchemic cutie code besides)?
Thomas Cashman
@tomcashman
Yup. Though applied for a bank loan to get extra money to hire interns. Hopefully it gets approved
Tor (torbuntu)
@Torbuntu
Interns for the game or for Mini2DX?
Thomas Cashman
@tomcashman
Probably for the game so that I can focus on the Nintendo Switch port.
Since engine is mostly done
Tor (torbuntu)
@Torbuntu
That makes sense! I probably already asked but is the custom switch port stuff going to be in the main Mini2DX code too? So future users of Mini2DX could potentially also build for consoles?
Thomas Cashman
@tomcashman
Some of it will but the rest will be in a private repo due to NDAs
Tor (torbuntu)
@Torbuntu
That's right, I remember that now 😀
Thomas Cashman
@tomcashman
But I’m hoping to speak to Nintendo after launch to automatically grant access to Nintendo developers
Basically same set up as monogame
Tor (torbuntu)
@Torbuntu
That would be amazing.
Have you thought about making a community group on discord? It seems that has pretty good attraction for community members. At least from the ones I've found.
Like LibGDX and various linux and java groups. Constant activity there.
Thomas Cashman
@tomcashman
Hmmmm good idea
I’ll set one up later :)
Tor (torbuntu)
@Torbuntu
:D great!!
Thomas Cashman
@tomcashman
hey @/all I've set up a Discord server now for mini2Dx :) https://discord.gg/XfCutsH
Mateus Bandeira
@mateusbandeiraa

Hey guys, good evening!
I'm getting a weird behaviour trying to render a TiledMap. If I try to render it before anything else, it doesn't show up on the screen. I need to render something in advance for it to work. In example,

public void render(GameContainer gc, Graphics g) {
        tiledMap.draw(g, 32, 32);
    }

Shows a black screen.

But,

public void render(GameContainer gc, Graphics g) {
        g.drawCircle(0, 0, 5);
        tiledMap.draw(g, 32, 32);
    }

renders the circle and the map.

Is this a known issue?

Thomas Cashman
@tomcashman
Very strange. Can you paste the code where you create the map?
Mateus Bandeira
@mateusbandeiraa

I made some changes since my last message, but the issue persists. Actually, my code is very simple yet.

The main screen:

public class IndoorScreen extends BasicGameScreen {
    private GameMap tiledMap;

    // ...
    @Override
    public void initialise(GameContainer gc) {
        try {
            tiledMap = new GameMap(Gdx.files.internal("Maps/sample_indoor.tmx"));
        } catch (IOException ex) {
            ex.printStackTrace();
        }
    }

    @Override
    public void render(GameContainer gc, Graphics g) {
        g.drawCircle(0, 0, 5); // tiledMap won't render if this line is not present.
        tiledMap.render(gc, g);
    }
}

The GameMap class:

public class GameMap extends TiledMap {
    private int positionX = 0;
    private int positionY = 0;
    private float renderScale = 1.2f;

    // ...
    public void render(GameContainer gc, Graphics g) {
        g.scale(renderScale, renderScale);

        this.draw(g, positionX, positionY);

        g.scale(1, 1);
    }
}

Later I discovered that rendering something after tiledMap.draw() will make it work on the next render() call. In other words:

    // IndoorScreen class
    private int renderCalls = 0;
    @Override
    public void render(GameContainer gc, Graphics g) {
        tiledMap.render(gc, g);
        g.drawCircle(0, 0, 5); 
        System.out.println("renderCall: " + ++renderCalls);
    }
renderCall: 1 -> Just the circle.
renderCall: 2 -> Both circle and map.

This is not a huge problem for me, as I indeed need to render other objects. But It gave me a headache when the first thing I was trying to do was make the map show up on the screen.

Thomas Cashman
@tomcashman
hmm there must be a bug in the graphics flushing. I will investigate. Sorry for the issue, I'll let you know when fixed!
also, you can manually force a flush using g.flush() if needed though in general it's best not to do this since we try to batch everything
Mateus Bandeira
@mateusbandeiraa

I forgot to mention: I tried to flush() before and after the tiledMap.draw() call. Still no luck.

Sorry for the issue, I'll let you know when fixed!

No need to apologize. Your work is already amazing.

Thomas Cashman
@tomcashman
that's very bizarre! I'll investigate and try fix in a 1.9.1 update :)
Tor (torbuntu)
@Torbuntu
If it helps at all, I can in draw a map right after viewport.apply(g);
Not sure if useful, but I was curious. And my maps draw without having to actually draw something else.
acuilab
@acuilab
:)
@tomcashman n When 2.0 will be released?
Thomas Cashman
@tomcashman
First beta will be in August
Final release probably in September or October
acuilab
@acuilab
In mini2Dx you redesigned the ui, why not use scene 2d ui directly?
Thomas Cashman
@tomcashman
2.0 will de-couple from LibGDX so UI needed to be independent to allow for portability to consoles
I’m not 100% happy with current UI implementation, want to try simplify it in 2.0
acuilab
@acuilab
But what is the consoles?