Jump to content
  • Advertisement


  • Content Count

  • Joined

  • Last visited

Community Reputation

352 Neutral

About Johnell

  • Rank
  1. Johnell

    Building C/C++ project without IDE

    How is it done if I want to link my project to some 3rd party library/framework? If I'm using SDL for instance.
  2. If I decide to use a text editor like vim or emacs for coding, what is the best way to compile a C/C++ program with multiple files? Is makefiles the way to go or is there some alternative?
  3. What is the best way to create enemies in a tile based side-scroller game? I can think of 2 different ways. Either manually place enemies on the tilemap or random their position.    If I random their position I have to check for collision. If I manually place them I can make sure they never collide with an object. What's the best way to do this?   I am using http://www.mapeditor.org/ to create my tilemap.
  4. Johnell

    2D scrolling game

      "I suggest you keep your camera position as the center point of the camera." Hmm, not sure I follow. Isn't the camera view camera.x + camera.width and camera.y + camera.height? Also I'm not sure I entirely understand the difference between world position and screen position.    Say object A and B is at (50, 50)    If I draw them like this:   A.draw(50, 50); B.draw(50 - camera.x, 50 - camera.y);   A will be at (50, 50) within the screen all the time. B will be drawn at (50, 50) world position. Is the coordinates within the screen always the same?
  5. Johnell

    2D scrolling game

    I am currently centering the player this way:   player.draw(playerX - cameraX + (screen.width/2), playerY - cameraY + 240);     This do indeed work, although i'm confused as to why it does. Since playerX = cameraX I am just drawing it at screen.width/2. Say screen.width/2 is 400px. If cameraX is at 800 the player will still be drawn at 400px, yet still be centered in the screen. Why is that?
  6. Johnell

    2D scrolling game

    So instead of moving the player I should move the camera and just center the player in the camera?
  7. Johnell

    2D scrolling game

      I wanna know how I can keep the player centered on the screen while moving him. I need the camera to "follow" the player so the camera's position is updated, but I dont know how I can accomplish this.
  8. Johnell

    2D scrolling game

    I understand how to render objects relative to the camera. I'm not sure how I get the camera to follow the player, while keeping him centered.
  9. Johnell

    2D scrolling game

    I am gonna make a 2D scrolling game, kinda like Mario. What is the best way to move the screen? Move the player and update the camera accordingly or move the entire screen and let the player stay still?
  10. When should human readable format be used over binary and vice versa? If I want to send multiple variables in readable format, should I use something like XML or JSON to easily parse it?
  11. What exactly is the standard format of sending and receiving messages through a socket? Send everything as a big string and parse with regex, send everything as binary? What are the format on messages sent with FTP or HTTP?
  12. Johnell

    Multithreaded programming

    What multithreading library would you recommend for C++? POSIX, boost?
  13. Johnell

    Multithreaded programming

    What kind of projects would allow me to focus on multithreading, while still building something?
  14. I'm looking to make a little game project of mine and could use some advices.   I'll be using C++ and i'm aware of both SFML and SDL. Are there any other good 2D libraries out there for C++ that I should know of? Secondly, I wanna learn more about multithreaded programming so I want to make a game that would force me to use this.   Any advices on a game project  and what 2D library to use would be appreciated. 
  15. Johnell

    Server/client chat application

    Ok, great. Now to the second problem. Say 3 clients is connected to a chat room. Client 1 want to be able to only talk with client 2. Do the messages between client 1 and 2 also go through the server, or is a separate connection between client 1 and 2 established?
  • 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!