Dusk Engine

Okay I got the bounds working! Woo hoo! Thank you!

And to answer your question, no I don’t think I’m scaling anything (unless it’s automatically scaled or something). Should I be?

EDIT: I have been putting my player in a certain place instead of just on the screen, but when I altered it so that the player was just added to the screen at no designated x,y it worked fine. I’m not sure if there is something I’m missing maybe? It seems like wherever the player starts in relation to the map is where the player is kept. So for instance I had my player starting at -5, and my map starting in the bottom left corner, so my player was off center from the right, and the map wouldn’t follow up and down. Any advice would be helpful because I won’t be able to alter each map to start in the top right corner with the player in the top right corner! Thanks!

How does this compare to the Million Tile Engine?

Here’s a quick table I drew up (not all that complete, but it covers some key features).

  • C

How is the speed compared to the Million Tile Engine?

I’m not sure, as I don’t own MTE.

I’d probably say MTE is faster than Dusk, simply because MTE was written for speed. That said, I’ve done to Dusk close to all I know to optimize things. Dusk, like MTE, has an automatic tile culling algorithm that runs quite fast (though I don’t know the compared speeds).

It would be nice, now that you ask this, for someone who owns MTE to try both of them and let me know about the performance differences. Dusk and MTE might come out about the same right now (now that I think of it), but that’s just speculation from what I know of MTE, so I could easily be wrong.

  • C

I would love to see something done with Dusk if anyone has any examples.  Been wanting to get into tile game.

Well I’m currently working on a fast paced sidescroller and honestly I think that Dusk will be just fine. I’m not worried about speed.

I may post some pictures or footage soon of how the game looks, but I need to solve some problems with the map first.

hi there,

i’m trying to figure out what these lines mean, if you could break it down for me it would be much appreciated…

-- Position player and star player.x, player.y = map.tilesToPixels(map.playerLocation.x + 0.5, map.playerLocation.y + 0.5) finish.x, finish.y = map.tilesToPixels(map.finishLocation.x + 0.5, map.finishLocation.y + 0.5)

i tried looking in your Dusk Docs but I think you’re still working on completing it right?

I’m wondering how you positioned/determined where to place the objects… this is in your bob.lua file.

I tried opening your Tiled level files (mapdata/levels/…) but i only saw you drew in the level itself in your single layer called “tiles” but no object layer/player/stars

thanks

I was having an issue with objects and different screen sizes. Here you can the iphone 4 size things are correct. In the ipad image, some of the objects are positioned weird. Not sure what’s going on here, could be me.  The turtle (purple) and the spring (red) should sit on the ground as in the first picture. 

Screen-Shot-2014-01-05-at-11.56.51-PM.pn Screen-Shot-2014-01-05-at-11.56.30-PM.pn

Just wanna give a shoutout to Caleb the Clever guy (:
Get ready for my questions soon brah, coz im planning to make a platformer game!  this better help! :P   :))

How did you make physics objects smaller than the actual image and how did you make your bottom one complete physics object like that? Also how did you create physics objects like the circle with no image there, I only know how to make a physics object based off an image. Sorry for noob questions

0i7DQ7t.png

I’m having troubles with the collision where my guy will get stuck on the 32x32 squares if he walks on a wall. I want one complete wall and not 32x32 walls that are all lined up. Also in Tiled there are these weird gaps when i bring it up in my app. I posted a picture to show the example, and I don’t want them to be there because they cause problems.

Also I am using the Physics Editor for that one wall that I said “yes” as what I want (which is making the image false so you cant see it, but Physics Editor is causing me problems where I would rather do it through corona or tiled physics. Thanks for the help.

 

The platforms, ground and wall objects are drawn as objects on an object layer. The spring thing, and the character at the bottom were created as tile/picture objects on an object layer. 

Yes, ty very much! That solves a lot of problems!

Edit: That answer ended up solving my other question too, I’m just using objects now instead of using individual tiles every time. The object layer works perfectly and doesn’t cause any collision problems anymore (I just create the objects for every wall on the tiled map), the new problem is now the screen flickers like crazy on the sides of the app when I move the player. If I delete the object layer the flickers go away too. They are like giant black small rectangles/lines that last 0.5ms, would not make the game fun lol. Any way to keep the object layer and get rid of flickers?

Also I noticed the examples from github dusk engine the screen flickers like mad too…I think this would be a big problem for a game.

[quote name=“lvl9hero” post=“224039” timestamp=“1388992294”]hi there,   i’m trying to figure out what these lines mean, if you could break it down for me it would be much appreciated…  

-- Position player and star player.x, player.y = map.tilesToPixels(map.playerLocation.x + 0.5, map.playerLocation.y + 0.5) finish.x, finish.y = map.tilesToPixels(map.finishLocation.x + 0.5, map.finishLocation.y + 0.5)

i tried looking in your Dusk Docs but I think you’re still working on completing it right? I’m wondering how you positioned/determined where to place the objects… this is in your bob.lua file. I tried opening your Tiled level files (mapdata/levels/…) but i only saw you drew in the level itself in your single layer called “tiles” but no object layer/player/stars   thanks[/quote] could anyone help with this question? sorry I’m totally new to any kind of programming but I’m really trying to learn thanks.

@lvl9hero:
Map -> Map Properties… holds the values the main map object has. Properties put there will show up in the main map object.
 
@soggybag:
I’ll look into this. At the moment, try implementing a dynamic config as shown in “The Ultimate ‘config.lua’” or changing your scale type.
 
@Azmar:

For the flicker issue, have you tried the screen texture filter settings:
[lua]
display.setDefault(“minTextureFilter”, “nearest”)
display.setDefault(“magTextureFilter”, “nearest”)
[/lua]
Otherwise, you’ll have to try extruding your tilesets. If the problem is more than just flickering lines between tiles, please file an issue with a test case in it.

As for your physics body issue, the tiles on the left (after the PE wall) are like that because they’re just that - tiles. Each tile is given its own physics body.

  • C

Please submit a bug if this is still occurring :slight_smile:

I just pushed the next version of Dusk, 0.1.3, to GitHub! You can now use !eval! to specify math equations, load map data without building, and use the MapCutter plugin to load up specific layers of a map.

Enjoy!

  • Caleb

Hmm…I have a pretty wierd problem here.

My character object gets stuck in vertical tiles AKA walls, if it keeps moving towards them.

It keeps moving up and down a little.

I don’t know why the object can even overlap  tiles in the first place. I’m guessing it has something to do with the body type, but I don’t know how exactly I could solve this problem.

The character shouldn’t be able to move slightly over tiles.

If the character wouldn’t overlap into tiles, he wouldn’t get stuck.

Any ideas?

Getting stuck on walls going vertical was exactly the same problem I was having. It’s because you have those 32x32 blocks all attached making a wall and he will get stuck on each 32x32 block. After a lot of testing it seems to happen most the time going on any right wall lol. I think you are setting the properties to the walls in the tiled layers, but should be on object layer. Just make one complete object around that wall in the object layer that has the same properties as those walls so it will create a giant wall and not a 32x32 block attached with more blocks.

On a side note after you change everything to the object layer, let me know if you get any weird black flicker lines anywhere on your app, that happen a lot.

Hmmm…in the layer properties I’ve only added physics:enabled. And added static body types to every seperate tile.

Make one complete object around that wall…you mean just display a rectagle or something where the wall tiles are?

Or is it possible to somehow group tiles into one object?