Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Nightly build breaks my game #1163

Closed
matthijsgroen opened this issue Jan 3, 2018 · 12 comments
Closed

Nightly build breaks my game #1163

matthijsgroen opened this issue Jan 3, 2018 · 12 comments

Comments

@matthijsgroen
Copy link
Member

I want to prepare my game to use the latest version of crafty, but a lot of changes since 0.8.0 seem to break my game:

  • Crafty crashes when removing a component that was not added (fixed in Fix issue with removing a component that was not there #1162)
  • Scenery build up uses parts that are attached to eachother. somehow the attached part is no longer visible (has something changed here?)
  • Normally when the ship touched the edges of the screen, it was merely pushed back. Now, the ship instantly explodes... (has collision detection changed?)
  • The ship even explodes during the intro animation

Is there a clear list of changes so that I know if I need to change some things in my game, or that there are bugs in Crafty that were not detected before?

I've recorded a video of the game running in Crafty 0.8.0, and in the Crafty Nightly build.

https://www.youtube.com/watch?v=2HhmVEDtypk

@starwed
Copy link
Member

starwed commented Jan 7, 2018

There have definitely been some breaking changes; I'll try to put together a full list, but for now I'll link to some PRs that are likely suspects.

There were some changes to how motion works that might be screwing up your game, as well as some implementation changes to collision detection that could be producing bugs. Here are the PRs:

@starwed
Copy link
Member

starwed commented Jan 7, 2018

I compiled a full list of release notes and added them here, with a section listing breaking changes.

I'll hold off on creating a testing branch until we figure out if the problems you're seeing are due to breaking changes or bugs.

@matthijsgroen
Copy link
Member Author

Wow super! I will try to update and make the game compatible If I find anything that is missing I'll report it here.

@matthijsgroen
Copy link
Member Author

matthijsgroen commented Jan 9, 2018

One of the issues was that I used the shift method with only an x provided (assuming the y would automatically be 0) This was not the case, so I needed to add the extra argument for y)

if (x || y) this._setPosition(this._x + x, this._y + y);

@matthijsgroen
Copy link
Member Author

Thanks to the list the game is almost working again! I will close this issue later and add the stuff I needed to change (that could help others)

@starwed
Copy link
Member

starwed commented Jan 13, 2018

Cool, I'm going to go ahead and create an "official" testing branch.

@matthijsgroen
Copy link
Member Author

The only thing that is not correctly working is the collision detection.

collision-issue

I marked the 'Solid' areas in red, and the ship should be kept in this area. for collision with the top and the left of the screen this seems correct, but not with the right or bottom of the screen.

Having a collision 'shape' or just use the entire entity as shape makes no difference (I disabled the shape and show the entire entity with 'SolidHitBox' here.

@matthijsgroen
Copy link
Member Author

With 0.8 the collision is correct, resulting in this:

collision-issue-0 80

@matthijsgroen
Copy link
Member Author

@starwed any hints what I should change to fix this? or is this an issue within Crafty?

@matthijsgroen
Copy link
Member Author

For me the 'Solid' and 'Edge' Items did not have the 'Collision' component. When that is added, the collision is correct again. Is this the way to go?

@matthijsgroen
Copy link
Member Author

Fixed at #1168

@starwed
Copy link
Member

starwed commented Jan 21, 2018

Sorry, somehow didn't get any github notifications for these comments! Luckily I ran into the same collision issue myself, glad it resolved the last (?) of your problems with 0.9 as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants