Jump to content
  • Advertisement


  • Content Count

  • Joined

  • Last visited

Community Reputation

128 Neutral

About surfi

  • Rank
  1. By providing the implementation in a separate file you can also hide dependencies to the user. As an example, when prviding a library that depends on other ones, putting all the code in the .h will force you to provide also the .h of the libs you are using. However, by statically linking to them and by having the implementation in the .cpp file you can completely hide that extra code that in fact the end user doesn't need.
  2. Hello, does anyone know how can I embed an application (game engine, visualization tool...) in a web browser? It would be interesting to do it so is working on most browsers. The idea is to do it as the Unity or Torque Game engines. They are displayed on the browser, but they still can use hardware acceleration. Thanks!
  3. surfi

    HLSL - is this possible?

    Why not just render directly the boids you are actually using? You can render them as just lines if you don't want to make it more complicated.
  4. Hello, I'm searching for a postdegree program about game development (design, programming, ...), that is online. Does anyone know about some place? Thanks.
  5. How about DrawPixels? You also can use PixelZoom (not sure if that name is correct) to change the output size of the bitmap when displaying it.
  6. Hi, I need to develop a cross-platform sound engine and I'm searching an audio library for that (C++). I've used DirectSound and OpenAL in the past, and due to the cross-platform requirement, I was going to use now again OpenAL. But looking around, it seems the library is not updated anymore. I've checked Audiere and SDL, but again these ones seems to have old updates. My question is what would be a good library, stable yet still updated for bug solution, or if any of the mentioned ones are stable enough to work with. Thanks!
  7. Thanks for the replies. Then I think I'll just tell in the docs the user to start the application from a terminal if they want the output there.
  8. This is a small library, for using in any kind of application (console or not). So since I don't know if the users will launch their application from a terminal, I want to bring a new one, where the output will be done. Actually, output can go to a file, terminal is just another option (for instance, for quickly debuging). I'll try the options you mentioned. Thanks!
  9. Hello, I'm making a small library for debugging/logging purposes in C++. I've an object that handles output to a console window. In Windows, I use the AllocConsole function to achieve this, in case the program using the library hasn't a console itself. Now I wanto to do that also in Linux, but I don't know how to do it. I've tried with a call to system("xterm"), but that holds the application on that line until the new created console window is closed. I'm trying with the functions openpty(...), login_tty(...) and forkpty(...), but I don't know how it works (actually I don't know if this is the way to go). Does anyone know how to create a console and redirect std::cout to it? Thanks!
  10. I use both an IState interface and a StateManager: class IState { public: virtual void Update(); virtual void OnEnter() {}; virtual void OnExit() {}; }; class CStateManager { public: IState* GetCurrentState(); void ChangeState(state_id); // state_id can be a string, enum, ... whatever void Update(); }; Calling for update is just this: CStateManager manager; // Game loop .... manager.Update(); .... Change between states is handled by the manager, who holds the information for the current active state. And also you can easily turn this to behave as a stack. Instead of providing a ChangeState, just try with PushState(state) and PopState, and provided the desired underlying implementation. When calling for a state change, the manager marks itself with the next state to moveon. Then, on the next Update it will call the OnExit of the current state, change the state, and call the OnEnter method of the new state. After that, Update of the active state will be called as normal. Adding new states will not need more code in the game loop. And the enter/exit mehtods provide a built-in mechanism for treating state changes specifically for each state. For instance, you can handle there resources. And also, don't forget that if your states are really big, and need for more tune, you can use a set of states (with another manager) inside a given state. For instance, having a "minigame" inside the main game.
  11. I'm playing now with geometry shaders, and I run into a problem I don't know how to overcome. I have a geometry shader that generates geometry of variable size, that later I will use several times. Actually, what I do is calculate the depth texture for the object (shadow mapping), and then finally paint it. However, what I'm doing now is recalculate the geoemtry on every pass, since I don't know how to buffer the data for later use. I've searched a little around and I think there is a concept in HLSL called Stream-Out that resembles what I want to achieve, but I don't know if this is feasible in GLSL. The point is, there is some way to optimize this behaviour, since the calculations of the geometry shader are quite intensive? Thanks!
  12. I'm working on a personal tracing system and I ended up with this: #define NCODE_TRACER_STR(_oss_,vArg) (_oss_.GetStream().str(""), _oss_.GetStream()<<vArg, _oss_.GetStream().str()) For that you need a CFormatString object that I provide, but is just a wrapper over an std::ostringstream. The way I choose was to rely on << operator to generate string data. For example, you could do this: CFormatString oFormatString; NCODE_TRACER_STR(oFormatString, 2 << " HOLA " << false); NCODE_TRACER_STR(oFormatString, 3 <<" asd " << 3.43*2.2135234232343432423234); oFormatString.GetStream().precision(20); NCODE_TRACER_STR(oFormatString, true << " " << 3.43*2.21123323123123123123213); NCODE_TRACER_STR(oFormatString, std::showpos << std::scientific << 2 << " " << -23 << " " << 2.32); All the above macros will provide a string object. If you want to have a look to the way it works you can check the library at www.ncode.byaku.net/tracer. It's open so you get the sources. [Edited by - surfi on November 25, 2008 8:18:21 AM]
  13. surfi

    which library files?

    Well, depending on what you want to do, OpenCV might be also useful to you. It is a huge computer vision library.
  14. surfi

    Tracking in STL list.

    The code should be for (BulletIterator = BulletList.begin(); BulletIterator != BulletList.end(); ) { if (yourtest) BulletIterator = BulletList.erase(BulletIterator); else ++BulletIterator; } Note the line inside the "if" part is different. Don't increase the iterator there, since erase returns a reference to the next element (after the deleted one).
  • 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!