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

initial work on tiled integration #117

Closed
wants to merge 6 commits into from
Closed

initial work on tiled integration #117

wants to merge 6 commits into from

Conversation

labuzm
Copy link
Contributor

@labuzm labuzm commented Feb 14, 2016

No description provided.

@rocktavious
Copy link
Contributor

LGTM. I've been working on understanding the cython build process a bit more indepth, so I can make iterating on the module a much nicer situation. See my pull request - #118

@rocktavious
Copy link
Contributor

After thinking on this a bit, my only comment would be, the name of the module, tiles, seems more generic then the integration we are writing. @labuzm what are your feelings on renaming the module to be "tiled" since its strictly a tiled integration, similar to the cymunk, module.

@Kovak
Copy link
Contributor

Kovak commented Feb 23, 2016

Perhaps it is time to have a generic, cythonized Animation module in place of the specific TiledAnimator. I will come up with a design for one in the next week.

Things to consider:

  1. Tiled has 3 types of maps supported: orthagonal, hexagonal, and isometric, we'll need different math for each. Our system should reflect this.
  2. It'd be nice to support various types of handling edges -> infinite wrapping, simple boundary we can't go beyond, and asteroids style wrap around to the other side of the map.
  3. Have ya'll seen this blog I did a few weeks ago: http://chaosbuffalogames.com/blog/near-infinite-wrapping-tile-worlds-in-240-lines.html
    It's got a great example of how you can make a GameSystem that creates entities that use different GameSystems. The eventual TiledSystem should be something like this, and we'll have to come up with some nice solution for controlling the renderers that tile layers get drawn to. I usually do something like either give the responsible game system (in this case TiledSystem) StringPropertys referencing the system_id for the appropriate renderers, or objectproperties referencing the actual system.

@spinningD20
Copy link

Hi guys, I was wanting to check out your progress, but I'm not seeing what tmxloader is that it's referencing. Is there an external library you're pulling that from, or what am I missing?

I am very much looking forward to official Tiled support, for all three map types. Level editing IMO in Tiled is worlds (see what I did there) better than an integrated editor in say...GameMaker, Construct, Godot, etc...

Thanks!

@labuzm
Copy link
Contributor Author

labuzm commented Mar 8, 2016

Sorry for the delay I've been really busy recently.
@rocktavious as for the name, I'm totally for it.
@spinningD20 yes this code uses external lib, you can find it here: https://github.com/labuzm/Tmxloader
@Kovak any news about the animation module?

@udiboy1209
Copy link
Contributor

@labuzm thats a nice start to integrating Tiled! I want to take this up as my GSoC project under kivy. @Kovak @rocktavious could you tell me what needs to be implemented further and how? And some help regarding the timeline of this project will be appreciated!
Thanks!

@Kovak
Copy link
Contributor

Kovak commented Apr 29, 2016

it should be mentioned here that @udiboy1209 was selected to work on tiled integration as part of GSoC! The community bonding period is just starting and he will begin work on May 23. :)

@labuzm
Copy link
Contributor Author

labuzm commented Apr 29, 2016

Great news! :)

@labuzm
Copy link
Contributor Author

labuzm commented Apr 29, 2016

What is the plan, you gonna start over from scratch or you want to use existing code?

@Kovak
Copy link
Contributor

Kovak commented Apr 29, 2016

@udiboy1209 what do you think?

@udiboy1209
Copy link
Contributor

@labuzm I had seen this PR when I was planning my timeline for GSoC, and had planned to understand it and maybe reuse some of your code. Now that you have finished a complete implementation, I'll most probably begin working on this itself. You can check my proposal which has a complete plan of what I am going to do. And maybe point out what you have finished.

@Kovak we may have planned some of the implementations a bit differently, like creating the animation system separate of Tiled module, and probably haven't thought about creating an atlas from the tmx but rather parse it directly. I certainly feel I can reuse most of @labuzm 's code and restructure it to come out as we had planned. What do you feel?

@Kovak
Copy link
Contributor

Kovak commented Apr 29, 2016

I do think we should continue on splitting out the animation functionality. KivEnt need such functionality that is good for all use cases, and then we can better focus on making optimizations once that match everyone's needs.

There is much to still be done, and I typically make all the built in modules cython gamesystems with some more optimizations so that we leave more room in a frame for users logic. I think this could be a great starting point, but we will probably tear things up and separate functionality a little differently.

GameSystems should typically represent exactly one feature, encompassing only the unique data required to accomplish that feature, and relying on pre-existing components when possible, such as using a ColorComponent to store color data instead of adding a new color array to your gamesystem component. There are several big benefits to this:

  1. We can think more clearly about optimization for particular features as when we optimize say the animation system, we do not need to think about anything else, the renderers, the tiled systems, whatever. We can think very clearly and specifically about only the data and processing that makes up an individual problem.
  2. We can reuse logic better, by using the shared simple components to hold simple data we make sure every GameSystem interacts in familiar ways and we also avoid situations where we have to duplicate code changes across various parts of the code base, we can also hopefully mix and match our various systems in unexpected ways to produce new game features with a minimum of effort.
  3. It becomes easier to reason about logic bugs in our code, as everything becomes as minimally coupled as possible. For instance, the physics system writes to the position and rotate components, and the render system reads from them. We can never have some bug occur between the render and physic systems interactions that does not occur inside position or rotate system. This way gamesystems can know as little about each other as possible, minimizing the need to reason about interactions between unexpected parts of the codebase.

@labuzm
Copy link
Contributor Author

labuzm commented Apr 29, 2016

Sounds great! There is one thing you might be interested in. Check out https://github.com/labuzm/Tmxloader it’s MIT licensed, so fell free to use/modify it.

@Kovak
Copy link
Contributor

Kovak commented Apr 29, 2016

I definitely think tmxloader will be used 👍

@udiboy1209
Copy link
Contributor

TmxLoader certainly looks very useful 😁 👍 !

@labuzm labuzm closed this Sep 19, 2016
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

Successfully merging this pull request may close these issues.

5 participants