fireshadow4126

Members
  • Content count

    60
  • Joined

  • Last visited

Community Reputation

113 Neutral

About fireshadow4126

  • Rank
    Member
  1. Segmentation Fault When Calling Draw Function

    Never mind, I was able to solve it. It turns out that my implementation of a linked list was messed up, so there were some bad pointers in there. On to fixing the next problem!
  2. Hello, I'm working on my game framework. It compiles fine, but when I run the executable (which is eventually going to be a working game), I get this message from gdb: [CODE] Program received signal SIGSEGV, Segmentation fault. 0x00007ffff7b73152 in Survive::Game::TwoD::Entity2D::draw (this=0x91a, display=0x640f20) at libsurvive/src/game/2d/Entity2D.cpp:26 26 spr.draw(display, x, y); [/CODE] This is the definition of Entity2D::draw: [CODE] void Entity2D::draw(SDL_Surface *display) { spr.draw(display, x, y); } [/CODE] [i]display[/i] is a pointer to the screen, I know it is valid. [i]spr[/i] is the entity's underlying sprite. I know it has been constructed correctly, because the entity initialized fine. [i]x[/i] and [i]y[/i] are the coordinates to draw the sprite at. They have both been instantiated. What might be causing this then? I'm working in Ubuntu, using makefiles generated by premake to build. Thanks in advance!
  3. Symbol Lookup Error When Executing Main

    I'm on Ubuntu and I use the command line. I've been able to run the executable with the shared library before, and I haven't changed the locations of either, I just added the Sprite, Graphics2D, etc to the library. So the locations of the executable and the shared library aren't the problem.
  4. Best book to get me started with 3D

    [i]Game Engine Architecture [/i]by Jason Gregory. Lots of math, good sections on physics, animations, etc. Note you don't necessarily have to be creating an engine to benefit from it.
  5. Hello, I posted this same question in Game Programming, but only after I posted it did I realize this is a more appropriate place to ask. Anyway, I'm working on my game framework in C++. It is composed of a shared library containing all the features and an executable used to test the features (The executable will eventually become a working game). The library and executable both compile and link fine, but when I try to execute it, I get this error: [CODE] main/bin/debug/main: symbol lookup error: main/bin/debug/main: undefined symbol: _ZN7Survive8Graphics4TwoD6SpriteC1Ev [/CODE] Survive::Graphics::TwoD::Sprite is a sprite class for 2D images. I'm wondering, what would cause this error? Sprite and Graphics2D, a class used to draw to a given Sprite, are both defined in Sprite.hpp and implemented in their respective .cpp files. Could this be a cause of the problem? Otherwise, what would cause this? Thanks in advance!
  6. Symbol Lookup Error When Executing Main

    (Sigh). I think this might be the wrong forum for this, I'll try General Programming. EDIT: Scratch that, I didn't know you couldn't "double post."
  7. Symbol Lookup Error When Executing Main

    Yes, I use premake to generate my make files, and I generated them again, so all .cpp modules are included in the shared library. And yes, there is a constructor for Sprite that takes no arguments defined in Sprite.cpp.
  8. Hello, I'm working on my game framework in C++. It is composed of a shared library containing all the features and an executable used to test the features (The executable will eventually become a working game). The library and executable both compile and link fine, but when I try to execute it, I get this error: [CODE] main/bin/debug/main: symbol lookup error: main/bin/debug/main: undefined symbol: _ZN7Survive8Graphics4TwoD6SpriteC1Ev [/CODE] Survive::Graphics::TwoD::Sprite is a sprite class for 2D images. I'm wondering, what would cause this error? Sprite and Graphics2D, a class used to draw to a given Sprite, are both defined in Sprite.hpp and implemented in their respective .cpp files. Could this be a cause of the problem? Otherwise, what would cause this? Thanks in advance!
  9. Undefined Reference to Array members

    Wow I never knew that. Thanks a lot!
  10. Hello, I'm programming a game engine in C++, mostly for educational purposes. I have a custom generic array class (mostly so that I can add better handling of dynamic allocation later) and everything compiles fine, but when I try to link I get this: [code] libsurvive/bin/debug/libsurvive.so: undefined reference to `Survive::System::Array<Survive::Math::Vector3>::~Array()' libsurvive/bin/debug/libsurvive.so: undefined reference to `Survive::System::Array<Survive::Math::Vector2>::~Array()' libsurvive/bin/debug/libsurvive.so: undefined reference to `Survive::System::Array<Survive::Math::Vector3>::Array()' libsurvive/bin/debug/libsurvive.so: undefined reference to `Survive::System::Array<Survive::Math::Vector3>::resize(unsigned long)' libsurvive/bin/debug/libsurvive.so: undefined reference to `Survive::System::Array<Survive::Math::Vector3>::size() const' libsurvive/bin/debug/libsurvive.so: undefined reference to `Survive::System::Array<Survive::Math::Vector2>::Array()' libsurvive/bin/debug/libsurvive.so: undefined reference to `Survive::System::Array<Survive::Math::Vector2>::resize(unsigned long)' libsurvive/bin/debug/libsurvive.so: undefined reference to `Survive::System::Array<Survive::Math::Vector3>::operator[](unsigned long)' libsurvive/bin/debug/libsurvive.so: undefined reference to `Survive::System::Array<Survive::Math::Vector3>::clear()' libsurvive/bin/debug/libsurvive.so: undefined reference to `Survive::System::Array<Survive::Math::Vector2>::clear()' libsurvive/bin/debug/libsurvive.so: undefined reference to `Survive::System::Array<Survive::Math::Vector2>::size() const' [/code] what is interesting about this is that the only errors seem to be with constructors/destructors and with functions that use 'size_t.' Anyway, here's the definition of the array class: [code] #include <stddef.h> namespace Survive { namespace System { template<typename Type> class Array { public: Array(); Array(size_t size); ~Array(); void add(Type item); void clear(); size_t size() const; Type &operator[](size_t i); void resize(size_t newSize); private: Type *pointer; size_t capacity; size_t numElements; }; } } [/code] I'm using g++ and makefiles generated by premake. Anyone have any idea on how to fix this problem? Thanks in advance!
  11. Automake/Autoconf Examples?

    Thanks, I will look into it.
  12. Hello, I'm working on my C++ game engine from Ubuntu by using the old text-editor/console approach. So far, I've simply been creating the makefiles myself, but as there get to be more subdirectories in the source folder, I've realized I need something more efficient. The solution to this seems to be to use the GNU Build System, ie, autoconf, automake, etc. The example that comes with automake, amhello, seems too simple for me, but I find that the manuals go too in depth for my purposes. Could someone point me to a simple tutorial or example on how to write good automake/autoconf files? Thanks in advance!
  13. Hello, I am trying to port the 'TextureRect' sample from the OpenGL Superbible to my game engine so I can add support for texture overlays. However, when I load the texture to be used in the overlay, I get this exception: Unhandled exception at 0x771a15de (ntdll.dll) in SurviveExperimental.exe: 0xC0000005: Access violation reading location 0x08c3a000. When I remove the line that calls the method that loads the texture overlay, the program works fine. I don't think it has to do with texture loading though, because there are other textures in my program and they work just fine. The texture file I'm trying to load is in the same folder as the other texture files. System Specs: Windows 7 Enterprise 64bit NVIDIA GeForce GT 545 Intel Core i7 3.40 GHz Processor (8 Cores) Anyone have any idea what's going on or how to fix it? Thanks in advance!
  14. Hello, For a while now I've been trying to develop my own game engine using OpenTK and C#. So far it can display a few primitives, like cubes, spheres, and cylinders, and it has a working FPS camera. It also has support for GLSL shaders and things like Phong shading. However, I haven't programmed in a while, and when I recently tried to get back into it, I found I just couldn't come up with the next thing to do. It's like I have all the ideas, but I have no idea how to go about architecting or implementing them. Could anyone suggest some projects (not necessarily game-related) that could get me back into the programming groove? I'd very much appreciate any of your ideas. Thanks in advance!
  15. Mesh from file?

    Hello, I'm looking for a simple binary file format that is up-to-date, and that I can expand my support for over time (that is, start with vertices/normals/texcoords, add rigging support, metadata, etc.). I know MD2 is simple, but outdated. I'm using C# and OpenTK, if that information is of any use. Thanks in advance!