• Content count

  • Joined

  • Last visited

Community Reputation

173 Neutral

About homer_3

  • Rank
  1. Arena Of Gods - Game Concept

    Sounds like a MOBA like DotA, HoN, or LoL. So yes, it could reach the market. You could even implement it in the SC2 or WC3 editor if you wanted to. That way you wouldn't have to worry about netcode.
  2. Puzzles

    [quote name='Stormynature' timestamp='1343729397' post='4964794'] All of the above. [/quote] In that case, I came up with an idea for a puzzle game last week. But it has 1 key flaw in the design that I can't figure out how to fix. The general game is build off Tetris Attack. The player starts with a board of hex tiles. The board has 1 hex tile in the center and 3 rings of hex tiles around the center tile making a filled circle of hex tiles. Each tile can be 1 of 6 "colors". At a periodic, decreasing time interval, the outer ring shatters. If the player is ever left with just the center tile, he loses. The player can match 3 or more of any color to pause the shatter timer for a short period of time and the matched tiles will be destroyed. If the player matches 4 or more, new hex tiles will form around the outer ring, basically giving the player an additional ring. Up to 3 additional rings can be added to the starting 3 for a board maximum of 6 rings. The game is also intended to be mulitplayer. Matches of 4 or more will also dump garbage tiles on your opponent. Garbage tiles will cause the shatter tile to count down faster. Garbage tiles can be destroyed by matching 3 or more of a color adjacent to a garbage block. The problem with the idea is that I'd like gravity to be sourced from the center tile. This would end up creating ambiguity of which tile would fill the hole left by a destroyed matched tile. So setting up combos would be heavily luck based. Sure, you could have everything fall straight down, but then the rings would feel out of place and then the whole thing just starts to revert back to an exact clone of Tetris Attack.
  3. What kind of equation am I looking for?

    Thanks! I knew this was a standard equation. I just had no idea what it was called.
  4. Is there an equation that would produce a graph that looks like this -> [url="http://i.imgur.com/rs0S2.png"]http://i.imgur.com/rs0S2.png[/url]? The bottom right is supposed to be asymptotic. I'm trying to find out what to google on to learn about this.
  5. Help with making a gravity well.

    [quote name='jefferytitan' timestamp='1336609931' post='4938830'] If you want the orbit to decay, think about satellites. Their orbits can decay when they dip into Earth's atmosphere. You could simulate that, e.g. pick a radius around the well that experiences friction. [/quote] I am quite surprised that the orbit doesn't naturally decay. Partially because I know satellite orbits do and this is what I want to be guaranteed to happen. I'm not really sure how to apply friction. Would I just gradually reduce the velocity vector by some factor if it is within the specified "friction radius"?
  6. Help with making a gravity well.

    Thanks to your guys' help I am making progress. My new code looks like [code] Vector3 gravDir = curGravWellPos - transform.position; gravDir = gravDir.normalized; float dist = Mathf.Abs(Vector3.Distance(curGravWellPos, transform.position)); grav = (float)massProduct/ Mathf.Pow(dist, 2); velocity += ( gravDir * grav); transform.position += ((velocity * Time.deltaTime)); [/code] massProduct is just a very large number multiplied by G. The object is now orbiting the gravity well, but it doesn't appear to be falling into it. P.S. No this game has absolutely nothing to do with Angry Birds.
  7. Help with making a gravity well.

    [quote name='jefferytitan' timestamp='1336545575' post='4938590'] I noticed that your version doesn't update the velocity vector at all. I think it might be better to go back to basics, often the best way when calculations don't pan out: 1. Calculation the force due to gravity, as per Bacterius's post. 2. Convert it to acceleration, using F=ma. 3. Make the acceleration into a vector, e.g. the unit vector towards the gravity source times a. 4. Update the velocity with the acceleration and time, e.g. add the acceleration vector times the time. 5. Add the velocity to the position. You can get fancier on top of that, e.g. interpolate the acceleration from one frame to another, then interpolate the velocity based on that, then get the position. Calculus in the house. ;) But that should be a good start if you run your physics frequently. [/quote] I didn't update the velocity because dY = Vy0*t = .5*a*t^2 doesn't call for it. I'll try out your method of simply updating the velocity based on the acceleration instead of getting dY and see how that works out. [quote name='Olof Hedman' timestamp='1336554565' post='4938611'] [quote name='homer_3' timestamp='1336532148' post='4938565'] I thought you subtracted the position of the other guy from yourself to get a vector going from yourself to the other guy. [/quote] You have it backwards. [/quote] Say the well is at 8,2 and the object is at 4,6. 8-4 = 4 2-6 = -4 This gives me a vector of 4,-4. Adding that vector to 4,6 (the object caught in the well) will put me at the center of the well. I don't see how subtracting my target's position from my position will give me a vector going from me to the target. [quote name='Olof Hedman' timestamp='1336554565' post='4938611'] [quote name='homer_3' timestamp='1336532148' post='4938565'] Getting the acceleration based on the distance the object is from the well isn't all that important to me. A constant acceleration will work just fine. [/quote] Then you are not modeling a gravity well, but something else... which might explain why it doesn't behave like you expect. [/quote] I'd expect a constant acceleration to still pull the object towards the well... [quote name='h4tt3n' timestamp='1336558107' post='4938622'] Another thing worth mentioning is that a real, physically accurate gravity field cannot "catch" stray objects and make them spiral into itself. This is only possible if you add some sort of friction that dampens motion over time. Would you like to see some simple code samples (100-200 lines) of gravitational interaction? Cheers, Mike [/quote] So you are saying that if you were out in space and tried to throw a baseball tangent to Earth and the basball wasn't moving at escape velocity, it wouldn't fall to Earth?
  8. Help with making a gravity well.

    I thought you subtracted the position of the other guy from yourself to get a vector going from yourself to the other guy. Using the projectile motion equation to get the distance traveled made sense to me. But instead of only accounting for gravity on the Y, I also added in X modified gravity's proportion in each equation by the normalized vector that points to the gravity well. But I really wasn't sure what physics equation would be best to use to do this simulation. Getting the acceleration based on the distance the object is from the well isn't all that important to me. A constant acceleration will work just fine. As for flying away: The thrown object starts in the top center of the screen and is thrown down and to the left. The well is in the center of the screen. For a few seconds, the object moves towards the gravity well as expected, but then it just starts moving in a straight line up and to the left.
  9. I'm trying to make a gravity well so some object with a velocity will spiral in towards the center of the well as it orbits it. What I have appears to start to work, but then the object circling the well suddenly will fly off away from the well. Here is the code I am using [code] Vector3 gravDir = curGravWellPos - transform.position; gravDir = gravDir.normalized; float dT = Time.time - startTime; //current time minus the start time float dTSqrd = dT * dT; float deltaY = (velocity.y * dT) + (.5f * grav * gravDir.y * dTSqrd); float deltaX = (velocity.x * dT) + (.5f * grav * gravDir.x * dTSqrd); transform.position = startPos + new Vector3(deltaX, deltaY, 0); [/code] Another issue I'm having is that when calculating deltaY and deltaX, I'm pretty sure I should be using subtraction. But if I do that, the object doesn't move towards the gravity well at all.
  10. What is a good way to create a line with a loop in the middle? My only thought is to try to stitch together several bezier curves. I'm trying to crate this line for an enemy to path on.
  11. Quaternion.... angles?

    I'm working in Unity and I'm trying to get an enemy to turn a certain way. Doing it with Euler angles is just not working and using quaternions works better, but still isn't quite there. Basically, imagine an enemy standing up straight and rotating him so the top of his head points at a desired position. This is only on 2 axis, so to get the angle I want to rotate I do [code] vec = targetPos - position; vec = vec.normalize; dotProd = Vector3.Dot((Vector3.up), vec); angleToTarget = Mathf.Acos(dotProd) * (180/Mathf.PI); [/code] So now I have the angle I want to rotate. I want to do this rotation about the X axis, since that is the axis that goes into the screen for me. How would I go about modifying the existing quanternion that is being used for rotations (which is just the identity quaternion) so it will rotate the object for the calculated angle about the X axis?
  12. Reckless Robots

    [color=#141414][font=Helvetica, Arial, sans-serif][size=4]Hi all, over the past year or so, I've been working on a 2D fighter in my free time. My favorite fighting game series have always been Smash and DoA, so the fighter I made was inspired by those.[/size][/font][/color] [color=#141414][font=Helvetica, Arial, sans-serif][size=4]Code named Reckless Robots, it was built from the ground up in XNA. It has projectiles, grabs, counters, launchers, and super moves. There are currently 3 playable characters and online support. Although, I've only tested networked games over LAN and don't have a delay box to simulate the internet, so I hope it works in the real world. Online games require ports 35768 + 35769 to be open.[/size][/font][/color] [color=#141414][font=Helvetica, Arial, sans-serif]This is really just an alpha version of the game, but I could use some feedback on it.[/font][/color] [color=#141414][font=Helvetica, Arial, sans-serif][size=4]The game supports 2 player local multiplayer with 360 controllers or 1 player vs the AI with a 360 controller or keyboard.[/size][/font][/color] [color=#141414][font=Helvetica, Arial, sans-serif][size=4]Download link: https://[/size][/font][/color]rapidshare.com/files/1307673106/reckless_robots.zip A couple note on the controls that aren't specified in the game: [color=#141414][font=Helvetica, Arial, sans-serif][size=4]1) Falls can be teched with jump. Players can tech roll with jump+direction.[/size][/font][/color] [color=#141414][font=Helvetica, Arial, sans-serif][size=4]2) When a player is on his back, he can attack while getting up with kick.[/size][/font][/color] [color=#141414][font=Helvetica, Arial, sans-serif][size=4]3) Supers are performed with Punch+Kick.[/size][/font][/color] [color=#141414][font=Helvetica, Arial, sans-serif][size=4]Here is a low quality video of the gameplay [/size][/font][/color]
  13. Well that's good then. I also do my pruned collision checks in my main loop. In my base update, I update the players, then check for collisions, and react if necessary. I think that's an ok design. I don't think each object should have its own specialized collision check. Just having a collision box check for collision with another collision box works well. This keeps the collision checking decoupled from any particular game object, which is useful since it allows for it to be applied more generally.
  14. The way I do it is that each game object has a list of collision boxes. Collision boxes can be passed any collision box to see if the 2 intersect. This way I can check to see if any 2 given game objects are colliding. I can also do collision pruning and only check collisions between objects of interest this way. The way you describe what you're doing, it sounds like you check collision between everything and everything else, and you definitely don't want to do that.
  15. I'm working on a mech oriented game and I want to have a staticy effect come up when the player gets hit. I'm not really sure of a good way to go about doing something like this. I was thinking of having a transparent png with a picture of static on it overlay over the whole screen and shake it around a bit, but I'd really like to get the horizontal lines and distortion that can happen along with this. I also thought that since static is pretty random, a programmatic solution using shares might work better. But I'm not even sure where to start in that case. Is there anyone that's done something like this before? What did you do?