Advertisement Jump to content
  • Advertisement


  • Content Count

  • Joined

  • Last visited

Community Reputation

259 Neutral

About jdindia

  • Rank
  1. jdindia

    C# as a starting point?

    Quote:Original post by jpetrie sto8qc, your points are unrelated, wrong, and/or irrelevant, and you appear to have misunderstood the point of the very article you tried to link in support of your own half-baked argument. Please refrain from posting that kind of misdirection and misinformation in this forum. You may consider this your warning. Wow. I don't care for language arguments, so I never enter these threads, but I feel compelled to comment on this. Someone asked a question, sto8qc gave an opinion that was related to the question, and provided a relevant article. His post was on topic and non-offensive. If you think his opinion is wrong, then give some arguments as to why - that's the whole point of a forum. If you think the thread has devolved into deconstructive debate (language war, etc), then sure, remind people of that or close the thread. What you've done is essentially exercised your police powers as a moderator to tell someone to STFU. That's precisely what a moderator is supposed to prevent from happening. works because there are people of many different skill levels and with many different opinions all offering advice and discussing things with each other. If people are afraid of posting because they think some expert (or jerk) is going to reply and tell them to shut up and they're wrong, then we all lose.
  2. Your editor will depend a lot on the type of game you've built. I always get tempted to use my game engine to build an editor, but after having tread this path a few times, I'm pretty sure it's usually not the best course. Games are usually not gui heavy, but editors obviously are. That said, your editor will possibly share some game logic and structures. In general, I'd suggest building your editor in a gui friendly environment. Something like C#/Winforms. If the language is the same as the game's, then you may want to attempt to separate the necessary game logic/structures into a library that you can share between the editor and the game.
  3. jdindia

    Stencil buffer for masking stuff?

    It's been a while since I've done this, but from quickly looking at your code, I have a suspicion you're mixing up the stencil test with writing to the stencil buffer. First thing to do is make sure your surface actually has a stencil buffer. Second thing is what I suggested, enabling the stencil test means you're checking what's in the stencil buffer already and writing if the condition is satisfied. You want to enable writing to the stencil buffer, draw some stuff, and then flick on stencil testing to draw other stuff that will get masked.
  4. jdindia

    Math for AI movement in newtonian physics?

    What I do is just forward calculate under the constant acceleration assumption. If you have a max acceleration and max speed, then there's a time window needed to go from max speed to zero. Since you know the speed, you also know the distance of said window. That means anything farther away than that window can just go max speed. Anything closer needs to slam on the brakes. Because you're stepping in discrete steps, the trick is the discontinuity at the edge of the window. What you want to do is enlarge the window slightly and smooth the function out (in speed vs distance from target space). The way I've described it only makes sense for the non-rotational component of the problem, *but* you can actually separate both and solve them in a similar manner (rotation is 1d, but with a funny topology). This works under the assumption that your ship's rotational engine and forward speed are independent, which isn't true in the real world, but probably is in your game. =) I've found it works decently well.
  5. jdindia

    Sun corona

    I don't have a PS3, but I always thought that kind of stuff was done with billboards or similar tricks. You could, for example, use a shader to calculate the colors algorithmically, then you don't need a huge billboard texture. Why would a billboard fail if the user turns away from the sun? If the billboard is big, you'd see it even outside the camera's view. And if the camera is fully rotated around, then I don't think you want to show anything anyway.
  6. I guess you have sprites, so instead of render you'd have void update ( float deltaTime ) { // logic stuff as before _currentAnimation->update ( deltaTime ); _sprite->setAnimation ( _currentAnimation ) } Or you could put the update function on the sprite and call set animation when you switch animations (ie, there is no _currentAnimation, only _sprite). Or you could do something like sprite->setSubRect ( _currentAnimation->getTextureCoordinates ) As with everything, there are many ways of doing things. It just depends.
  7. There are many different ways of doing this kind of thing, but let me give you one possible view of it. First you have your image container. It stores the image data and has a map from names to images for quickly figuring out if something is in the container. class ImageContainer { getImage ( name ) addImage ( image, name ) vector<Image *> _images map<string, int> _names } Then you have something like your animation. I'm going to compact this to contain more than some people would say it should (I'm breaking srp). class Animation { load ( string ) // from the text file update ( float deltaTime ) getImage getTextureCoordinates // the sub-rectangle that contains the current cell clone string _name; Image *_image float _time; float _secondsPerFrame; int _currentCell int _frames // ... whatever else you need for calculating your animation } Then you have some kind of factory or container for animations. class AnimationFactory { loadAnimations ( filename ) cloneAnimation ( name ) { return _animations[_map[name]]->clone() } vector<Animation *> _animations; map<string, int> _names; } Finally you have your game object (actor, entity, whatever you like to call it) class ObjectMegaMan { initialize { _runningAnimation = animationFactory.cloneAnimation ( "mega_man_runs" ); _jumpingAnimation = animationFactory.cloneAnimation ( "mega_man_jumps" ); _standingAnimation = animationFactory.cloneAnimation ( "mega_man_stands" ); _currentAnimation = _runningAnimation; _state = running } update ( float deltaTime ) { switch ( _state ) // do some logic, change animations as needed _currentAnimation->update ( deltaTime ); } render { bindImage ( _currentAnimation->getImage ) setTextureCoordinates ( _currentAnimation->getTextureCoordinates ); // etc. } _state Animation * _currentAnimation Animation * _runningAnimation Animation * _jumpingAnimation Animation * _standingAnimation } Something like that anyway.
  8. I usually push this out to a text file. Something like (I'm being extra-verbose): run_animation file: mega-man.png x: 0 y: 0 w: 128 h: 128 cell_w: 32 cell_h: 32 jump_animation file: mega-man.png x: 0 y: 128 w: 128 h: 32 frames: 4 Then you'd have something like an animation definition class which would parse that up, find a reference to the image in memory, and store it. Your actual animation can then get the image it needs and the relevant frame data. I wouldn't bother with some complicated abstract array system like you've built. Keeping your objects simple is good and besides, you may want your sprite sheets to have a bit of non-uniformity.
  9. Quote:Original post by Joshuad I would rather not spend 2 years at a community college just to spend another 4 years at a state school and still be considered an undergraduate. Uh, usually they transfer credits from the community college, unless you're taking pre-college level classes. I knew a guy who did cc+uni in 3 years, maybe it was 2.5 - not that I'd recommend doing it that way. I think he took 25 units at a time for a few semesters. If you want to speed things along and you're behind the curve, just study up before you start. Seriously. I skipped algebra when I went, just did it myself, and I should've skipped trig as well. Take the generic education classes in the summer, they're usually less effort when they can't make you write as much because of time constraints. Then you can focus on math/science classes during the regular semester. There's a method to this sort of thing. =) Actually, there's lots of technique to it. Never listen to the counselors, just blow them off and skip/focus on what you want. Never show up, "I don't know what differential equations are but they're going to explain that to me." No, no. Know ahead of time what they are and why you should care. =) Read the section that the professor is going to talk about *before* he talks about it. You'll understand what he's talking about and then you can actually ask intelligent questions instead of waiting until you have to do the homework and not being able to. It's all kind of obvious really, but hey, I didn't understand it when I started and I know almost none of my fellow students did. If the professor isn't good, take another one. Never take the easiest professor. Etc. Also, it's sometimes a good idea to work out exactly how much you're paying for each hour of classtime. I think I shelled out 1.2k one semester in grad school for a part-time 3 unit class. It was something like $100 for each hour. It's easier to pay attention when you realize that. =) And that was a cheap state school and not recently. Giant block of text crits you for overwhelming advice. You die. =P Edit: I almost forgot the most important one. Toss your XBox or whatever out the window before you start. You can buy one again when you finish. If only I had done that. =/
  10. jdindia

    how to prevent banding?

    I think there are a few techniques for this. A simple one is just to have textures of various detail levels and then combine them. Search for megatexture and uh, I think clipmapping or something like that. Never done it myself, so hopefully an expert will show and give you more info. =)
  11. Quote:Original post by Joshuad It will be difficult for me to get into most colleges just for the mistakes I had made as a child. I am 23 years old now, and have wised up dramatically. I think your situation is relatively common. If you have the time, I'd personally suggest you go to a community college. Having a solid community college record can get you into some decent 4 year colleges. You'll want to go above and beyond the coursework (just showing up and doing the minimum is a complete waste of time), and, uhm, there won't be any game related classes, but you can take calculus, differential equations, linear algebra, physics, and the standard computer science courses, etc. If you're a good student, you'll get attention from the instructors (they like good students since they don't usually see them). It'll take 4-5 years to finish, but it has the advantage of being a well-rounded education that will enable you to go in other directions besides games. And you might be surprised; I got sucked into the world of mathematics while in school and I never expected that when I started.
  12. jdindia

    Start with XNA? or OpenGL?

    If you're just having fun making games, C# is probably the way to go. C++ will give you more headaches. My understanding is that XNA is a very easy to use framework for making games. OpenGL is more general and probably more troublesome for your purposes. The issues come with portability, etc. You're not going to be able to run an XNA/C# game on a mac.
  13. When I graduated, I applied to a bunch of game companies. I had _completed_ several games while I was in high school and in the university, one of which involved 4 other people that I organized (I'm not talking about tetris clones here or half-finished demos). I also had a full degree from a top university with a decent GPA. From all those I got one phone interview and one in-person interview for scripting jobs. I got zero job offers. Arguably, I'm not good at interviewing; most interviewers ask stupid questions and I tend to tell them that or not say anything. In these economic times you could send out resumes all year and you won't get an interview unless you have prior experience in the industry. I personally wouldn't make any grand plans for getting into the industry. Try to do it, but plan for a back-up.
  14. I used to think these kinds of questions were clever. Now I think they're just dumb. It can be fun to generate a discussion on a forum and spend some time doodling on paper for personal entertainment. But if anyone thinks answering these kinds of questions implies skill at problem solving or programming, then I have to giggle. That said, what's x&(x-1) do? =P I know someone who used to ask that in programmer interviews.
  • Advertisement

Important Information

By using, you agree to our community Guidelines, Terms of Use, and Privacy Policy. 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!