ElGeeko7

Members
  • Content count

    19
  • Joined

  • Last visited

Community Reputation

319 Neutral

About ElGeeko7

  • Rank
    Member

Personal Information

  • Interests
    Programming
  1. Awesome! Thanks for explaining all this. I've often wondered what "rigid body" meant too, but all the YouTube vids and forum posts say to create one; now that I know it's needed for collision checking it makes a lot more sense. And the trigger thing sounds really cool! I could see it being useful not just traps, but all kinds of stuff; kind of like in Legend of Zelda, Link to the Past, where you step on these yellow circles in dungeons to make treasure chests appear, doors unlock etc. It could even help in the simple game that got me writing this post (air hockey) for things like when the puck goes into the net.
  2. Hey everyone, happy Friday! Sorry this is probably in the wrong place - I didn't see any clear-cut way to make this for Unity (only option was Unreal, which I like but has nothing to do with my question lol). I've been ramming my head against the wall at 88 miles per hour trying to get to the future where I understand 2D collision detection in Unity (see what I did there? ). So basically, I've been trying to get a sound to play on collision, and failing miserably. After reviewing the API documentation dozens of times over, it occurred to me that the issue was not my audio code but the collision detection part. Here's my code: using System.Collections; using System.Collections.Generic; using UnityEngine; public class bounce : MonoBehaviour { public AudioClip[] clips; private AudioSource Audio; void Start() { Audio = GetComponent<AudioSource>(); } void OnCollisionEnter(Collision other) { if (other.gameObject.name == "top_boards") { Debug.Log ("Hey McFly you bojo! Those boards don't work on water!"); Audio.clip = clips [0]; Audio.Play(); } } } In the GUI, there are 2 sounds in "clips" and they both contain valid audio assets (".ogg" files, tested to confirm they work by temporarily setting "play on awake" to true). And audio stuff aside, just the Debug.Log should have worked. The game is basically Pong, and every scrap of info I found on Google basically told me to do what I did - but the event never seems to happen, because {reasons}. Then I found this: http://answers.unity3d.com/questions/657234/2d-object-collision.html Following this guy's suggestion, I made everything in my game a "Trigger" (whatever that means) and changed the event to " OnTriggerEnter", and suddenly the event started firing, because {why not?}. Of course the objects no longer MOVED on collision, so I kept fighting this stupid thing till I lost a few more locks of hair. Clearly, there are other aspects of this that I just haven't learned yet, some mysterious prerequisites that need to be done from the GUI before the code will run as everybody says it will, nobody seems to bother with explaining in their tutorials. Cryptic lingo like "Triggers" and "Kinematic" are as nonsensical as "Bojo" without some general context. Does "trigger" mean the object is able to trigger collision events? I didn't study quantum mechanics in high school, so noob-friendly English is preferrable (I'm no noob to C#, but the math behind physics is basically lost on me). Thanks!
  3. Yet another SDL question (or maybe it's not)

    Hey, thanks for the quick reply! Yes, that's what I thought too... but in the constructors I set the values, and printing them to the console after initializing them shows the values I would expect - it's during the draw method that they seem to go random... could it be how SDL_Rect is initialized? Maybe it isn't allowed as a class property or something (though I couldn't find that in the documentation anywhere). Or maybe it should be a pointer to an SDL_Rect and created in the constructor with "new"? Either way, here's what I'm guessing is the code involved: // -------------------------------------------------------- // GameObject.h // -------------------------------------------------------- #include "SDL.h" #include "Animation.h" #ifndef GAMEOBJECT_H_ #define GAMEOBJECT_H_ ////////////////////////////////////////////////////////////////////////////////////////////////////// // DECLARATION ////////////////////////////////////////////////////////////////////////////////////////////////////// class GameObject { public: int x, y, w, h; GameObject(int x, int y, int w, int h); void set_animation(Animation * a); void Draw(SDL_Surface * destination); bool collision(GameObject * other); void destroy(); protected: SDL_Surface * sprite; SDL_Rect rect; Animation * animation; bool _destroyed; }; ////////////////////////////////////////////////////////////////////////////////////////////////////// // DEFINITION / IMPLEMENTATION ////////////////////////////////////////////////////////////////////////////////////////////////////// GameObject::GameObject(int x, int y, int w, int h) { x = x; y = y; w = w; h = h; rect.x = x; rect.y = y; rect.w = w; rect.h = h; _destroyed = false; } void GameObject::Draw(SDL_Surface * destination) { if (!_destroyed) { // Update the object's position rect.x = x; rect.y = y; // In an effort to figure out why the heck new objects added to the vector were not being drawn, // I created this code std::cout << rect.x << " "; std::cout << rect.y << " "; std::cout << rect.w << " "; std::cout << rect.h << std::endl; // And update the animation animation->update(destination, rect); } } void GameObject::set_animation(Animation * a) { animation = a; } bool GameObject::collision(GameObject * other) { return ((x > other->x && x < other->x + other->w && y > other->y && y < other->y + other->h) || (x + w > other->x && x + w < other->x + other->w && y > other->y && y < other->y + other->h) || (x > other->x && x < other->x + other->w && y + h > other->y && y + h < other->y + h + other->h) || (x + w > other->x && x + w < other->x + other->w && y + h > other->y && y + h < other->y + h + other->h)); } void GameObject::destroy() { _destroyed = true; delete this; } #endif // -------------------------------------------------------- // Animation.h // -------------------------------------------------------- #ifndef ANIMATION_H_ #define ANIMATION_H_ #include "SDL.h" #define ANIMATION_HORIZONTAL 0 #define ANIMATION_VERTICAL 1 ////////////////////////////////////////////////////////////////////////////////////////////////////// // DECLARATION ////////////////////////////////////////////////////////////////////////////////////////////////////// /** * This class handles the math and SDL stuff involved in looping through an animation * @todo Add events like pause(), stop() etc. If possible, add a setter for speed, and * maybe a way to set the pic (for objects that will use multiple instances of this). */ class Animation { public: /** * Constructor: init instance variables * @param[in] The image file and/or path * @param[in] The width of a single pic in the animation * @param[in] The height of a single pic * @param[in] One of the constants #defined above - Tells the Update function whether to move the X or Y * @param[in] The total number of pics in the animation * @remarks This class assumes a single "strip" of images, either horizontal or vertical, with no gaps * between them (for now). This is what the direction and total are for, so it "knows" how to run * the animation. If either of these is off, the image will flicker as class loops through the pics. */ Animation(const char * sprite_file, int width, int height, int direction, int total, int speed); /** * Shows the next pic in the animation * @param[in] The surface we're drawing to * @param[in] The rectangle where the animation should be positioned on the screen */ void update(SDL_Surface * destination, SDL_Rect object_rect); private: SDL_Surface * sprite; SDL_Rect rect; int direction, total, index, speed, next; }; ////////////////////////////////////////////////////////////////////////////////////////////////////// // DEFINITION / IMPLEMENTATION ////////////////////////////////////////////////////////////////////////////////////////////////////// Animation::Animation(const char * sprite_file, int width, int height, int direction, int total, int speed) { // Save references to the ints direction = direction; total = total; speed = speed; next = speed; // Used in update // Set the starting index to 0; index = 0; // Init the rect property rect.x = 0; rect.y = 0; rect.w = width; rect.h = height; // Load the sprite sprite = NULL; sprite = SDL_LoadBMP(sprite_file); if (this->sprite == NULL) std::cout << "Oh crap, something went wrong. Fight with this later.\n"; } void Animation::update(SDL_Surface * destination, SDL_Rect object_rect) { // Another part of the debugging attempt // When I create the first object, its index starts at 0, where I expect it // But when I create the second, the index is 4741476 (for only God and Bjourne Stroustrup know why) // So clearly it's undefined behavior, but why? The index is initialized to 0 in the constructor, and // so is the total //std::cout << index << " " << std::endl; // Update the index index++; // The debugger points to this line as the problem // I've tried commenting out all this - the problem is not here. if (index >= total * speed) { index = 0; rect.x = 0; rect.y = 0; next = speed; } else if (index == next) { next += this->speed; if (direction == ANIMATION_HORIZONTAL) rect.x += rect.w; else rect.y += rect.h; } // And update the animation SDL_BlitSurface(sprite, &rect, destination, &object_rect); } #endif // -------------------------------------------------------- // Main.cpp // -------------------------------------------------------- #include <iostream> #include "Game.h" #include <iostream> #include "SDL.h" #include "Window.h" #include "GameObject.h" #include "Game.h" #include "Animation.h" #include "Controller.h" // Global variables bool left_pressed = false, right_pressed = false, up_pressed = false, down_pressed = false; Animation player_left("bin\\debug\\graphics\\player_left.bmp", 32, 32, ANIMATION_VERTICAL, 8, 10); Animation player_right("bin\\debug\\graphics\\player_right.bmp", 32, 32, ANIMATION_VERTICAL, 8, 10); Animation player_up("bin\\debug\\graphics\\player_up.bmp", 32, 32, ANIMATION_HORIZONTAL, 8, 10); Animation player_down("bin\\debug\\graphics\\player_down.bmp", 32, 32, ANIMATION_HORIZONTAL, 8, 10); GameObject player(468, 544, 32, 32); void GameLoop() { // Update the player's position if (left_pressed) player.x -= 2; else if (right_pressed) player.x += 2; if (up_pressed) player.y -= 2; else if (down_pressed) player.y += 2; // And slow things down a sec SDL_Delay(10); //For now - I'll have to come up with another way to make characters move slowly later } void KeyDownEventHandler(int key) { if (key == LEFT) { player.set_animation(&player_left); left_pressed = true; } else if (key == RIGHT) { player.set_animation(&player_right); right_pressed = true; } else if (key == UP) { player.set_animation(&player_up); up_pressed = true; } else if (key == DOWN) { player.set_animation(&player_down); down_pressed = true; } } void KeyUpEventHandler(int key) { if (key == LEFT) left_pressed = false; else if (key == RIGHT) right_pressed = false; else if (key == UP) up_pressed = false; else if (key == DOWN) down_pressed = false; else if (key == SPACE) { // This is where I'm creating the instances at runtime - the player presses Space and creates a new GameObject instance // Same constructor, same Game object, different GameObject and Animation objects. Game * game = Game::Get(); Animation player_left2("bin\\debug\\graphics\\player_left.bmp", 32, 32, ANIMATION_VERTICAL, 8, 10); GameObject test(32, 32, 32, 32); test.set_animation(&player_left2); game->AddObject(&test); } } int WinMain() // I'm on Windows, and apparently SDL wants WinMain, as calling it "main" causes compiler tantrums { Controller::OnKeyUp = KeyUpEventHandler; Controller::OnKeyDown = KeyDownEventHandler; Game * game = Game::Get(); game->CreateWindow("Game Title", 800, 600); // Create our player animation player.set_animation(&player_left); game->AddObject(&player); game->Start(GameLoop); return 0; } So after doing all kinds of experiments with this code to try and guess out what possible reason there could be for the randomness, the only guess I got is maybe the object's SDL_Rect... can you see anything else it might be? Thanks.
  4. Hey there, So awhile back, I wrote a post about a C++ question I had with SDL, and I think I've tracked down the problem, but it's a problem that makes no sense whatsoever. So I'm thinking there must be some noobish little nano-detail I just never learned, specifically how to discover the cause of undefined behavior. So the original problem was like this: I had a "game" class with a vector of game objects; this game class handles the main game loop in a "start" method. The problem was, objects being created after calling "start" were not being drawn. The game objects in the vector (instances of a "GameObject" class) have an SDL_Rect that's used for collision checking and other things. This gets passed to an Animation object, which does the actual SDL stuff involved in drawing. So my first idea was to find out what the objects' rectangles' values were. So I had it print the x, y, w and h in each step of the game loop. For the first game object, I would get what I expected, "468 544 32 32". The object was at 468,544 and its width and height were 32. But the second object seems to be generating random numbers: "4696288 1 7554358 10". I passed in everything from references to the player object's x/y/w/h to hard-coded numbers like 32, 32, 32, 32. Still random. So I figured maybe it has something to do with the animation class, and did something similar. The class maintains an "index" property (an int) which starts at 0 and goes up until it hits a pre-defined total, and then reset to 0; so I figured I'd have it print that. With the first object (created before calling Game.start) this worked as expected. The index started at 0, looped to the total, etc. as expected. But with the second instance (created on key press at runtime) the index is 4741476 (again with the WTF...?!?!?! hair--) :lol: So I'm clearly missing something stupidly simple, like maybe default values of ints that are properties of a class or something. I initialize them to 0 in the constructors, but somehow they are getting set to other numbers, seemingly for the sake of just cuz. Talk about undefined behavior. Now I know that in general, code helps - but I really don't know of any way to give you code without just pasting in my entire program. If you need it, I'll give it to you, but I'm thinking I must be missing something obvious. If I'm not, please let me know and I'll paste away. Thanks.
  5. I understood what you meant about the temporary copy thing - I've made that mistake before. :) But this whole idea of cutting down the code until you have a really small example that still has the problem sounds like almost as big a project as starting over completely and slowly reintroducing old code to find out what specifically is causing the problem - so I guess that's what I'll do.  Maybe I can figure out why SDL_Image was griefing me last week too.  :lol:  PS: Thanks for the info on not having to check for empty() too - I just figured it was necessary to prevent accidentally dereferencing something wrong and crashing the program. :)
  6. I understood what you meant about the temporary copy thing - I've made that mistake before. :) But this whole idea of cutting down the code until you have a really small example that still has the problem sounds like almost as big a project as starting over completely and slowly reintroducing old code to find out what specifically is causing the problem - so I guess that's what I'll do.  Maybe I can figure out why SDL_Image was griefing me last week too.  :lol:  PS: Thanks for the info on not having to check for empty() too - I just figured it was necessary to prevent accidentally dereferencing something wrong and crashing the program. :)
  7. Well my whole code is like 6-7 files with hundreds of lines, which is why I didn't do that (lol). But I like your temporary copy idea - I'll go down that road for awhile and see where it leads.  But if you can think of a way to share more code without copy/pasting a book's worth of code in here I'm open to suggestions. :) Now as far as SDL_Image, I've always had trouble with compiler issues screaming about what appears to be SDL's internals.  It was like a week ago when I gave up on that thing so I don't have any exact error messages or code, but I vaguely remember one compiler tantrum about "SDL_toupper", or something like that. I had linked to the library file, put the DLL in the same folder as the EXE and #included the header (there was only one), but it's like it was somehow still missing stuff, and apparently stuff that didn't come with the zip file.  I'll fight with it some more and get more info before posting a question about that. :)
  8. Good morning, I've been building a game in C++ using SDL and I've run into a problem I'm not sure how to fix (or maybe it's just a limitation of SDL) So I've got a "GameObject" class with a "draw" method that draws the object's sprite on the screen (obviously), and then have objects that extend if (like the player, enemies, weapons etc.); these all work fine.  Then I have a Game object that handles the main game loop.  This is the object where the trouble is coming from.  Specifically this code: while(running) { // Clear the previous frame SDL_RenderClear(window->get_renderer()); // Oh yeah, I had a Window class too; this works though // Draw all the objects in the "objects" vector if (!objects.empty()) for (GameObject * o : objects) o->draw(window->get_surface()); // Handle keyboard events etc. }This is the loop that handles keyboard events, draws the background on the screen, etc. But the code that handles drawing seems to be the problem here. In the for loop, "objects" is a vector of pointers to GameObject instances, and it works fine for objects created in main(). So for the player, the one enemy ship I have, and pretty much anything I know is going to be there at compile time, this works great. Anything I can create before calling Game.start (where the code above is executed) will be drawn on the screen. The problem is with objects added to the vector during the game. For example, this game is a 2D scroller with a space ship that shoots lasers. In the loop above, if the user presses Space it creates a laser object and adds it to the "objects" vector. Those objects are created and added to the vector (tested with a bunch of cout calls) but mysteriously never get drawn. So my questions are: 1. Has anyone here ever run into a similar issue trying to create instances dynamically like this? 2. If so, how did you solve it? Or is it one of those things that just can't be done? Maybe there's some requirement that all instances to be drawn have to be defined at compile time or something? After all, we're talking about a platform that can only handle drawing BMP images (unless you can miraculously get SDL_Image to work, but that's a whole other can of worms lol). Thanks. PS: Just out of curiosity, is there a better platform for 2D in C++ than SDL? I'm slowly learning UE4 for 3D, but I mostly play 2D so I figured I'd start with something "simpler" :D
  9. Wow, thanks for the quick replies! In the end, it was Kylotan's answer that solved the problem.  What you said makes perfect sense, and so does the example in the docs.  idk why I didn't see that, but I should've guessed it when the program returned 0xC00005 (may be off a zero - it's the exit code that roughly translates to "I can't dereference a null pointer, you geek!"). :D But all joking aside, thanks for catching that!  All those question marks in the stack trace, and no useful info from Google, had made it seem infinitely more complicated than it really was.  Now I can get back to building stuff. :)
  10. Hey guys, So I've been messing with SDL this weekend, and found some great tutorials on YouTube, but I've been running into a bizarre problem that Google has been no help in solving.  Some functions, for no good reason (there is a reason, but it has been obfuscated to oblivion), will crash my program.  Here's my code so far: #include <iostream> #include "SDL.h" #define WINDOW_WIDTH 800; #define WINDOW_HEIGHT 600 #define FPS 60 void DrawChessBoard(SDL_Renderer *renderer) { int row = 0,column = 0,x = 0; SDL_Rect rect, screen_size; /* Get the Size of drawing surface */ SDL_RenderGetViewport(renderer, &screen_size); for ( ; row < 8; row++) { column = row % 2; x = column; for ( ; column < 4 + (row % 2); column++) { SDL_SetRenderDrawColor(renderer, 0, 0, 0, 0xFF); rect.w = screen_size.w/8; rect.h = screen_size.h/8; rect.x = x * rect.w; rect.y = row * rect.h; x = x + 2; SDL_RenderFillRect(renderer, &rect); } } } int WinMain() // SDL needs WinMain, for some reason, not main { // Fire up SDL SDL_Init(SDL_INIT_EVERYTHING); // Create the window SDL_Window *window = SDL_CreateWindow("You Geek!", SDL_WINDOWPOS_CENTERED, SDL_WINDOWPOS_CENTERED, 800, 600, SDL_WINDOW_RESIZABLE); if (window == NULL) { SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Window creation fail : %s\n",SDL_GetError()); } // Declare variables SDL_Event *event; bool running = true; SDL_Renderer *renderer; SDL_Surface *surface = SDL_GetWindowSurface(window); renderer = SDL_CreateSoftwareRenderer(surface); if (!renderer) { SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Render creation for surface fail : %s\n",SDL_GetError()); return 1; } // Main loop while (running) { // Draw stuff DrawChessBoard(renderer);    // This worked, ironically SDL_UpdateWindowSurface(window); /* Clear the rendering surface with the specified color */ SDL_SetRenderDrawColor(renderer, 255, 0, 0, 255); SDL_RenderClear(renderer); // Handle events while (SDL_PollEvent(event)) { if (event->type == SDL_QUIT) { running = false; break; } } } // Clean up SDL_DestroyRenderer(renderer); SDL_DestroyWindow(window); SDL_Quit(); return 0; } And some of the functions that cause the epic meltdown are: SDL_LoadBMP SDL_GetTicks SDL_GetWindowSurface (though that one has stopped after a few hours of tinkering, reason still unknown) And here's what my debugger has to say: #0 0x768ba9f2    RaiseException() (C:\Windows\SysWOW64\KernelBase.dll:??) #1 0x6c81b14c    SDL_LogCritical() (C:\Media\Code\Projects\EXPERI~1\SDLTES~1\bin\Debug\SDL2.dll:??) #2 0x406d1388    ?? () (??:??) #3 ??    ?? () (??:??) So apparently, whatever is happening has even stumped the debugger (lol).  I've never seen a bunch of question marks like that, but I'm guessing they're bad lol.  Seriously...? Anyway, here are some other details: My IDE is CodeBlocks with MinGW. My OS is Windows 10 Anniversary Edition, 64-bit I'm using SDL 2.0, and I've had to use the 32-bit version of the DLL because that seems to be how MinGW wants it (or so said Google when I was battling a different epic crash problem - using the 32-bit DLL allowed my program to run correctly - could that be what's foobarring every other function I try?). I've been all over the documentation, their Bugzilla page, and lots and lots of Googlefishing, but no dice.  Is SDL 2.0 just unstable or something?  lol idk but I'm seriously considering trying Unreal again (though getting that to startup has been a way bigger struggle lol - seems the big C++ frameworks like to pile on the challenge-factor for us Windows guys lol, but anywayz).  Obviously, I'm stuck outta luck here, so I'd sure appreciate any info on what this hair-jerker of a bug could be.  tyvm. :)
  11. Noobish C++ question

    Awesome!  I've been all over the web looking for something like this.  Yes, I thought it might have to do with the whole "pointer-to-a-pointer" thing, because that really seemed weird; I know what pointers are and how to use them, but the only other time I've seen two asterisks is with an array of C strings (ex: char **SomeArray).  But anyway, I'll check out the link and your example to see what I can do.  tyvm. :)
  12. Noobish C++ question

    Wow, thanks Nypyren and Alberth for the info.  I had no idea there was a way to see what variables' values were being set to in real time or any of that.  And I had no idea there were compiler settings that might help.  Now that I at least have an idea of what to research (like how to do these things in my IDE) I definitely have some options now.  This was what I was looking for (in particular Nypyren's explanation of the general process, which involves a lot of stuff I didn't even know was possible, lol).  And yes, I understand that normally actual code and error messages help (lol, sorry frob) but my question was a general "how do I go about fixing this type of error" and not a "please help! fix this for me!". :) But while we're on the subject, what I have is: sqlite3_prepare_v2(db, sql.c_str(), -1, statement, NULL); where db and statement are SQLite handles (to the database and prepared statement objects) and sql is an std::string.  The SQLite docs say if the third parameter (the query string length in bytes) is negative, it'll read till the end of the string (so that's the -1).  And the last parameter (the NULL) is an optional callback to free the string after the SQL stuff is done.  I don't really understand why this would be necessary, and apparently neither does anyone else who writes examples, because in every example I've seen this is always NULL or 0.  And that makes sense, because I'm not using the "new" keyword to create my strings (so I don't have to do "delete" at the end anyway...right?  Or am I out in left field on that one?). Now I'm having trouble finding the exact error message again, but it was "access violation" with a bunch of numbers, like I said.  And of course Google that, and you'll find everything that has nothing to do with the problem at hand, cuz it's that general.    So I started investigating the IDE's debug tools, and managed to get this: "#0 0x46a5c0    sqlite3LockAndPrepare (db=0xe02e00, zSql=0x8d2434 "INSERT INTO table('text') (C:\path\to\\sqlite3.c:116069) #1 0x46a7e2    sqlite3_prepare_v2 (db=0xe02e00, zSql=0x8d2434 "INSERT INTO table('text') (C:\path\to\sqlite3.c:116151)" and from here it points to the line in my code where I called the line above. So my first thought was "duh, there's no space between the table name and the paren, so it's an SQL syntax error" but I looked in my code and I did put a space there, and even after I changed the statement a bit it still shows that same string.  And because the stack trace points to something in SQLite's code, I'm guessing it's something SQLite itself is doing with what I gave it.  So at the end of all that, I know which part of the code is failing, but still don't know why (which is why the question was more general - I wanted to know how to fix stuff like this, not just "here, you fix it" lol).  Hope that makes sense. :) But anyway, it sounds like I got my answer to the original question (there are debugging tools in my IDE that I never knew about).  But beyond that, I'd sure appreciate an example of how to use sqlite_prepare_v2 correctly.  lol thanks again.
  13. Hey guys, what's up, I've got a C++ question that has been driving me stupid for the past couple days, and Google has been less than helpful.  I've been working with SQLite and it works great with hard-coded strings, but I've been wanting to switch to prepared statements.  I got down to "sqlite3_prepare_v2" and it compiles fine but at runtime throws a cryptic error basically telling me my C++ is newbie at best.  "exception at <number>, blah blah bubblahbubublah at <number>".  The numbers are in hex format, so I'm assuming they're memory addresses, and the "blah" part is always so general and vague that it's practically unGooglable.  And the SQLite documentation, while descriptive enough to explain what the parameters and return values are, it's sadly lacking in examples.  Fish around on Google and it's all about wrappers people wrote for Android or iOS.  So I'm stuck outta luck, hoping that someone here might be able to share any info that could help me for decrypt this meaningless jibberish into something more human-friendly - or does it just come down to years of experience, memorizing memory addresses and knowing Windows internals better than Bill Gates? lol idk But I'm guessing the real issue is just not knowing how to use my IDEs debugging tools, if it has any, and the process of debugging runtime errors/exceptions in general.  I'm using the most recent CodeBlocks IDE with MinGW on WIndows 10 x64.  Thanks in advance. :)
  14. Wow, thanks for all the great resources!  I know I've got my work cut out for me if I'm even gonna think about learning all this, but it sounds like I'm closer to the right track than I thought.  I've seen C/C++ pages call a 2-dimensional array a "matrix" (I just figured it was because of the movie, and just cuz it sounds cooler), and I know at one point I've used a C library (and I believe it's part of the standard library) called "vector"; I always figured vector was the official name for "3D point" (though listening to this YouTube video it sounds like they can be used for a lot of other stuff too).  So it sounds like this is the kind of thing that comes with experience; that's how most things are in programming, learn by doing and keep yankin' your hair out until you're a bald genius. :lol:   But seriously though, if I were planning to build a game engine from scratch, I wouldn't bother with physics at all and stick to basic shape intersection; IMO that's really all you need for everything short of Angry Birds - then spend that time to improve it in other areas; audio, animation, optimization, portability, a high-level API etc. etc. etc.  Those are the kinds of "problems" I'm used to solving, and just considering that there are still people doing this today kinda makes me wonder if I should consider doing that. :lol:    This brings me to another comment that came up: I was unaware that Duality was a "fringe" framework; sure it looks like a Unity wannabe, but it also looks a lot more manageable for one guy.  I would love to dive into one of these big-shot engines like Unity or Unreal or whatever, but these kinda look like you need a team to create anything decent.  I'd rather create a great 2D game than a crappy 3D game, which is why my interest has been more in simpler engines... but am I way out in left field on that?  This is totally off-topic (my own topic :lol:) and I apologize for that - but what engines would you recommend and why?  I'm asking here because you guys have already put up with enough of my posts to have an idea of what I'm looking for.  I'm down with learning some extra math if necessary (which is why my original question was about that) but I'm definitely not interested in 3D (yet).   Anyway, thanks again! :)
  15. Hey guys, what's up?   I recently discovered both Unity and Duality, and it's got me back into developing games.  I know C# well and my graphic design skills (which are like SNES at best lol) are just right for some old-fashioned 2D awesomeness.  But there's one big problem: physics.  At this point I'm working mainly in Duality, but the problem applies to Unity as well.  I don't know Jack about physics; in college I aced all things language, so learning programming languages was easy - but I s*cked big time at algebra (in fact I had to take a remedial course and almost flunked that).  It was always super-abstract, super-confusing, and super-pointless IMO.  Now 15 years later I'm an experienced programmer - who still doesn't know Jack about physics.  :D   And unfortunately, everything I've found on Google seems to be geared toward aliens - its explanations use so much cryptic lingo that it may as well be written in an extraterrestrial dialect.  I'm sorry, but I don't see how "angular damping", "restitution", "linear velocity" and other Jargonian phrases can be translated into how to make a player walk (forget stop), an enemy gun fire player-seeking missile, or an object continue moving at the same speed after the game has been "un-paused".  All of the game-specific scenarios mentioned above are things I've been able to do when building a game from scratch, and I know a few oversimplifications (mass means weight, velocity means speed, etc.), but in Duality I'm finding I'm completely lost.  I'm not trying to build a Tardis, for cryin' out loud!  :D   Are there any tutorials available out there that explain this stuff in a way that makes sense to the average Earthling?  Someone asked a similar question on their forum, but it looks like it was pretty much unanswered.  I think it's partly because Duality itself is a fairly new name in the game dev world, and probably doesn't get many second looks since it's UI makes it look like a Unity wanna-be. But it really is a great engine; just the fact that it has physics is pretty sweet.  But I'd do a lot better with X's and Y's lol... unless somehow I can find a way to decrypt this mess lol.