Code Monkey home page Code Monkey logo

sfml_rpg's People

Contributors

surajsharma90 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

sfml_rpg's Issues

Issue with shader

Hey,
I just found your video series and the source code for the RPG, I manage to build it and found a lot of interesting stuff so first of all thank you!
However I have a problem when I click "New Game", it crashes with a shader error in the console:

Failed to compile vertex shader:
WARNING: 0:1: '' :  #version directive missing
WARNING: 0:1: 'varying out' : symbol not available in current GLSL version
ERROR: 0:1: 'varying out' :  supported in fragment shaders only


ERROR::GAMESTATE::COULD NOT LOAD SHADER.

Any idea what is the problem? and maybe a hint on how to fix or work around this?

I know C++ very well, just started SFML (built 2.5.1 from source on Windows with MinGW 12.2.0, I do have a NVidia GPU on the machine) but I have very limited knowledge on shaders.

Improper initializing loop in TileMap.cpp

While writing constructor of TileMap to initialize vector, there is one extra loop of layers that can be removed and resize statements should go outside the for loop. So, we resize all x coordinates by one statement, then for every x, we resize y, then for every y, we resize z. While in present code, we are resizing y for size of y, which will throw error if we go for rectangular map.
Resolution snippet:

// Initialize map
m_Map.resize( m_MapSize.x, std::vector< std::vector< Tile* > >() );

for ( int x = 0; x < m_MapSize.x; x++ )  {
m_Map[x].resize( m_MapSize.y, std::vector< Tile* >() );

    for ( int y = 0; y < m_MapSize.y; y++ )  {
        m_Map[x][y].resize( m_Layers, nullptr );
    }
}

Why "this" pointer in the every method?

Why do you use this pointer in every method, when how is it implicit and instead:

this->doSomeThing(); or this->m_age = 42;

You can use just:

doSomeThing(); or m_age = 42;

It's your code style?

Start Guide?

It would be nice if you had a README in here explaining how to run it...

thanks!

Add linux support

Hey man, you have been doing a good job! It would be nice if you add linux support to the project.

Crash in editor loading larger map than was previously initialized

If EditorState initializes a TileMap with, say, a 10 x 10 map, then tries to use loadFromFile to load a map with larger size, clear() crashes.

loadFromFile changes the values in maxSizeWorldGrid before calling clear(). clear() uses these values as bounds when accessing TileMap* map.

In TileMap::loadFromFile(), clear() needs to be moved from line 283 to 269. I.E. it needs to be moved before maxSizeWorldGrid in changed.

Unable to start correctly 0x000007b

While i clone the code and try to run it on my vs studio.
The file compiles succes fully with zero erro but it could run the game why is that?

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.