surajsharma90 / sfml_rpg Goto Github PK
View Code? Open in Web Editor NEWRPG game made in SFML using C++
RPG game made in SFML using C++
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.
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 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?
It would be nice if you had a README in here explaining how to run it...
thanks!
How can you declare sf::Sprite object as referance in MovementComponent header?
Hey man, you have been doing a good job! It would be nice if you add linux support to the project.
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.
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?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.