Jump to content
  • Advertisement

IceCave

Member
  • Content Count

    87
  • Joined

  • Last visited

Community Reputation

412 Neutral

About IceCave

  • Rank
    Member

Personal Information

  • Interests
    Programming

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. Great! It's overcomplicated but works like a charm! The reason for making it a pointer and using a Forward declaration is because Vector is a class of giant (scientific) library consisting of over 50 dlls and probably thousands of Header files. When you want to use this library the Compiler starts asking Questions About Header files up to the 100th including iteration. Binding them all in and Setting everything up correctly is a pain in the…. Would be easier if there was a simple interface that only lets you make binding in one dll, a bunch of Header files you actually Need and then just drop the other dlls in. And this is exactly what I am trying to do Right now, simplify the interface.
  2. @Rutin Please don't perceive this as rude behaviour because it is not intended to be but I am going to ignore your answer since KulSeran understood my question. So I am going with that and hope others understand as well. @KulSeran I looked at these forward declarations but it doesn't compile. It says different things like "Syntaxerror ';' missing". #pragma once #define API __declspec(dllexport) namespace map { namespace example { class Vertex; } } namespace robot { class API Robot { public: Robot(); ~Robot(); private: Vertex* lastRobotPose; Network* network; }; } Vertex is in namespace map::example::Vertex
  3. Hi, if I understood correctly, class variables (members?) are declared in a header file. However when I declare them in a header file I have to #include the variable types in the Header as well and then other libraries using my library start complaining about not knowing the included header file and this goes on and on. All I want is a private per object variable, not to be accessed by anyone outside the scope. It seems ridiculous that other classes have to know variable types of variables they can't even Access (private:). Thanks
  4. IceCave

    Visual Studio Add Reference to Project

    Ohhhh, I get it. Now I understand how this works. The tutorials in the Internet are way too simple in this specific case. All the Header files are in different directories and then there are 3rd Party libraries as well which have to be bind into the Project as well. Wow. Thats complicated. Let's see how this Plays out.
  5. IceCave

    Visual Studio Add Reference to Project

    Yeah, but I need the DLL functionalities. What I found out when pressing compile: he is telling me that he can't open some source files for various include statements in the Header files from the dlls I am including. I don't see the reason why he would want to do that, the dlls are already compiled and working(!), I just want to call some Methods on them. I don't have the Header files for the dlls they are referencing. Any clues?
  6. IceCave

    Visual Studio Add Reference to Project

    After your helpful Picture Show the includes work fine, again thanks for that. However Visual Studio is still marking my Code red that I copied straight out of the library source files (which compile totally fine), like i.e. that an object is Abstract and can't be initiated (but why is it working in the example Code in the library itself, then?) or a constructor can't be called because it is marked as deleted. Again, works fine in the library itself. Maybe I should sum the functionality I need, in a class in the library itself and then just communicate over this .cpp.
  7. IceCave

    Visual Studio Add Reference to Project

    Thank you very much for the tutorial, amazing! I set the directory (with the .lib files) in all the places you mentioned above but when trying to include any it is still marked in red. You would think after many years it would be a matter of drag n drop. I guess I am going to dump C++ altogether again, my frustration level is just too high right now to deal with an obviously outdated platform and bind the functionalities I need to another language. Thanks anyway.
  8. IceCave

    Visual Studio Add Reference to Project

    Thanks for the Reply, can you tell me how to add a .dll to a C++ Project in Visual Studio then? The only tutorials I can find a are for older versions. I tried this one https://stackoverflow.com/questions/809948/dll-references-in-visual-c but Visual Studio is still marking my include's red. I don't get it at all.
  9. I am new to C++ and Visual Studio. I downloaded a library that consists of multiple Projects in one Project Folder(? my Version is not in english - basically multiple Projects summed into one) and some of those Projects are example programs using other Projects in the Project Folder as references. I was trying to build my very own test Project in this Project Folder and added the other Projects in the "reference settings". However they do not Show up in the external references list in the Project Explorer window and Visual Studio is also marking my "include" red, telling me it can't find the files I am referencing. Does somebody know what I am doing wrong?
  10. Thanks for your answer, to your question: that is complicated... I am programming a framework to help working with a multithreaded environment and that includes sending data (objects) between threads. Normally those objects are then put in a container for further execution on this specific thread and their "execute()" method is called on them in order to process whatever they want to do on this specific thread. Basically it goes like this: Object O#42 wants to execute stuff on Thread T#42. The framework then manages the whole process of introducing O#42 to T#42 and T#42 then calls execute() - "Hey you are now on this thread, now do what you wanted to do here". So far so good but I would like to have the option to program custom containers in order to do more advanced stuff then just "execute()". Right now it works like this that in the execute() method the object removes itself from the standard container and readds itself to a known target container (candy adds itself to candyshop_container). This works! Now why change a running system? Security! I noticed that this system is very unstable from a static coding perspective. The developer might very well accidentially (or by intention) tell the framework to call an objects "execute()" on the thread candyshop_container is located at but then - in the execute() method - add the candy to another container located on another thread. The framework was developed in order to avoid such concurrency. I figured it is best to hide the whole "delivery" process from the developer and not give him any control about the threads data flow. Which brings us back to the mentioned problem: My framework only knows to deliver [object] to [container] on the thread that is associated with [container]. The solution could be to let the container make a dynamic cast in order to find out what object was delivered.
  11. Imagine a manufacturer producing candy. He puts the candy in a package and sends it to his customer through the local postal service. After some days the package arrives and the customer has to decide what to do with the arbritary contents of the package without knowing what is inside. This is exactly my problem: I have this OOP problem where a "delivery service" delivers objects from a source to a consumer - multithreaded with a delay. The objects are buffered. However, the delivery service has no class information about the stuff being delivered so the consumer has no idea what he is getting. However, this is crucial information in order to decide what to do with the delivered items, i.e. where to store them. I was told that stuff like dynamic_cast (C++), instanceof (Java) or "is" (C#) is in general very bad OOP but I don't know how to solve this problem another way. The first thing that came into my mind was using Generics but I think this is impossible because giving the package generic information is one thing but retaining those information when the package is processed in the central delivery system is another. Dynamic casts seem to be the best solution but I am hesitating because of what I was taught from day one. Any thoughts?
  12. When drawing an object in a solid color, is it more advisable to make a shader with a color input or use a shader with a texture input and use a 1px texture?
  13. IceCave

    Animate 2d walking/running

      Perfect! A matching google keyword saves a lot of lifetime. This is the last and best animation I made from what I have learned from your post in Paint.Net. Suggestions? (There is a serious bug in this new forum software, don't know why this image is so gigantic) It's enough for prototyping for now. Now I need to make a running animation.     "Believable" was the word I was looking for. My human-like character animations are not very believable. Most of my walking/running attempts didn't really made the stick figure look like they are moving but doing jumping jacks while hovering over the floor. I realize now as well that this is a pretty complex theme. I was hoping that there was maybe an animation software that could prerender these complex, yet everyday animations in game dev.
  14. IceCave

    Animate 2d walking/running

    I have problems drawing a 2d walking/running stick figure animation for my game. I noticed this is a problem of a lot of games made decades ago but still today many games lack of proper walking animation even with 3d bone-animations (don't know how to call them). Tried a few tutorials on drawing this looking natural and even a stick figure software where you can adjust the limbs. Has anyone any tips?
  15. I want to draw a seamless repeating texture as screen filling background. My idea was, instead of drawing a lot of single quads, to draw a single static screen filling quad, set the texture to "repeat" and adjust the uv-coordinates in the shader.   I am in holidays right now and on my Mac OS X the GPU tracing tools do not start up so I can't check what is happening inside the shader to debug. This is the simple Vertex-Shader uniform mat4 projectionMatrix; uniform mat4 modelMatrix; uniform mat4 worldMatrix; uniform sampler2D texture_diffuse; in vec4 in_Position; in vec2 in_TextureCoord; out vec2 pass_TextureCoord; void main(void) { gl_Position = projectionMatrix * modelMatrix * in_Position; vec4 uv_multiplier = vec4( 1.0, 1.0, 0, 0 ) / (projectionMatrix * worldMatrix * modelMatrix * vec4(textureSize( texture_diffuse, 0), 0, 0)); pass_TextureCoord = in_TextureCoord * uv_multiplier.xy; } This is a 2D game, so there is no Z-coordinate. I calculated it by hand, yet the screen is colored by the color of one single fragment of the used texture.   I am not asking you to calculate it for me, but maybe you have a quick idea what is wrong or maybe you have a better idea to achieve this effect! :)
  • 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!