Coder Social home page Coder Social logo

Comments (8)

TheCycoONE avatar TheCycoONE commented on May 5, 2024

I've been reading into how SDL2 might be mixed with a gui library like wxWidgets, for instance they discuss the topic in the SDL forums here ( https://forums.libsdl.org/viewtopic.php?p=39332&sid=f05ee8efa396f3bc4b74f97e8c58a4c5 ).

Unfortunately I haven't found any solutions, besides porting the GUI portion of the map editor to SDL2, or making an OpenGL map viewer just for the editor.

@jorgenpt I remember you were talking about a possible option with this, could you elaborate here?

from corsixth.

mrtnptrs avatar mrtnptrs commented on May 5, 2024

How are we going to handle this? @jorgenpt

from corsixth.

jorgenpt avatar jorgenpt commented on May 5, 2024

@TheCycoONE I think what I was referring to was SDL_CreateWindowFrom, but it seems like that method is not yet usable, as it does not work with OpenGL contexts. Rewriting the GUI portion using SDL2, or ensuring that SDL supports a way of creating a window with OpenGL capabilities from an existing window and then that the SDL_Render functionality works with it as intended (with a restricted viewport) are likely our best two options.

I can investigate the latter one the next time I have some free time - I'm a committer to SDL, so I can try to get the necessary changes in the next release, since others need it too.

This looks to me to be one of the large remaining pieces for full SDL2 support, correct?

from corsixth.

MarkL1961 avatar MarkL1961 commented on May 5, 2024

I am sure that I have mentioned this before somewhere, if there are issues with the map editor and sdl2, why not leave it as it is? The map editor does not get many updates to it and it is a stand alone exec anyway. So does it matter that you need opengl to compile it, it has other dependencies that the main game does not need?

from corsixth.

TheCycoONE avatar TheCycoONE commented on May 5, 2024

@jorgenpt yes, I think this is the only thing holding back sdl2 at the moment. The music regression is annoying but not the end of the world.

@MarkL1961 The map editor shares a large amount of code with the game, and that code is dependent on sdl1. We could release a package containing the old map editor compiled out of the 0.30 branch with the rest of the components from the sdl2/0.40 branch but it isn't a long term solution.

We have a number of options. Probably the nicest, but the most work, is to port the map editor away from using wxWidgets. On the other side of the spectrum, we could clone CorsixTH based off the 0.30 branch, and strip out everything not related to the map editor so it becomes it's own SDL1/OpenGL project with it's own release cycle and own installer. (Presumably the level editor would live there too)

from corsixth.

rallymoose avatar rallymoose commented on May 5, 2024

just a tip... take a look at: https://github.com/bkaradzic/bgfx#what-is-it
or maybe https://github.com/Olivier-Boudeville/OSDL-Heavy
might help?

from corsixth.

TheCycoONE avatar TheCycoONE commented on May 5, 2024

The approach I've been advocating for is to make the map editor part of CorsixTH with SDL2. This allows reusing the most code. I have been suggesting that people could take over from my own early experiments with this at https://github.com/TheCycoONE/CorsixTH/tree/sdl2_mapedit_builtin if they want, or start from scratch and copy the functionality out of MapEdit into CorsixTH dialogs.

That said, if someone submits a cross platform map editor that works (using any technology, toolkit, or rendering engine) it will be appreciated.

from corsixth.

Lego3 avatar Lego3 commented on May 5, 2024

We are working on integrating the Map Editor into the game, that is being tracked in #639 .

from corsixth.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.