hoshi10 / OpenSkyscraper

Open source tower simulation game inspired by SimTower, based on SDL, OpenGL and OpenAL. #opentower on freenode.net
https://github.com/fabianschuiki/OpenSkyscraper/wiki
1 stars 0 forks source link

Latest commit adding Floor item breaks code from upstream #1

Closed hoshi10 closed 11 years ago

hoshi10 commented 11 years ago

Many changes which have been introduced with the addition of the Floor item conflict with upstream code. Some manual de-conflicting is necessary.

Also, bugs spotted with floor extension code.

fabianschuiki commented 11 years ago

Maybe the Floor item could behave in a way similar to Lobbies: It is not drawn behind existing items. But when an item is removed, it is replaced by a floor item of the same dimension. Adjacent floor items are collapsed into one. If an item is built ontop of a floor item, the floor item is split into the part on the left of the item and a part on the right of the item. This would remove the nasty sky color issues, although it is a bit more complex to implement.

Another approach would be to only draw the floor items when they are not covered by an item. This would require a map of what segments of a floor are covered and need not be drawn. I have the feeling though that this will boil down to the former approach being more feasible.

hoshi10 commented 11 years ago

Thanks for your suggestions! Having 1 floor item per floor is a much simpler option and can double up as an easy check for maximum floor width on either end. I hope to continue in this direction unless it becomes more complicated than the alternatives you've mentioned.

Your 2nd point has reminded me of another possible approach I had though about earlier, but not in depth. Perhaps it is time to revisit it and see if it can be expanded upon.

fabianschuiki commented 11 years ago

Sounds good :) I won't touch too much of construction-related stuff in my branch then, so that we don't run into any more merging trouble.

hoshi10 commented 11 years ago

Merging new floor code with upstream completed in commit 4f5111248d47e10d80677c956183799b9cad438b