Advertisement Jump to content
  • Advertisement


  • Content Count

  • Joined

  • Last visited

Community Reputation

118 Neutral

About bd36

  • Rank
  1. bd36

    Setup SDL on OS X Lion

    I was unable to find anything for SDL, Lion and Xcode, although I was trying to find one for Xcode 4.3. I ended up using bootcamp and visual studio for a couple of small sdl projects I was doing, then I found SFML online and it had directions for Xcode installation and supported the sprite rotation that I was using so I just switched to using SFML instead because I barely knew SDL and it didn't matter to me what I used. I did just find this on Google for setting up SDL in Xcode. Good luck
  2. I just finished creating a simple tower defense in SFML for a class and now I want to make a checkers game in SFML to learn some more c++ with the possibility of exploring some AI concepts or networking once I get a 2 player local game working first. I started to develop the game and so far the board is created and you can move a piece to an empty spot on the board. I just now started to try and add in the rules for valid moves. I have required forward diagonal moves but I am looking at it and seems like there has to be a better way than my current approach. Once jumps and stuff are involved it looks like it will get way out of hand. Here is the code for a move bool Board::move() { if(movePiece1.getPiece() != getCurrentTurnPieceType()) { printf("The Selected piece to move isnt yours.\n"); pieceBeingMoved = false; return false; } if(movePiece2.getPiece() != GamePiece::NONE) { printf("The Selected new space isnt empty.\n"); pieceBeingMoved = false; return false; } if(getCurrentTurnPieceType() == GamePiece::BLACK) { if(movePiece1.isKing() == false && movePiece2.getRow() <= movePiece1.getRow()) { printf("must move forward\n"); pieceBeingMoved = false; return false; } } else { if(movePiece1.isKing() == false && movePiece2.getRow() >= movePiece1.getRow()) { printf("must move forward]\n"); pieceBeingMoved = false; return false; } } if(movePiece1.getCol() == movePiece2.getCol()) { printf("go diagonal not up\n"); pieceBeingMoved = false; return false; } gamePieces[movePiece1.getRow()][movePiece1.getCol()].changePieceKind(GamePiece::NONE); gamePieces[movePiece2.getRow()][movePiece2.getCol()].changePieceKind(getCurrentTurnPieceType()); blackTurn = !blackTurn; return true; }; Does anyone have an suggestions for a better way to go about doing this. I also feel like the way I am getting the move isn't the best. Now the player clicks to get the space to move from and then clicks again to for the destination then the move is evaluated and the cells that are selected are stored as variables in the board object. Thanks
  3. You can use SFML to provide the windowing and an openGL context for you to use. You can also use SFML to get input for you. This way this window is there for you without doing anything and you get to to the rest yourself. The RC for the new version of SFML was just released, check it out. I was playing with it the other day then decided I don't want to learn openGL right now
  4. bd36

    SFML and SDL question

    All the SFML components can be used independently according to the website so this should be feasible in SFML. However I have never tried to do anything like that. I imagine you would just include and link to SFML audio and nothing else and be good to go.
  5. bd36

    Starting 2D Game Creation

    No problem for coloring a tile you could use a RectangleShape object to make a tile of whatever size wherever you need it and then use setColor() to make it whatever color you need it to be. Or if you have your own images you can load them as textures and create sprites to manipulate.
  6. bd36

    Starting 2D Game Creation

    I would recommend SFML for 2D graphics. What do you mean zero control over the sprites? SFML allows for easy movement, scaling and rotation of sprites with a simple function call. What else would you need to do?
  7. I think it helps sometimes to think of partial derivates in terms of level curves or a contour map when first learning them as it is easy to visualize a hill or a mountain. Maybe this resource that I found online will help you to understand them better
  8. bd36

    How do i run my Ruby programs?

    No problem. If you are interested here is a very basic introduction to some commonly used command line commands in Windows
  9. bd36

    a online group storage device?

    If you are working on a programming project together collaboratively I would definitely second ApochPiQ's recommendation of GitHub. Plus version control is almost always a good idea for any sort of project.
  10. bd36

    How do i run my Ruby programs?

    Haven't used the windows command line much (I use unix/linux) but after looking online a bit typing "cd" with no arguments will give you the directory you are currently working in the you will us cd to change directories. "cd ../" is up one level from the current location, "cd name" changes to the directory named "name" within the current directory or you could do absolute path such as "cd c:\Users\K1NNY\Documents\Ruby" or wherever your stuff is stored. But you need to run the command in whatever form got ruby to be recognized as a command. Once you are in the right folder try running the program again
  11. bd36

    How do i run my Ruby programs?

    When you are trying to run the program from the cmd prompt do you first navigate to the proper directory containing the ruby file? Also make sure it installed properly by typing "ruby -v" on the command prompt.
  12. bd36

    How do i run my Ruby programs?

    Are you on Windows?
  13. bd36

    How do i run my Ruby programs?

    Do you have a ruby interpreter installed?
  14. I have noticed this lately! But really take Alvaro's suggestion it will work better. I was hesitant at first when he suggested it for me a few weeks ago but I'm glad I did because it just made things much easier in the end and there were no special cases or anything to worry about.
  15. Zael's method is written in C++ rather than C#. He uses cin and cout to set the variables for the rotation. >> sets the value entered on the command line into the variable that follows the >>. Similarly bout << prints whatever follows into a command prompt. You will want to remove all the cin and cout anyways and set the variables according to your game. The important part to understand is as that is the part that does the actual rotation. What do you not understand in this part?
  • Advertisement

Important Information

By using, you agree to our community Guidelines, Terms of Use, and Privacy Policy. 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!