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

Maps for structures- Use images? #245

Open
kd7uiy opened this issue Feb 25, 2019 · 7 comments
Open

Maps for structures- Use images? #245

kd7uiy opened this issue Feb 25, 2019 · 7 comments

Comments

@kd7uiy
Copy link
Collaborator

kd7uiy commented Feb 25, 2019

Quill18 once showed a neat way to do platformer games using image files. I was considering using this for this game for the initially defined ship, for instance. This would allow for an easier time editing the map, and easier to see what is actually there. https://www.youtube.com/watch?v=5RzziXSwSsg is the video, for reference.

In any case, I really don't think we want to use a real save file, including loading the world, for the initial base, such as we are doing now. Another solution might be better, but...

@NogginBops
Copy link
Contributor

How would you handle having both tile and furniture plus different z-layers?

@kd7uiy
Copy link
Collaborator Author

kd7uiy commented Feb 25, 2019

Both tile and furniture could be just using different channels. We could reserve one channel for the tiles, and the other two for furniture, which should give plenty of options. Different Z-layers is a bit trickier, either use multiple images, or else partition one image in to different sections for the same structure.

@NogginBops
Copy link
Contributor

We could also just use multiple images or other formats like TIFF that allows for multiple layers.

@koosemose
Copy link
Contributor

That still leaves out utilities, roombehaviors, and any other possible object types we may have. And is also more difficult to edit than a save file, as a save file can be relatively simply loaded and just edited and resaved. The most complex part is needing to copy the save file to your save directory (I don't think our load allows you to navigate the file system, and dealing with things running that you may not want to.

@NogginBops
Copy link
Contributor

Yeah I think that maybe like a structure editor might be something to have our sights on for the future. That way we can just use the same serialization that we have. Though an image format might be faster to load, but I don't think that deserialization times are our current bottleneck.

So I'm for it if it has some other benefit to being 'easy' to edit. Which it is not clear it will do, what if our IDs change? What color means what? How do we make it consistent?
There are a lot of questions before this can be really implemented.

@kd7uiy
Copy link
Collaborator Author

kd7uiy commented Feb 25, 2019

Forgot utilities. I didn't even know room behaviors was such a thing... In any case, I would be happy if we can figure out a way to do this without using a whole new world.

@koosemose
Copy link
Contributor

I don't see an image editor ever being easier, even assuming we are able to keep colors consistently translated, having to constantly reference some chart on what parts of colors translate to what is going to be a pain at best.

And I'm not sure I see what the issue with a save file is anyways, it's basically just using the serialized version of the objects, and loading it is trivial. The only issue is that as it is now, it is running SetupWorld twice, which creates some objects so that has to be fixed.

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

3 participants