Jump to content
  • Advertisement


  • Content Count

  • Joined

  • Last visited

Community Reputation

585 Good

About oler1s

  • Rank
    Advanced Member
  1. > I thought if a variable is global, any part of the program could read it. C++ source files are compiled independently. That's why you need to declare something that was not defined earlier within the source file, that you are compiling. > How would I go about making this main.hpp file? How do you make any file? > Would it be okay if i just make externs in the button.h file? So declarations for globals in the main.cpp file are declared in button.h file. Do you find this to be logical code organization?
  2. In button.cpp, where do you declare clips? > its in the main file as a global. Yes. But the issue is in button.cpp, right? Where did you declare clips in button.cpp?
  3. oler1s

    Biting off more than I can chew?

    Probably the best advice is to learn the hard way. Your expectations aren't in line with your idea (create an engine). There's two ways to resolve this. One is to heed all existing advice against creating engines, and just focus on making your game, taking advantages of existing engines and so on. At a certain point in the future, when you have significant experience writing games, you'll be able to revisit the topic of engines. The other is to embark on your goal of creating an engine.
  4. I think you are looking for MSDN. Google for MSDN Visual Studio .
  5. oler1s

    How to get introduction about lib files?

    Start by reading about Static libraries, which is what a lib file is.
  6. oler1s

    Confused Beginner

    > But I am very confused about which resource would be the most helpful for this kind of programming You first need to decide on a GUI toolkit. Often you'll just rely on online available documentation and samples to figure out how to work with that toolkit. > I've looked into books, but as far as I've understood, the most popular book by Charles Petzold, Programming Windows Most popular only for using the Windows API to create a GUI. > is written with C in mind? The Windows API is a C API. In any case, you shouldn't be too particularly concerned about whether it's in C or C++. If you're experienced enough to tackle programming a GUI, you're experienced enough to handle any C idioms...and you certainly shouldn't be struggling with the language. > And would such a book as Programming WIndows be wise to read before starting anything like Direct3D or OpenGL-programming? You need to figure out how you're going to get a window open, handle events, etc. Direct3D and OpenGL handle the rendering pipeline. And that's it. So you need to be able to create a GUI, handle input events, and so on. Whether you use the Windows API itself is up to you. I think if you're end objective is to render on screen as quickly as possible, the Windows API is a poor choice for a beginner. Too much plumbing work for no reason. > Would an huffman-coder be anywhere near possible at a beginner's level? Depends on what beginner means. If beginner means you just read the book and haven't been writing any programs, that's too much. On the other hand, if you can write programs of some complexity already, this shouldn't be too hard given some time. A quick test is to take the problem and just break it down into what you need to do. Huffman coding is already rather well explained, so you shouldn't have any trouble decomposing the work into chunks. If you're having trouble seeing how you would even approach constructing the program, that's a problem.
  7. oler1s

    Looping through a std::vector

    And what's with the cast? The datatype you should use is size_t, not int.
  8. I have often come across the general opinion that an application written in Python *is* slower than its C equivalent, should all the above-mentioned parameters (experience etc.) be equal.[/quote] Sure, but what's your point? You want to know if you should discard Python as a valid choice. We're telling you that the performance concerns you have about Python aren't going to apply in your case. Now, either you'll accept that, or you won't. Make your decision, and then take action.
  9. oler1s

    CPP, SFML Tutorials newbie question

    Your handling of error messages should not be binary. It's a message so read it. If you can't understand the message, Google and find out what they are saying. Don't just mentally flail on the presence of any error message. > unresolved external symbol "__declspec(dllimport) public: virtual __thiscall sf::Window::~Window(void)" (__imp_??1Window@sf@@UAE@XZ) referenced in function _main It can't find the implementation of the various Window functions. Which would mean you didn't link the sfml window library.
  10. Show us your attempt at an array declaration.
  11. oler1s

    When/Why to Move to C++?

    If you think C++ is about low level access, give examples. Also, do you think C++ is portable? C++ is a nuanced language. If you think it's not, try answering this question, which is a repost of a question I saw earlier: What is the difference between: A *a = new A; and A *a = new A(); Answer that without Googling.
  12. oler1s

    When/Why to Move to C++?

    I've heard a lot of people all over the place though, admittedly, mostly on the internet saying that C++ is used more widely in the gaming industry.[/quote]This is true. The problem beginners seem to have is that they then reach an undesirable conclusion: C++ is best language to use for games. This is absolutely incorrect. What is widely used is not the same as what you need to use. What you need to use depends on your requirements. If it happens to be C++, then it's C++. If not, you need to pick appropriate tools. I've also heard that beginners shouldn't start in C++[/quote]Also very true. Except in a few circumstances, beginners benefit from picking another easier language. C++ is a hard language, particularly so with the non beginner friendly informational resources. why switch to C++[/quote]When you hit a requirement that C++ solves. Beginners do not encounter such a requirement. how much programming experience should I have before starting in C plus plus[/quote]When programming is a language and technology agnostic task for you.
  13. I'm assuming you mean Direct3D 11, as opposed to DirectX 11. The basic principals of graphics application (i.e. the math) haven't changed. They don't change API to API. You should be able to use the D3D10 books and the SDK samples to make your way through D3D 11. You also don't download the DX10 SDK or whatever. The releases are by year and month, and at every release, something is removed or added. You have everything down to Direct 3D 9 in the latest SDK.
  14. oler1s

    Allegro Linker Error

    > Well the definition is in the gameEngine.cpp At global scope? "And here is a snippet of my gameEngine.cpp in the 'init()' function" So all those definitions are at function scope, which doesn't correspond to the global declarations. > But even if it couldn't I've also tried placing the definitions in different places such as in Main.cpp and Even in the Bitmaps.h The definition goes in a cpp file. Not in a header file. > .I've also tried using it without extern. Turning your declaration in a header file into a definition. Not correct.
  15. oler1s

    Allegro Linker Error

    So take the first error, for example: > gameEngine.obj : error LNK2001: unresolved external symbol "struct BITMAP * menu_exit" (?menu_exit@@3PAUBITMAP@@A) You've used menu_exit in your code, but the linker can't actually resolve that to a variable. I.e., it can't find the definition. So...you have to ask yourself, where is the definition?
  • 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!