Jump to content
  • Advertisement


  • Content Count

  • Joined

  • Last visited

Everything posted by Portmanteau

  1. I have used Suse, Ubuntu, Arch, Debian, and Gentoo. I always end up coming back to Debian though. To be specific Debian Testing is what I run on my Desktop and EEE PC. On my server I run Debian Stable. I usually do the base system and install what I need from there manually. My window manager preferences go OpenBox, XFCE, Gnome, then KDE so that might explain some of it.
  2. Portmanteau

    Static objects

    It is not thread-safe.
  3. Looks like the spaces are not being escaped for some reason, usually you either use a \ or just put the file name in quotes. What is happening is that g++ sees C:\Documents and Settings\Brian Davidson\Desktop\c2k\hello.cpp as g++ "C:\Documents" "and" "Settings\Brian" "Davidson\Desktop\c2k\hello.cpp" Sorry, I do not know how to fix it.
  4. There are [ source ] tags. Also, in your properties you need to also link to the lua library in your release configuration, not just the debug configuration.
  5. Portmanteau

    Class distructor never Invoked :S

    If you have allocated the memory for the object on the heap, used new, then you will need to delete it and at that point it will call the destructor. Otherwise if the object is on the stack the destructor will be called when it goes out of scope. The other issue has to do with declaring base class destructors virtual. class GoodBase { public: virtual ~BaseA() { } }; class BadBase { public: BaseB() { } }; Any class that inherits from BadBase will never have their destructors called, GoodBase on the other hand is good to go. You should always* declare the destructor of a class you intend to inherit from as virtual. *Of course there are always edge cases, and cases where this is untrue, but I cannot think of any.
  6. Portmanteau

    writing in memory of another application

    Yeah just send messages to the window.
  7. Portmanteau

    My first (C++ & SDL) Linux Game!

    Oh I haven't run a Windows machine, except when required at school and work, since we support Windows, for a few years. I have a Macbook Pro which I dual boot with Ubuntu, my desktop is Debian testing/unstable, and my server is Debian stable. But I have yet to see anything that Linux does better than Windows, seeing as most(if not all) development libraries and applications are available on Windows as well. The only exception I can really think of is kernel development, which is one of my main reasons for the full switch to Linux, I couldn't imagine trying to compile the kernel in Windows, maybe in Cygwin, maybe... I was just wondering if there was some miraculous Linux development secret out there I had yet to discover.
  8. Portmanteau

    My first (C++ & SDL) Linux Game!

    Quote: sorry LINUX is much easier to program for I am curious as to your reasoning.
  9. Portmanteau

    Gamer Question

    I am going to be honest with you, when I read your post I expected to look and see that you were from a non-English speaking country, only to find you were from Oregon. Come on, were you just not trying at all, or did you lie about being in high school and you are really 4? Anyways, sure a game like Runescape is possible, no it is not illegal if you do not steal any of their assets or content. At the time Java is your only really option for making interactive, and 3D, browser based games. Good luck! Be warned though, RPGs are the hardest type of game to create.
  10. Portmanteau

    System Core class

    It will have to be static, then you will want to put a pointer to your class inside of the GWLP_USERDATA memory of your window with SetWindowPtrLong function, then get it back out with GetWindowPtrLong.
  11. Portmanteau

    Alternatives to the console?

    You can look into the curses libraries, pdcurses on Windows and ncurses on Linux. They keep you in the console, but give you a lot more control. Alternatively you can look into some simple UI work with libraries like GTK+, wxWidgets, and QT 4. EDIT: You can also use ANSI escape codes.
  12. Portmanteau

    Problem with a book I bought...

    You guys are talking about two different things, the topic creator is talking about Visual Basic, you are talking about Visual C++. From what I have heard, and seen, Visual Basic 6.0 and Visual Basic .NET are completely different languages. Hardly compatible at all. I would get my money back if I were you. EDIT: The reason why is that Visual Basic 6.0 is basically dead, no one really uses it, Visual Basic .NET is that much better.
  13. Portmanteau

    GLFW Callback Trouble

    They do not need to be in the global namespace, the compiler just needs to know their location on compile time. That means they will have to be static functions within the class, usually callbacks over a void* to pass the class in, like this. class MyClass { public: static void myCallback(void*); private: void myCallback(); }; void MyClass::myCallback(void* data) { MyClass* my_class = reinterpret_cast<MyClas*>(data); my_class->myCallback(); } I do not really know what GLFW offers though.
  14. Portmanteau

    enumerating files on linux, readdir?

    You will probably want to look into sys/stat.h I will be honest with you, I have never used it before, but it looks like the Posix way to do it. You can also try the less pretty, probably slower, slightly hacky, standard C way. long int getFileSize(const char * filename) { FILE * fp = NULL; long int file_size = 0; fp = fopen(filename, 'rb'); fseek(fp, 0, SEEK_END); file_size = ftell(fp); fclose(fp); return file_size; } Heh, I think that will work :/ I would go the file stat way.
  15. Portmanteau

    Visual C++ 2005

    Inline function definitions need to be in the header file.
  16. Portmanteau

    How can I clear data from SDL_Surface

    Well, you use SDL_MapRGBA because it handles the format of the surface/endianness of the system for you. Those hex values are not going to give you the colors you say they will with a 16 bit surface on a PowerPC processor.
  17. Portmanteau

    Black screen

    Step through it, make sure it reaches the render code, also you probably want to enable your texturing prior to using it, not after. EDIT: Also, make sure your buffers are actually being swapped.
  18. Portmanteau

    How can I clear data from SDL_Surface

    If you post your code we can take a look at it, often times a fresh pair of eyes can spot things in your code very quickly that you wouldn't otherwise notice. It has saved me more than a few times.
  19. Portmanteau

    silhouette from an image

    Well if you know that every pixel outside of the shape will be transparent you can do something simple like, if the pixel is not transparent and their is a transparent pixel touching it, then add it to the list of edge pixels.
  20. Portmanteau

    VS2008 Stupid question...

    I agree, I wasn't around when Visual Studio 6.0 was being used, but I have only heard awful things about it. For instance, at work I deal on a regular basis with code that uses housemade(broken) data structures because STL support was so poor in Visual Studio 6.0.
  21. Portmanteau

    hello and thanks

    I don't know what tutorials you are reading but having two separate else statements for a single if will get you no where, if-else is an either-or thing, not an either-or-or thing. I suggest you learn C/C++ before attempting to understand Win32/DirectX code.
  22. Portmanteau

    How can XML be used in a game

    It is used to store data in an human readable format. It is very organized and lends itself well to tree structures, which occur very often in the real world, and thus in games. I have used it for UI stuff ie <?xml version="1.0"?> <dialog name="create_player" width="400" height="300"> <combo_box name="race" x="10" y="10" label="Choose your race: "> <item>Elf</item> <item>Human</item> </combo_box> <button name="continue" x="10" y="80">Continue</button> </dialog> something like that, then you have basic loading code, makes adding UI easy. Ogre3D uses XML for model/animation files, I have used it for maps, I tend to use it for everything. I have even used it on web based things over SQL, looking back, probably not a good choice.
  23. Personally when I was doing a lot with binary, hexadecimal became basically the same thing, it was maybe a .13 second delay between seeing the hexadecimal and knowing the binary. Actually it was much easier when working with large numbers to use hexadecimal representations
  24. Portmanteau

    Text wrapping

    Try this don't know how well it works though.
  25. Portmanteau

    implicit op*

    In your temp class there is a single argument constructor, that will cause an implicit cast from the argument type to the class. If you do not want this then declare the constructor explicit. class temp { public: explicit temp(int in) : val(in){}; const temp operator* (const temp& in) const { temp t(0); t.val = (this-&gt;val * in.val); return t; }; int val; }; EDIT: source tags :/
  • 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!