Jump to content
  • Advertisement


  • Content Count

  • Joined

  • Last visited

Community Reputation

163 Neutral

About Sarkurd

  • Rank
  1. Sarkurd

    delet ite

    please delete it
  2. Sarkurd

    Whats tile Map?

    Thank you guys
  3. Sarkurd

    Whats tile Map?

    Hi guys whats tile map and whats the advantages of using it?
  4. Sarkurd

    Tips for a Beginner

    if you're late to learn programming then i have to give up now cuz i'm 21 and it's only been 5 months i try to learn c++ and SFML
  5. Sarkurd

    Control Frame Rates in SFML

    i didn't understand :( but i watched CodingMadeEay tutorial and it warked but i don't know why did he put 100 to FrameSwitch and 500 for the FrameSpeed. float FrameCounter=0, FrameSwitch=100, FrameSpeed=500; FrameCounter += FrameSpeed * MyClock.restart().asSeconds(); if (FrameCounter >= FrameSwitch){ FrameCounter = 0; }
  6. Sarkurd

    Control Frame Rates in SFML

    i don't whats the mistake but it doesn't work  :/     i don't know how to detrmine the time  could you please write the code :D
  7. Hi I'm at the beginning of learning SFML , i wrote a program to show the character moving around but it moves too fast i want to control its speed and calculate frame rates per second but i have no idea how to do that here is my code #ifdef SFML_STATIC #pragma comment(lib, "glew.lib") #pragma comment(lib, "freetype.lib") #pragma comment(lib, "jpeg.lib") #pragma comment(lib, "opengl32.lib") #pragma comment(lib, "winmm.lib") #pragma comment(lib, "gdi32.lib") #endif // SFML_STATIC #include <SFML/Graphics.hpp> #include <iostream> #include <string> const int Window_Width = 800; const int Window_Height = 600; const std::string Window_Name = "My First SFML Game"; int main() { sf::RenderWindow window(sf::VideoMode(Window_Width, Window_Height), Window_Name, sf::Style::Close); window.setPosition(sf::Vector2i(250, 50)); // change position of the window window.setKeyRepeatEnabled(false); enum Dirction{ Down, Left, Right, Up }; sf::Vector2i source(1, 0); sf::Texture pTexture; sf::Sprite sPlayer; if (!pTexture.loadFromFile("Player.png")){ std::cout << "Error loading the Texture" << std::endl; return -1; } sPlayer.setTexture(pTexture); //Sprite sf::Event MyEvent; while (window.isOpen()) { while (window.pollEvent(MyEvent)) { switch (MyEvent.type) { case sf::Event::Closed: window.close(); break; } } if (sf::Keyboard::isKeyPressed(sf::Keyboard::Down)){ source.y = Down; sPlayer.move(0,1); } else if (sf::Keyboard::isKeyPressed(sf::Keyboard::Left)){ source.y = Left; sPlayer.move(-1, 0); } else if (sf::Keyboard::isKeyPressed(sf::Keyboard::Right)){ source.y = Right; sPlayer.move(1, 0); } else if (sf::Keyboard::isKeyPressed(sf::Keyboard::Up)){ source.y = Up; sPlayer.move(0, -1); } source.x++; if (source.x * 32 >= pTexture.getSize().x) source.x = 0; window.clear(); sPlayer.setTextureRect(sf::IntRect(source.x * 32, source.y*32, 32, 32)); window.draw(sPlayer); window.display(); } return EXIT_SUCCESS; } Thanks
  8. yes i'm about to learn SFML
  9. Hi I started to make game but i really don't understand whats Sprite, Texture,  and bitmap images vs normal png and jpeg images sorry but i really don't know :D     Thanks  
  10. Sarkurd

    Lib folder in SDL2 missing

    I'll try to download it later i just upgraded my windows       Thank you it worked fine
  11. Sarkurd

    Lib folder in SDL2 missing

      I use Windows 8.1 and VS2013     That is usually the result of missing dependencies, especially on Windows where no general automatic library detection exists. Look at the output lines before that and see what exactly is failing. It's also possible you can just deactivate dependencies you do not need by setting the right options in CMake.   here its the error The C compiler identification is MSVC 18.0.30501.0 Check for working C compiler using: Visual Studio 12 Check for working C compiler using: Visual Studio 12 -- works Detecting C compiler ABI info Detecting C compiler ABI info - done Could NOT find PkgConfig (missing: PKG_CONFIG_EXECUTABLE) 0.2.1 :: 2 :: 1 :: 2 :: 2.0 Performing Test HAVE_WIN32_CC Performing Test HAVE_WIN32_CC - Success CMake Error at cmake/macros.cmake:28 (message): *** ERROR: DIRECTX requires the $DXSDK_DIR environment variable to be set Call Stack (most recent call first): CMakeLists.txt:798 (message_error) Configuring incomplete, errors occurred
  12. Sarkurd

    Lib folder in SDL2 missing

    I tried to build it with CMake but i got an error "Error in configuration process, project files may be invalid"
  13. Hi guys i downloaded SDL2 a while ago but i can't find lib folder in SDL2-2.0.3 :/   sorry if that's a stupid question  
  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!