Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
Tor (torbuntu)
@Torbuntu
Will Pixmap from libgdx be supported going into Mini2Dx 2.0? With the separation from libgdx will there be something similar anyway? Using Graphics to draw raw shapes is pretty poor performance on lower devices. I managed to get some pretty decent performance using a texture and pixmap to do the same thing (drawing line and hit box outlines or just doodle shapes with maths).
Thomas Cashman
@tomcashman
I’m not 100% sure yet
Tor (torbuntu)
@Torbuntu
I saw a while ago an issue on github about poor rect performance and had a similar trouble. Would you imagine that drawing with graphics would improve in the future version to where I wouldn't need the pixmap? (Though I do like drawing individual pixels)
Oh wait what the heck. Mini2Dx
Has a pixmap already 😂 I'll try switching my libgdx one to that.
Tor (torbuntu)
@Torbuntu
or is that not in the most recent version
nope, that isn't in the newest version. Never mind then xD
Tor (torbuntu)
@Torbuntu
Not sure how beneficial it would be to the majority of users. But I find using a pixmap to be an extremely nice feature for performant custom drawing during runtime.
But I think the system I'm building is targeting a pretty niche crowd as it is.
HerrDerb
@HerrDerb
HI, i have a question to hex tile map rendering
I'm not sure if I forgott something or if this might be an actuall bug.
I have hex tiles with 64x72 pixels. When I load the map they get rendered this way:
grafik.png
They start to overlap each other sideways
Inspecting the TiledMap object of mini2Dx i found the following
grafik.png
It seems that the TiledLayerRender has wrong information about the tile sizes
Thomas Cashman
@tomcashman
Hmm I’ll check the code
Thomas Cashman
@tomcashman
@HerrDerb would you be able to send me the map + tileset somehow?
That's a basic runnable project with the issue
HerrDerb
@HerrDerb
I'm just kind of stuck. How do I use the camera in mini2dx?
Thomas Cashman
@tomcashman
I'm trying to figure out the correct way to render the hex when the side length doesn't match the width/height
in terms of the camera, there is no Camera class as such in mini2Dx (this will probably come in 2.x) so you need to manually use g.translate to move the camera around
Thomas Cashman
@tomcashman
@HerrDerb I found the issue with rendering. Will upload 1.9.1 to Maven Central this evening :)
Thomas Cashman
@tomcashman
@HerrDerb 1.9.1 is now available :)
HerrDerb
@HerrDerb
Cheers :) I've just been checking it. I'm afraid it's not quite right yet. I still have a small shift with the example project I've posted. What is exactly the reason that you calculate the with with hexWidth = (tiledMap.getSideLength() * 2) + sideOffsetX;? and not simply tilemap.getTileWidth()? With the first approach, you'd need to know the angles, don't you?
Thomas Cashman
@tomcashman
if you zoom in your map in tiled you'll see you tiles are off by 1 pixel
*your tiles
I think your tileset configuration is wrong?
HerrDerb
@HerrDerb
Oh, well this is possible I guess :)
Oh, gimp does start with 0 for the x coordinate....
sorry for bothering you and thanks for the hint ;)
Thomas Cashman
@tomcashman
no prob
HerrDerb
@HerrDerb
oh now I got it. The side length was wrong... Looks marvelous :) Thanks
Roger
@rogersachan
when the github package registry goes public can we expect mini2dx to be published to it?
Thomas Cashman
@tomcashman
Yup I’ve already requested beta access :)
I just hope they enforce javadoc + sources standards same as Maven Central
Sam Keene
@SKeeneCode
Hi quick question (and im sure many to come) does mini2dx support animated Tiles in tmx files? They're not working in my case but I'm not familiar with the library so was wondering what I would need to do to make them work?
Thomas Cashman
@tomcashman
You need to call update on the TiledMap
Sam Keene
@SKeeneCode
Thank you :)
By the way, does scaling in the game have to be implemented manually? I remember the basic project libgdx made had automatic scaling which I believe was a feature of OpenGL, can it be enabled simply with mini2dx?
Thomas Cashman
@tomcashman
You can use the mini2Dx Viewport classes however if you’re doing any camera movement you’ll need to take into account any translation the viewport is doing
Sam Keene
@SKeeneCode
Alright I'll have a look, thanks for the quick reply. I'm sure I'll have a bunch of questions in the future
Thomas Cashman
@tomcashman
No problem. Btw if you use Discord the community is more active there
Sam Keene
@SKeeneCode
Will do - didn't know there was a discord!
Sam Keene
@SKeeneCode
Thanks just joined :)
ie04
@ie04
Looks like the Discord invite is expired... Does anyone have the current one?
Thomas Cashman
@tomcashman
@ie04 there’s a join widget here :) -> https://mini2dx.org/community.html
ie04
@ie04
Thanks!