Jump to content
  • Advertisement

SleepySlowpoke

Member
  • Content Count

    4
  • Joined

  • Last visited

Community Reputation

112 Neutral

About SleepySlowpoke

  • Rank
    Newbie
  1. I made this thread to ask exactly what and how to make a class file for a game that controls all of the different screens and events. I'm still somewhat new to programming and game making so I've been watching a few game making tutorials in C++ but all they do is tell you EXACTLY how to put the code in without exactly teaching you what it does and how it works, that's a problem as I don't want to just make a game by copying someone else's exact code, I'd rather then just get his/her source code for his/her game engine. I wish to learn what all the processes in the code are doing or at least the basics.   I wish to make a 2D Platformer using SFML as my API if that helps at all.
  2. SleepySlowpoke

    SFML Directory or File not found

      I changed it to <ScreenManager.h> but it still gives me the same error
  3. SleepySlowpoke

    SFML Directory or File not found

      It is ScreenManager.h but the other part is ScreenManager.cpp
  4. I'm starting off and making my first video game, as of now I'm working on the starting screen and title screen. I've made a GameScreen, SplashScreen, and finally a ScreenManager file.   The ScreenManager file itself is coded as so (Reminder: I just started this a few hours ago and don't entirely know what I'm doing so don't judge).   #ifndef SCREENMANAGER_H #define SCREENMANAGER_H #include<string> #include<iostream> #include"GameScreen.h" #include"SplashScreen.h" #define ScreenWidth 1600 #define ScreenHeight 900 class ScreenManager {     public:         ~ScreenManager();         static ScreenManager &GetInstance();         void Initialize();         void LoadContent();         void Update();         void Draw(sf:: RenderWindow &Window)         virtual ~ScreenManager();     protected:     private:         GameScreen *currentScreen, *newScreen;         ScreenManager();         ScreenManager(ScreenManager const&);         void operator=(ScreenManager const&); }; #endif // SCREENMANAGER_HMy main file is as so   #include <iostream> #include<SFML/Graphics.hpp> #include<ScreenManager.hpp> using namespace std; int main() { sf::RenderWindow Window(sf::VideoMode(ScreenWidth, ScreenHeight, 32), "Dash") while(Window.isOpen()) { sf::Event event if(Window.GetEvent(event)) { if(event.Type == sf::Event::Closed || event.key.code == sf::Key::Escape) Window.close(); } } return 0; } I get an error with #include<ScreenManage.h> saying that there is no such file or directory when compiling.   I've checked the name and don't really have enough knowledge or experience to fix the problem by myself, google as well hasn't really helped so if anyone could help me or direct me to a tutorial on how to fix this I would greatly appreciate it.
  • 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!