Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Post
  • Reply
IcePotato
Dec 29, 2003

There was nothing to fear
Nothing to fear
I'm a comp sci junior and I want to do an independent study for next semester. I'm thinking making a video game because it will be a learning process with a very concrete result, I've talked to my advisor about it and he agrees that it's a good foundation. However, I'm not really sure what is in or out of my scope.

Right now I'm thinking about using C# and the XNA platform (which I know.. exists, and that's all I know about it). I'm very experienced in Java, I'm very familiar with C# syntax and features, so that's not going to be the hard part. The hard part is defining a project that has significant milestones that I can complete in a reasonable amount of time. I've never done a game from scratch before so I really have no gauge on what I can accomplish in a semester.

Right now I'm thinking that creating a platformer is a good simple task to start out with. Anyone have any advice on the subject? I'm, of course, open to using other languages and frameworks (Except Python. I'm a Perl guy. And I'd like to move past Java) or even creating multiple small game platforms (IE a demo Pong, a demo Asteroids, a demo platformer, and a demo RPG/RPG engine). Basically I just need some guidance because I have no idea where to get started.

Also how screwed am I if I hate linear algebra? :)

Adbot
ADBOT LOVES YOU

IcePotato
Dec 29, 2003

There was nothing to fear
Nothing to fear

Stanlo posted:

If you know C#, you should be fine with XNA. At least, if you have problems, it won't be because of the platform or the language. You're really just limited by your own software engineering skills. I can say with mild confidence that forums.xna.com has better support than probably any other platform you might consider.

A small platformer is probably a good idea. I don't think people will be impressed by pong or asteroids, as they can be made in an afternoon. And, not to be a jerk, but even if you come up with a decent RPG engine, any game you make for it is going to suck if you're working by yourself and have a single semester.

If you're making a 2D game you don't really need to know any linear algebra at all.

If you make a 3D game you don't need to know much. Any competent person can learn the basics.

Sweet, thanks.

I'm assuming the normal track is to create an engine, create editing tools, and then make levels using the tools?

IcePotato
Dec 29, 2003

There was nothing to fear
Nothing to fear
Thanks for all the help guys, I'll write up my proposal over break and probably be back with questions once the semester starts again :)

IcePotato
Dec 29, 2003

There was nothing to fear
Nothing to fear
XNA is driving me crazy; I can't seem to use the right namespaces outside of my main game file to get the classes I need. For example, I am trying to write a class that takes a Vector2d, defined in Microsoft.Xna.Framework namespace, but even though I have
code:
using Microsoft.Xna.Framework;
up top, I can't loving compile without getting "The type or namespace name 'Vector2D' could not be found (are you missing a using directive or an assembly reference?)" on this line:
code:
        public [b]Vector2D[/b] moveTo(Coord dest)
        {
            return new Vector2D(x,y);
        }
I had the same problem with Content.Load in another class file. I've looked at definitions, I've looked at documentation, nothing seems to mention why you can't use this poo poo outside the main game class even when you copy-paste every single "using" directive from the header into your other class file. This is killing me, help plz.

e: Full disclaimer: I'm a Java programmer. Packages make sense to me. Namespaces mostly make sense to me... As far as I can tell, there's no super-huge difference.

IcePotato
Dec 29, 2003

There was nothing to fear
Nothing to fear

Pfhreak posted:

I believe the class is Vector2, not Vector2D. ;)

welp, i'm going to go kill myself now. thanks.

I'm making a bare-bones RTS game for an independent study and just now starting to get to the meat of it. This is by far the hardest poo poo I've ever done, but i'm loving it. I just hit roadblocks about once a day and get ultra-frustrated and quit, then pick it up the next morning.

IcePotato
Dec 29, 2003

There was nothing to fear
Nothing to fear
Latest frustration: Implementing the A* algorithm (great page!), and I just found out .net doesn't have a BinaryTree implementation in the library, balanced or unbalanced. Or a heap implementation. Or basically anything that would be really sweet to have with an A* algorithm. Argh. Any advice?

e: Oh, never mind because I just found http://www.codeguru.com/csharp/csharp/cs_misc/designtechniques/article.php/c12527/

IcePotato fucked around with this message at 19:27 on Mar 1, 2008

IcePotato
Dec 29, 2003

There was nothing to fear
Nothing to fear
This might be a really simple question, but I'm having a giant brainfart.
Using XNA: My levels have a time limit. I'd like to display remaining time left on-screen, but only in seconds. I initialize my 'timer' variable to the map's timeLimit variable, but
code:
timer -= gameTime.ElapsedRealTime.Seconds;
doesn't work, because that's the elapsed time between steps.
code:
timer -= gameTime.TotalRealTime.Seconds;
similarly doesn't work because it subtracts the entire amount of time elapsed, so it starts off going down fast and the rate at which it decreases is constantly increasing.
What's the logic I need here?

IcePotato
Dec 29, 2003

There was nothing to fear
Nothing to fear

stromdotcom posted:

Why doesn't that work, isn't that what you want? I'm assuming you want to update the timer whenever Update is called, and subtract off the elapsed time since the last time update was called. You'll get that from gameTime.elapsedGameTime.

[edit] Ah I see. Yes, you want elapsedGameTime, not elapsedRealTime.

thanks - I didn't really understand the difference. Ended up fixing it by taking the value of the map's timer, multiplying by 1000 to get milliseconds, and subtracting the value of elapsedGameTime in milliseconds. Then when I draw my time, I just divide timer by 1000 to go back to seconds.

IcePotato
Dec 29, 2003

There was nothing to fear
Nothing to fear
god drat I am so bad at basic math. I'm trying to calculate the path of a bullet in my top-down strategy game - basically I want to draw the bullet moving at a specific speed until it hits something.
code:
location = new Vector2(orgin.X, orgin.Y);
slope = new Vector2((destination.X - orgin.X),(destination.Y - orgin.Y));

public Vector2 path(GameTime gameTime)
        {
            location += slope / (spd * (float)gameTime.ElapsedGameTime.TotalSeconds);
            return new Vector2((int)location.X, (int)location.Y);
        }
This is wrong - all my bullets appear in the top-left and don't really do much. I have no idea how to fix this because I didn't retain anything from high school math :(

IcePotato
Dec 29, 2003

There was nothing to fear
Nothing to fear

HB posted:

totalSeconds is not the time of that frame, it's the total time elapsed since your game was launched. You have to calculate the frame time by storing the elapsed time from the last frame and finding the difference.

at some point I am going to stop and wonder how many times I will make the same loving mistake. Unfortunately I don't have time for that now because I need to completely refactor my engine - all of my rookie, this-is-my-first-game mistakes have piled up to the point that I feel better just redoing almost everything. :sigh:
Well, at least I'll have a lot of good material for my end-of-semester report.

e: wait, no. I might've gotten this part right - According to the doc, ElapsedGameTime is the amount of time since the last frame, .TotalSeconds just gives me a double with the fractional number of seconds, as opposed to .Seconds, which only gives an int containing whole seconds

IcePotato fucked around with this message at 16:39 on Mar 24, 2008

IcePotato
Dec 29, 2003

There was nothing to fear
Nothing to fear

Drx Capio posted:

In his case, velocity is a scalar, so he needs to use the direction (slope in this case) as well. It's just a case of dividing where he needs to multiply, as far as I can tell.

Thanks guys. Unfortunately while waiting for an answer I decided to do some more work on my main loop and broke the display code, so I can't tell if it works or not anymore :downs:

IcePotato
Dec 29, 2003

There was nothing to fear
Nothing to fear

Femtosecond posted:

I really want to get off my rear end and start programming some games, but I'm so conflicted about whether I want to A) get something up and running quickly and easily via XNA or B) go the more complex route and do something that I can later port to (or develop on) both platforms.

Start simple. Trust me on this one. Use XNA, make a really simple 2d platforming game or whatever, and make lots of mistakes.

IcePotato
Dec 29, 2003

There was nothing to fear
Nothing to fear
I have to present my independent study (XNA rts game) tommorrow, and I need some help cleaning it up. Anyone going to be around on AIM or IRC later tonight? I'm kind of bad at math things, which is where I need to make it look nice - mostly loop timing stuff.

IcePotato
Dec 29, 2003

There was nothing to fear
Nothing to fear

Ferg posted:

This is the least productive response ever to your question, but would you be able to put your game up for download somewhere when you're finished? I'd be really interested to see what RTS somebody was able to make in XNA.

Yeah, I'll do that along with my writeup of how NOT to make your first game. It's ... kind of neat. But mostly unfinished, unpolished, and very dumb looking. It'd be awesome if someone ended up extending it though. Not sure if it would be worth the effort, but definitely awesome!
I have to give a presentation on it tomorrow to like the entire department. I think it's going to be 90% powerpoint, and 10% "this is my actual game and what it does" :)

also irc helped me

IcePotato
Dec 29, 2003

There was nothing to fear
Nothing to fear
Okay, last question ever, I swear.
http://pastebin.org/33242
The first unit to move sucks up all the time and moves super-fast. Everyone else moves slowly. I am not sure how to fix this.

IcePotato
Dec 29, 2003

There was nothing to fear
Nothing to fear

Star Warrior X posted:

http://pastebin.org/33353
Move the copy of the time into the loop, because GameTime is a reference type, which means that you are passing a reference to the time variable in the update function to the move function.
Look up reference types and value types, they are kind of important.

oh son of a bitch. I swear to god I've been studying this stuff for three years and this still completely slipped my mind. thanks man.

Adbot
ADBOT LOVES YOU

IcePotato
Dec 29, 2003

There was nothing to fear
Nothing to fear

Sigvatr posted:

If anyone is looking for a game artist, then I can help. I have a portfolio of stuff here: http://sigvatr.com/portfolio/

Email me at me@sigvatr.com if you are interested.

Ohh, that's nice stuff. And it reminds me - we should do another gamedev competition soon.. Even though my summer is going to be full up with the sweet internship I got. I think I learned my attention span for large-scale independent projects is like exactly 3 weeks.

  • 1
  • 2
  • 3
  • 4
  • 5
  • Post
  • Reply