Jump to content
  • Advertisement


  • Content Count

  • Joined

  • Last visited

Community Reputation

258 Neutral

About DrSuperSocks

  • Rank

Personal Information

  • Interests
  1. DrSuperSocks

    Should I compile dependencies with my API?

    A very good point. I can't believe something that obvious never occurred to me. I'll rip apart my convenient .a file and keep everything separate. Thanks!
  2. So, I've been writing a game engine for a while now alongside several hobby games. It gets developed as each game needs it to have more features. I'm now in the process of refactoring the code and cleaning up the project.   It depends on all sorts of fun things, like glew, SFML, CEGUI, and Box2D. As of now, I compile all of my dependencies with the API so as to have just one .a file to link with. I realize that doing this doesn't really dodge all of the bullets, since I still have to point to all of the headers of my dependencies.   So, my question - should I continue to compile my dependencies with my API, or should I leave it up to the user to link the dependencies?   EDIT: I'm asking about best practices, because I've seen a lot of different APIs do it both ways.
  3. DrSuperSocks

    Indie Game Distribution Service

    You can check out IndieDB and its store: Desura. I think they already have some good features.   http://www.indiedb.com/ http://www.desura.com/
  4. DrSuperSocks

    Movement speed vary on different machines

    You need to multiply your speed, in seconds, by the delta time in seconds. So, if your update function is receiving the delta time in milliseconds, divide the milliseconds by 1000 to get your delta time in seconds. That, or you could fix your time step as Matias said, which you'll have to do anyway if you want to implement good multiplayer. The link he provided is very good.   On top of that stuff, your logic looks a bit off. So, you have a velocity variable that moves your ship based on delta time, but then when ship controls are pressed you don't even touch the velocity variable and just move your ship by hand ignoring delta time.
  5. DrSuperSocks

    Platforms in a 2D platform game

    If you want the tiled look of Mario, look up tile scrolling. The basic idea is you have a 2D array of integers that represent different tile types, and you draw the portion of that 2D array that is on the screen based on your camera position.   for (int x = left; x < right; x++) { for (int y = top; y < bottom; y++) { // Draw map[y][x] tile at (x*tileW, y*tileH) } }
  6. DrSuperSocks


  7. Don't know of any tutorials, but I'd be willing to cough up the code to the 3D level editor for my hobbyist game engine. It doubles as a project manager too! I made it compile my code into the actual game as well as a plugin for the editor that allows you to place objects with game-specific functionality into the scene. Anyway, if you want the source, I'd be happy to share it. I need to go in and refactor the code before I feel comfortable making it open source :P It uses my custom game engine, which uses Irrlicht for rendering, along with wxWidgets for UI.
  8. DrSuperSocks


    I accept that the without a degree you will below the majority with a degree, but doesn't the portfolio imply work experience? What I mean by a portfolio IS work experience. I do work half-time as a programmer at a biology lab to pay my rent. (I've hated biology so, so much ever since my high school biology class). Isn't having hands-on experience and no degree better than having a shiny degree with no hands-on experience? From what I've gathered from my first year here at my university, it seems like all of the graduating seniors have a ton of theoretical knowledge regarding math and computers without the slightest idea of how to apply it to create a functional product.
  9. DrSuperSocks


    Sure.  Just like everything you don't already know has always been available at libraries.  The medium doesn't change the fact that unless you know what you need, you're not going to have a lot of success looking for it.  Prepare your mind.   But all the information is absolutely not available in a local library. You might be able to find a handful of books on C programming, 9 out of 10 of which are outdated. On the internet, you can find tutorials, videos, open source projects, etc. I don't agree that you can't find knowledge without someone telling you where to look. I didn't learn to code with a professor holding my hand and telling me where to look for 8 years, I learned by doing projects and searching Google when a problem came up. I think we live in a new age where anyone can learn to code as long as they have half a brain, a bunch of spare time, and an internet connection.   That is part of the reason it exists.   A degree by itself provides evidence that you can do the job well.   That evidence is not just that you know the topics to a minimal level.  One bit of evidence is that you can stick with a project that you may not always enjoy.   I feel that a portfolio filled with completed projects proving hands-on experience is a lot more valuable than a piece of paper saying that I memorized a bunch of facts for a few exams. All a degree proves is that you passed a few tests - and they're not very hard tests. Out of all the senior CS students at my University, maybe 2 can code at a professional level. One of them has terrible grades because he crams himself with 24 credits.   Anyway, just my humble opinions, I won't drop my schooling.
  10. DrSuperSocks


    Alright, thanks for knocking some sense into me, guys.         I appreciate that!   And thanks, Katie, you have a lot of very persuasive points. That image of me looking at a shiny poster board :'( Haha.   I do not like this CS-degree-required filter, but I suppose I will just have to roll with it. At least I'm all done with the required math :D Now I just get to take the Math that I want to take.
  11. DrSuperSocks


  12. Very cool, I would be interested! I had have a path-finding system set up in my game engine, but level designers have to add the waypoints manually. This would definitely be useful to me
  13. DrSuperSocks

    Sending/Receiving the Game World

    Yes, it's a hot joinable game. Currently, each object get's it's own packet in the initial world send, and I mass send all of them at once.   Here is the relevant code:   void NetworkManager::send(sf::Packet &packet, int connectorID, int excludeID, bool reliable) { sf::Packet finalPacket; //finalPacket << sf::Int8(0); finalPacket.append(packet.getData(), packet.getDataSize()); // Create the enet packet unsigned int flags = 0; if (reliable) flags |= ENET_PACKET_FLAG_RELIABLE; ENetPacket *enetPacket = enet_packet_create(finalPacket.getData(), finalPacket.getDataSize(), flags); if (mType == NetworkType::CLIENT) // Clients send data to server only { enet_host_broadcast(mHost, 0, enetPacket); } else if (connectorID > 0) // It's a server and the client is specified. Tell only that client! { enet_peer_send(findConnector(connectorID)->mPeer, 0, enetPacket); } else // It's a server and the client is unspecified. Broadcast to everyone { if (excludeID > 0) { for (unsigned int i = 0; i < mConnectors.size(); i++) { if (mConnectors->mID != excludeID && mConnectors->mPeer) enet_peer_send(mConnectors->mPeer, 0, enetPacket); } } else enet_host_broadcast(mHost, 0, enetPacket); } } void NetworkManager::sendSceneCreation(int connectorID, int excludeID, bool reliable) { for (unsigned int i = 0; i < SceneManager::get()->getCurrentScene()->getGameObjects().size(); i++) { if (SceneManager::get()->getCurrentScene()->getGameObjects()->getSyncNetwork()) sendGameObject(SceneManager::get()->getCurrentScene()->getGameObjects(), connectorID, excludeID, reliable); } } void NetworkManager::sendGameObject(GameObject *object, int connectorID, int excludeID, bool reliable) { sf::Packet packet; packet << PacketType::CREATE_OBJECT; object->serialize(packet); send(packet, connectorID, excludeID, reliable); }     Thanks for the suggestions, I'll cram stuff into bigger packets. Could you recommend a good maximum packet size? I'll make it adjustable and play with it, but I'd like a ball park This networking stuff is all very new to me.   And thanks, nfactorial, I've also given sending only immediate surroundings a thought, and that will be very easy since I already have stuff to detect which planet you are currently on (you fight across many 2D planets). Edit: But also, in that regard, sending only the current surroundings is kind of the scenario at hand, since I only have 2 planets in the game right now. I plan on having around 100 planets in an actual match.
  14. Hi all, I've been working on a sort of side-scrolling, shoot em up, RTS game for the past few weeks and am now confronting the issue of sending the game world to the client when it logs in. Right now, when the player logs in, the entire game world is sent all at once (each object gets it's own packet) over reliable UDP (I'm using enet). Originally, I had the game world all in one packet, but the packet was too big to send in just one packet (it's like 50kb). Right now, it works fine if you have fast internet, but with slow internet (50 kilobytes per second) the client will hang there for a very long time receiving only a few game objects a second and never really receives the entire game world.   Any suggestions? I'm about to implement a system where it spreads the packets out over a few seconds, is that a good fix? Or are there fancy ways that would be better?
  15. In my game engine, networked objects are instantiated on both the client and the server, and components instantiated on either side can send messages to each other. Other than that, all packets are processed by the active game state. I'm currently trying to refine my networking and look for better methods, as I'm still pretty novice at network programming.
  • 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!