Jump to content
  • Advertisement


  • Content Count

  • Joined

  • Last visited

Community Reputation

130 Neutral

About MrMonkeh

  • Rank
  1. MrMonkeh

    C++ % Operator Problem

    I believe the modulus operator (%) only works with integer types. You'll have to convert fn and sn to integer if you want to use it. Or...a quick search on google and I stumbled upon "fmod". Used like so: fmod(5.5, 3.5) // takes numerator and denominator Note: I've never used this function before, so no promises. Though I believe you need to include the math header file to use fmod.
  2. MrMonkeh

    Allegro moving rectangle help

    I have the rest to actually control how fast the box moves. When I take the rest out, you see a quick flicker of white, and the box is way gone out of the picture.
  3. Hi, I have a simple question, probably super easy too, so I'd appreciate if someone could help me out here! I'm trying to recreate Pong, but far from that...I'm at the stage of getting things on the screen Basically, I want to move the rectangles on the sides, but can't figure out how in a productive manner. And before I get any farther, I am running Allegro 4.2, not the new version, 5. I have this code: if (key[KEY_S]) { y1++; rest(10); y2++; rest(10); rectfill(screen,x1,y1,x2,y2,15); } Sorry if it looks weird, trying to figure out how to put code on here...anyways...Basically for anyone who has ran Allegro, this simply redraws another rectangle, so it ends up looking like there's a rectangle on the whole left side. I've tried doing rectfill(screen,x1,y1,x2,y2,0); to sort of "erase" it, but then when moving it just looks horrible (flicking black). Any help would be appreciated, or point me in the right direction! Thank you, MrMonkeh
  4. MrMonkeh

    Beginning Game Programming

    First, my biggest advice would be not to start with C++, but then, nobody ever listens to that one bit of advice for whatever reason... If you are indeed going to go ahead with C++ I put together this link that contains tool, book and library recommendations for learning C++ for game programming. Also, I am doing a longer tutorial series on writing a game in C++ using SFML. It goes into a lot more depth than most tutorials and hopefully will make you a better C++ programmer as a result. Most tutorials focus on a specific feature or are simply bad code, leading to a very bad foundation for new programmers to start with, hopefully this series of tutorials results in some slightly better beginner code. Still a WIP though, so not complete yet. [/quote] I recently read that on this site and wished I would have seen this BEFORE getting a good deal into C++. I own the C++ for Dummies Reference all-one-book (and I'm not sure how you guys feel about dummies books, so don't make fun ) and am about 300 pages in. I guess technically I could switch to a different language, though I am far into it (or so I think) and in my eyes it seems like I should just stay with it...however, if you feel a different one, such as C# would be better, even at this point then let me know before I drag myself deeper! I do appreciate it though, I will check out the links and tutorials you gave. On another note, if I do stay with C++, shall I continue learning it completely (ie; finish the book first) before attempting to fiddle with the gaming side? Or go ahead and start messing with gaming programming? Thanks!
  5. Hi everyone! I've been reading the forums for a few days now and finally broke down and made an account to see if I could get your opinions... To start off, yes I have been teaching myself C++ for awhile now, and I got most of the basics down, and learning more advanced such as objects and classes, etc... Simply speaking though, I am wanting to get into game programming, whereas right now I am solely doing programming. What would be the best option (and/or tool) for me to add gaming to my programming list? Obviously since I have no prior experience in the gaming programming field, I want to start off very basic, such as 2D. I've read about Allegro and seen it to be a good starting position, though I was unsure of how good of quality you can make with it alone. And yes I've read through other posts, I've seen other engines and such, and I know this question has been asked a million times before. I just want to know where my best start would be with C++, as I've been getting various answers everywhere...so I want real programmer's opinions. Any and all advice will be greatly appreciated, please feel free to throw anything you have out here, even if it's the most basic of all programming. I just want a place to start, and possibly something I could grow into a larger field. Thanks for reading! -MrMonkeh
  • 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!