Learn what Felgo offers to help your business succeed. Start your free evaluation today! Felgo for Your Business

Forums

OverviewFelgo 3 Support (Qt 5) › How to make a tile map game?like Pokemon ?

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #23866

    Felgo User

    I want to make a tile-based game similar to Pokémon. Its characteristic is to have a map made of tiles. My question is how to make such a map? Can felgo be achieved?

    #23872

    Bence
    Felgo Team

    Hi!

     

    You can use the Felgo Level Editor to create tiled maps, and even allow your players to make their own levels if you’d like.

    #23877

    Felgo User

    Thanks for your answer, I finally chose Tiled(a tile based map editor).But I encountered some problems while using it, can you help me? I guess it’s because Felgo has done some work that I don’t know about and is different from the official qt. When I use this dynamic library in qt, it can run perfectly, but when I port the same code to the Felgo project, it will end abnormally at runtime. After investigation, I found that a local variable was declared in a member function of a class that had never been used, and it was this declaration that caused the program to end abnormally. But the same code is no problem in the official qt. I like felgo very much, and hope this project can be written in felgo instead of pure qt. But this problem bothered me. Hope you can help me.

    #23885

    Filippo

    Hi!

     

    I’m glad you chose Felgo for your game. Could you provide a minimal sample that shows the naming collision you’re referring to?

     

    This way we can understand which components are clashing.

     

    Cheers,

    Filippo

    #23894

    Felgo User

    <!–StartFragment –>
    <div>I first created a project on the official qt, in the project there is a MapPainter class I wrote to display the map. In this class, there is a viewMap() function to display the map. The project is running normally, but I created an empty Felgo project. Nothing has been changed in this project. Only the files of this class are added to the project and it cannot be run. I have followed the tutorial to change the live client. Here are some key codes:</div>
    <div>Error on line :</div>
    <div>

    MapReader reader;
    bool MapViewer::viewMap(const QString &fileName, QPainter *painter){
        MapReader reader; // This is the error reported by this statement
        return true;
    }

    I did not show the irrelevant code, only the key code.MapReader is a class defined in the dynamic library.(After testing, I found that many classes in libraries cannot declare objects)

    I added 3 sentences in the pro file:

    INCLUDEPATH += $$PWD/source/
    LIBS += -LD:/IM/Felgo/CppAndQml/CppAndQml/lib/
    LIBS += -ltiled

     

    </div>

    #23895

    Felgo User

    I have found the reason now, because this library was compiled through official qt, so there is no way to use it in Felgo projects. I opened it with Felgo’s creator and recompiled it, and now the library can be used in Felgo. I can finally unload the writing game happily

    #23898

    Filippo

    I’m very glad you managed to fix the issue and thanks for updating us on the progress.

Viewing 7 posts - 1 through 7 (of 7 total)

RSS feed for this thread

You must be logged in to reply to this topic.

Qt_Technology_Partner_RGB_475 Qt_Service_Partner_RGB_475_padded