Sort by time | Sort by thread (beta)

Link to this comment:

Share to:
see all

All Comments (39)

Sign In or Sign Up now to post a comment!
  • Hey these tutorials have helped me so much with my programming and everything that i have created so far has worked perfectly except I don't fully understand making the Rectangle Header, all I have in there right now is the "struct Rect {int x, y, w, h;};", yet when I include the Rectangle header into let's say the Stick Header and try to assign the variables "x, y, w, or h" a number, it tells me, identifier "variable" is undefined, what am I doing wrong? Please help, your the best :D

  • @ForeverMick32 Are you literally trying to assign something to "variable"? It sounds like you're using that as a variable name, but it doesn't actually exist.

  • @LusikkaMage No, lol, I was assigning it a number but I figured out what I was doing wrong and I finally finished my game!!

  • what about if a small rectangle is completely encompassed by a bigger rectangle... in that case, there is a collision, but it would not be detected by this, right? :)

  • @retromelon123 If you have a large rectangle (say, around the entire sprite), and then a smaller one inside (perhaps the character's head, specifically), you would do a test for only the large rectangle first.

    If the large rectangle is not hit, it goes without saying that the small one is also not hit so you don't have to test.

    If the large rectangle is hit, you'd do a second test with the small one to see if, say, it's a "head shot" and then react accordingly whether it's true/false.

  • thanks a lot! =] you're awesome!

  • YES! I'M! I'M SO CLOSE TO FINISHING MY PICKI-

    "You should then be ready to make your own Pickin' Sticks!"

    :|

  • sorry iam new on all this stuff and i have a question,, idont know if u can help me ,mmm as i say iam new and iam going to star learning programing but this is the thing what lenguage is the best to leran right now C++ or C#?? i realy appreciate if u can help me a little whit this !!..

    PD: your videos r awesome!!!!!!!!!!!!!!!!!!!!!!

  • @TypeRCsl

    Sorry, I am new to all of this stuff and I have a question:

    I don't know if you can help me, but I am new and I am going to start learning programming.

    This is the thing: What language is the best to learn right now: C++ or C#?

    I really appreciate it if you can help me a little bit with this!

    PS: Your videos are so awesome!

    (btw this is LusikkaMage's new account)

    OK time to respond.

  • @TypeRCsl Go to the "LusikkaMage" channel and look at the "FAQ 01 - Where do I Begin?" playlist.

    This is the playlist for "Game Development: Where to Begin?", I explain a bit about different languages and varying difficulty of each. You'll probably want to watch these to figure out where you should start.

    Also, these tutorials cover C++, not C#.

  • OK.... I Dont get it... I Get this video but... few videos ago we were at initializing and now we should have billions of classes that we never made so.... WUT?

  • @FrozenMasters I'm not teaching you guys to use classes; you guys should know this before watching this tutorial. I am teaching you the elements of the library, as well as some basic functionality you need- say, collision detection.

    Anyone who doesn't have an intermediate understanding of C++ should not be utilizing my BGtGP tutorials.

  • @LusikkaMage nvm, i missed the title

  • @LusikkaMage AND i know the basics and stuff but this is not helping

  • @FrozenMasters you do NOT know the basics at all. From what we can make out, you are appalling.

  • @EoN604 Meh, i knew i just was confused, I have made at least 10 games now ( Using C#, though )

  • Couldn't you just find the area of the stick's collision box and the person and then see if one of the objects area's changed? Sorry, I'm just really, really confused.

  • @cplusplusgamer Not really sure what you're asking?  Only check for collision on the movement of an object, rather than every cycle?

  • thanks for the videos! Gotta question though, is it better to handle collision in main, or have the separate objects( player/ collectible ) handle collision? Currently I let main handle collision, but Im wondering if there is a better way?

  • Comment removed

  • thank you!! now xna makes sense!

    take care.

  • man I couldn't figure out how to do collision, so I made it in my own style, its works fine. BUT its not as efficient since I would have to change a lot of my code if I were to add a new collision object. Well ALMOST done with my pickin sticks game :D Thanks for all tutorials helped a LOT!! :D

  • awesome tutorial similar to how lazyfoo did it

    anyways im using SDL on muh wii and this has helped alot thankies :D

  • I'm still having trouble making this work. I'm mainly confused about at what point in the code you actually assign the x,y,w and h of the rectangles and also I don't understand what a "get function" is. Can anyone help?

  • @Spacechicken100

    When you're learning C++, you'll learn that generally it's a good idea to keep all your variables in a class private. you create "Get" and "Set" functions in order to get the variable, and set the variable. (one will have return [var];, the other will have [var] = [var2])

    You store the location in (X, Y) (see: Algebra), and their Width and Height in W and H. This is generally something you should know from having a sprite sheet, and tell the program yourself.

  • @LusikkaMage why do you make rectangles? When I tried to make a collision box, I made 4 variables for each object. top, bottom, left, and right, and I gave each a value relevant to their x and y coordinates. Then I used your hit detection if statement and that's all I needed. Why would you make rectangles? Isn't it a lot more work than just having the value of the edges of the hit detection update constantly?

  • @askmiller If you're storing the Y value of the top, Y value of the bottom, X value of the left, and X value of the right, then you ARE doing rectangular collision detection. I create a Rectangle struct/class in order to keep the code clean and more manageable.

  • @CoderRach ok, makes more sense now, but what i'm having a huge issue with is:

    something went HORRIBLY wrong. When I try to build with visual c++, it says Microsoft internal linker has stopped working, then it says there are build errors and I check and there are 2, both in "main.obj" which is a blank file that I didn't make. It's basically saying the file is corrupt. I tried to run the last successful build but it says something aobut some messed up binary stuff. What do I do?

  • i wuv you!!!

  • How to check it in mario-like platform game?

    I mean i have to check all side, so if is collision with upper one, then gravity = 0; if is collision with left, then you can press left arrow and move there.

  • Why is this video set to private?

    Beginner's Guide to Game Programming Ep1 Part 9 Bounding Box Collision Detection

  • Thank you very much for taking the time to produce such excellent video tutorials. I am studying computer games development at Southampton Solent University and for our next assignment for one of the units we have to design and create a game in C++ and allegro. These tutorials came in very helpful so thank you once again.

  • So cute. this brings me back soooome years ago when i was learning about programming and i was eager to create a game!!

    I prefered to use segment intersections (solving Mx + B = mx + b). Advantages? This let objects collide no matter how fast they run or which shape their bounding boxes have.

    nice job lady!

  • Brilliant way to learn! Great videos, great teacher!

    Thank ye! :]

  • Your videos are AMAZING! I <3 them so much!

  • 3:00 been studyin' calculus, yea?

    ;-)

  • Sonny, I studied calculus four years ago! *waves cane at*

  • The sum is divergent! :D

  • OMIGAWD FURST KAWMENT

    and thanks once again :D

  • Not sure if I should vote your comment up or down. ;P

Loading...
0 / 00Unsaved Playlist Return to active list
    1. Your queue is empty. Add videos to your queue using this button:
      or sign in to load a different list.
    Loading...Loading...Saving...
    • Clear all videos from this list
    • Learn more