Jump to content
  • Advertisement


  • Content Count

  • Joined

  • Last visited

Community Reputation

111 Neutral

About AgentPaper

  • Rank
  1. AgentPaper

    Advice for Games Made by a Single Person

    Thanks for all of the good advice.   I'm a competent programmer, so making the game myself isn't an issue. I ended up going with Flash as a platform, using FlashDevelop. I'm just making a basic shooter for now, so far it works with random enemies and one type of ship, but it's been good practice and I'm slowly adding in more and more features as I go.   I think a shoot'em up game is a good starting point, because it doesn't take very long to have a working game, but then you can just keep adding in more enemies, more player ships, more weapons, upgrades, levels, and so on. It's been great to be able to have a basically 1:1 ratio of me doing stuff to the game improving, unlike some other game types I've tried where you need to know exactly what you're doing from the beginning, plan things out, and it takes a long time before you have something playable and fun.   I'm not much of an artist, but I can do some basic pixel art, so that's defined the style of the game. I don't want to hire out an artist (or request a freebie) on my first game, so I've just kept it simple. Here's a screenshot of the game so far:     At the moment, I'm planning to put it up on Kongregate once it's done, since that seems to match the quality and size of the game fairly well.
  2. Hello. I've been playing and studying games for a long time, and in the not too distant future, will even be attending college with a focus on game design.   However, I want to get the ball rolling early, and try my hand at making a game myself. However, I'm not sure where to start. I'm well versed in game design (and design in general), and am decently apt at coding (I've made a few programs in Java and C++), but I've never actually made a game yet. So my questions are:   1) What types of games are best suited to being made by a single person? I'd guess that this would be things that don't require a lot of content, like an RPG would, and not something that requires a ton of testing, like any PvP game.   2) What game development platforms work best for a single person? I've played around a bit with Unity and tried looking at other systems, but most of them seem better suited for large projects with lots of people on them, and/or are very expensive. I've also seen a few things like RPG Maker and Game Maker, but those seem too simplistic to make a "real" game, and don't seem to leverage my ability to write code any. Is there a middle-ground between these, or am I not giving one side enough credit?   3) What is a good goal to strive for for a first game? I recall reading about how new art students start by copying existing art. Should I try to re-create existing games as a first step, or branch out and do something new? How long should I expect to spend making the game? What's a good way to know if I'm being too ambitious and setting myself up for failure?   And in general, any other advice for a new game developer?
  3. AgentPaper

    Object Management?

    Ah, very interesting, I'll have to try that out!
  4. AgentPaper

    Object Management?

    Nope. I see a code snippet using atan, but I don't see usage of atan2 ! (Or else I've missed it?) How could atan( -2 / 3 ) be different from atan( 2 / -3), although the 1st is in quadrant IV and the 2nd is in quadrant II? You have to consider the sign of y and x values separately when relating the parts. That is (besides avoiding a division by zero) what atan2 does in contrast to atan. [/quote] Well, as far as I can tell Atan and Atan2 are the same thing, only with Atan you need to divide the two values yourself, and in Atan2 you just input 2 values and it takes care of that. I guess I could try using Atan2, though I don't know how it would help.
  5. AgentPaper

    Object Management?

    That...is exactly what I've been trying to do, and what I have in the example code I posted. The problem is, I can't get it to spit out the right number.
  6. AgentPaper

    Object Management?

    See, most of that is still going way over my head. I've only touched on matrices very very briefly in school, and that was a long time ago anyways. The way the rotations are defined is, they start at 0 pointing straight down, and then move counter-clockwise up to positive pi facing straight up. Then it changes to negative PI and goes back down to 0 at the bottom again. As far as I can tell, this is the standard way that rotation works in XNA. The co-ordinate system has the origin at the top left side of the screen, with positive X going to the right, and positive Y running straight down. I'm never going to need to use this specific code for 3d, since this game is wholly 2d, so I don't think I need anything too fancy. Just a simple algorithm to get an angle from 2 points is what I need.
  7. AgentPaper

    Object Management?

    What is the format of the rotations? Assuming that both rotations are given w.r.t. the same reference frame, then ... * for matrices R[sub]1[/sub] and R[sub]2[/sub], the rotation from R[sub]1[/sub] to R[sub]2[/sub] is a matrix R like in (written using column vectors) R * R[sub]1[/sub] = R[sub]2[/sub] so that the "difference" rotation is R = R[sub]2[/sub] * R[sub]1[/sub][sup]-1[/sup] * for quaternions q[sub]1[/sub] and q[sub]2[/sub] similarly q = q[sub]2[/sub] * q[sub]1[/sub][sup]-1[/sup] [sup] [/sup]* for axis/angle pairs in more than 2 dimensions it would be best to convert them into quaternions (in 2 dimensional space the difference rotation is just the difference of the both angles) * for Euler angles please convert them into rotation matrices [/quote] yeebs, that all just went right over my head. Matrices? Quaternions? I thought this was a trig thing, not advanced calculus or whatever that is.
  8. AgentPaper

    Object Management?

    That's the kind of stuff I could be doing, but my problem is that I can't figure out how to get the formula to calculate the difference of two rotations.
  9. AgentPaper

    Object Management?

    Just posting here to note that I ended up getting it all working. I also made my projectiles use a seperate ProjectileManager class, similar to what I stated above, more to make it easier to tell the game to draw everything than for any other reason. Anyways my problem now is that I'm trying to get my ships to be able to move around autonomously, tracking their targets and shooting at them as appropriate. I've actually done this once before with a different game in a slightly different environment, and the solution I used back then was simply to find the angle from the ship to the target it wants to be moving to, and then rotate the ship slightly each step to turn towards it. The problem is, I can't seem to get the numbers to line up, causing my ship to just fly around randomly. Here's my code, which by my math SHOULD be working, but isn't: rotationToTarget = NormalizeAngle(-(float)Math.Atan((AITarget.position.Y - position.Y) / (AITarget.position.X - position.X)) - (rotation - (float)(Math.PI / 2))); Console.WriteLine(name + " Rotation: " + rotation); Console.WriteLine(name + "Rotation to Target: " + rotationToTarget); if (rotationToTarget > .03F) { TurnLeft(); } else if (rotationToTarget < -.03F) { TurnRight(); } protected float NormalizeAngle(float Angle) { float normalizedAngle = Angle; while (normalizedAngle > (float)Math.PI) { normalizedAngle -= (float)(Math.PI * 2); } while (normalizedAngle < -(float)Math.PI) { normalizedAngle += (float)(Math.PI * 2); } return normalizedAngle; } The first is the code itself, the second simply takes a float, and then forces it to be between -PI and PI. rotation is a variable that all of my ships have, which starts a 0 pointing straight down, then goes counter-clockwise up. It is in radians. position is the position of the object itself, tracked from the top left with positive going right and down. What should happen, is that this should give a value to rotationToTarget between -PI and PI, with 0 meaning that the target is straight ahead, a positive value meaning it's to the ship's left, and a negative value meaning it's to the ship's right. So, if the value is positive the ship turns left, and if it's negative then it'll turn right. What instead happens is that the ships just seem to fly about randomly. Sometimes it even seems like one is following another, but not for any reason that I can figure out. I'm sure I've just got the formula wrong somewhere, but no matter how I tweak it it won't do what I want. Any ideas?
  10. AgentPaper

    Object Management?

    Hm, for the bullets, I guess I could just have a single "Bullet" class for each type of bullet, which is created once and not destroyed. Instead of handling a single instance of the bullet, it would instead have an array for the location and speed variables, and then when it's called to update or draw, it moves all the bullets at once. If one of the bullets needs to be destroyed, then I simply remove that location/speed from the list, bump all the entries above down a notch, and reduce the "bulletsExisting" variable. If I need a different type of bullet, then I simply make another type of this class, and that can handle all of those type of bullet. I don't need to store the ID of the ship that fired it, since friendly fire is just part of the game. And yeah, having 6 or so different classes is completely unnecessary for the simple game I'm building right now, but I'm planning to develop this into a much more complicated game with many more different types of ships and objects flying around. For example each ship will have a list of Components, which need to be rendered but don't move in the traditional sense, instead being manually moved and rotated by the ship they're attached to. And then there's things like random space debris, space stations, background objects such as planets that move around slowly, etc.
  11. AgentPaper

    Object Management?

    I don't think that would really work for what I'm doing. There's going to be a whole lot of bullets of many different types flying around at any given time, after all. And does it really save that much processing power or anything? Doesn't seem like it would all that much. I guess I could simply not destroy bullets after they're created, and if a bullet of that type is fired again, it'll re-use the old bullet before making a new one. That's really an optimization thing though, so I don't think I'll worry about that quite yet.
  12. AgentPaper

    Object Management?

    At the moment, I've actually already got my objects seperated into a good number of classes. I've got RenderedObject, which is anything that's visible, and only has a position, rotation, and sprite. I also have MobileObject, which inherits from RenderedObject, which also has a velocity and acceleration. And so on down the line for DestructibleObject (has HP), ShipObject (has weapons and such), and then finally my actual SimpleFighter, which has the actual stats for the specific ship. I also have a SimpleBullet that inherits from ProjectileObject, which itself inherits from MobileObject. So I think my main problem was just that I don't know the syntax for making a list of objects, or a list of lists for that matter.
  13. AgentPaper

    Object Management?

    Hey everyone. I've been messing around with C# and XNA to try and make a fairly simple game just to start, but a problem I've run into, which I've run into before and had trouble with, is managing objects that are created and destroyed on the fly, and specifically how you would tell the engine to draw all of those objects. For example, right now I'm just trying to make a simple spaceship that shoots bullets when you hit the spacebar. I've got the ship moving around just fine, but I can't figure out how to make the newly created Bullet objects draw and stop drawing themselves correctly. I'm sure there must be some standard way that this is done, but I've been unable to find anything, probably mostly because I have no idea what to call such a system in the first place! I've tried making an array that stores all the objects that need to be rendered, but I can't seem to make it work, and I don't think my solution is ideal anyways. If someone could share some example code of how this type of thing is managed in an existing game, that would be extremely helpful.
  • 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!