# Creating enemies on Dusk

**URL:** <https://forums.solar2d.com/t/creating-enemies-on-dusk/336263>\
**Category:** Gymbyl Coding\
**Created:** [October 12, 2015, 3:42pm UTC](https://forums.solar2d.com/t/creating-enemies-on-dusk/336263 "2015-10-12T15:42:53Z")\
**Posts on this page:** 5\
**Page:** 2

<div class="post-metadata">

**Author:** ![Caleb\_P](https://forums.solar2d.com/letter_avatar_proxy/v4/letter/c/ee7513/32.png) [@Caleb\_P](https://forums.solar2d.com/u/Caleb_P)\
**Post date:** [October 26, 2015, 6:06pm UTC](https://forums.solar2d.com/t/creating-enemies-on-dusk/336263/21 "2015-10-26T18:06:57Z")

</div>

Something like that. The function is a little redundant, though; you could either split it up into two functions (collidePlayerAndObjects and collidePlayerAndTiles) or just assume everything’s an object and check for tiles as a separate step to fix that.

Also, for your rotation warning, make sure all your objects aren’t rotated at all. Dusk’s “object is rotated” code isn’t anything special - it just checks the value from Tiled. If it reports an object as rotated, Tiled encoded it as rotated, which means it’s rotated in some sense or another. Don’t forget to check **all** your objects.

- Caleb

---

<div class="post-metadata">

**Author:** ![carlos.rafael](https://forums.solar2d.com/letter_avatar_proxy/v4/letter/c/49beb7/32.png) [@carlos.rafael](https://forums.solar2d.com/u/carlos.rafael)\
**Post date:** [December 29, 2015, 3:18pm UTC](https://forums.solar2d.com/t/creating-enemies-on-dusk/336263/22 "2015-12-29T15:18:08Z")

</div>

> [@Caleb\\\_P](#):
>
> Something like that. The function is a little redundant, though; you could either split it up into two functions (collidePlayerAndObjects and collidePlayerAndTiles) or just assume everything’s an object and check for tiles as a separate step to fix that.
> 
> Also, for your rotation warning, make sure all your objects aren’t rotated at all. Dusk’s “object is rotated” code isn’t anything special - it just checks the value from Tiled. If it reports an object as rotated, Tiled encoded it as rotated, which means it’s rotated in some sense or another. Don’t forget to check **all** your objects.
> 
> - Caleb

Hello @Caleb,&nbsp;

I believe I don’t have any rotated object in my maps.&nbsp;  
I have already checked in Tiled, and I created just rectangle objects, with no rotation, they are parallel to the tiles. Do you know if somebody else faced this issue?

Can I create some kind of property on Tiled, like rotate:false?&nbsp;

I also believe the object can’t be culled because of this, and if it worked I guess the performance of my game would be a little bit better, right?

Thank you a lot,

Carlos&nbsp;

---

<div class="post-metadata">

**Author:** ![Caleb\_P](https://forums.solar2d.com/letter_avatar_proxy/v4/letter/c/ee7513/32.png) [@Caleb\_P](https://forums.solar2d.com/u/Caleb_P)\
**Post date:** [December 31, 2015, 1:27pm UTC](https://forums.solar2d.com/t/creating-enemies-on-dusk/336263/23 "2015-12-31T13:27:03Z")

</div>

If that’s the case, can you please PM me the map Dusk claims has a rotated object in it? It could be that Tiled is reporting it in a weird way and I want Dusk to be able to handle that.

- Caleb

---

<div class="post-metadata">

**Author:** ![carlos.rafael](https://forums.solar2d.com/letter_avatar_proxy/v4/letter/c/49beb7/32.png) [@carlos.rafael](https://forums.solar2d.com/u/carlos.rafael)\
**Post date:** [January 5, 2016, 11:29am UTC](https://forums.solar2d.com/t/creating-enemies-on-dusk/336263/24 "2016-01-05T11:29:51Z")

</div>

> [@Caleb\\\_P](#):
>
> If that’s the case, can you please PM me the map Dusk claims has a rotated object in it? It could be that Tiled is reporting it in a weird way and I want Dusk to be able to handle that.
> 
> - Caleb

Hello @Caleb, I am trying to send you the json file, but I am receiving a message telling me I am not permitted to upload this kind of file. Is the json the file you need, right? How could I send it to you?

Thank you in advance

---

<div class="post-metadata">

**Author:** ![Caleb\_P](https://forums.solar2d.com/letter_avatar_proxy/v4/letter/c/ee7513/32.png) [@Caleb\_P](https://forums.solar2d.com/u/Caleb_P)\
**Post date:** [January 5, 2016, 12:17pm UTC](https://forums.solar2d.com/t/creating-enemies-on-dusk/336263/25 "2016-01-05T12:17:38Z")

</div>

You can just put it on DropBox (or another filesharing service) and PM me the link.

- Caleb

[Previous page](https://forums.solar2d.com/t/creating-enemies-on-dusk/336263.md?page=1)
