• Welcome to Smashboards, the world's largest Super Smash Brothers community! Over 250,000 Smash Bros. fans from around the world have come to discuss these great games in over 19 million posts!

    You are currently viewing our boards as a visitor. Click here to sign up right now and start on your path in the Smash community!

Planning and coding my first game

Jazriel

Smash Ace
Joined
Sep 23, 2006
Messages
838
Location
Belleville, ON
I've decided to use my basic familiarity with programming to both expand it and to make a game.

I know almost nothing about XNA other than it being an "easy" way to "make" games, and having games already there etc. I dabbled a bit with XNA a while ago but that was an old beta version.

I am familiar with (and prefer) C++.
I barely know (and don't like) Java.
I barely know (and like) Python.
I know all the programming basics (loops, structure, functions, arrays, bubble-sort, etc) up to OOP.
I understand the ideas behind OOP's classes and objects, but I don't know how to actually program them/implement them.


I want to know, what would be a good, simple, reliable way to learn to make a very simple game (well, it's not that simple but it's no 3D FPS).

My understanding is that I should use XNA:GSE. Is XNA:GSE: a good idea? Is it reliable? Simple to setup and to remove?


Thanks for the replies and help. I'm a really good programmer (top of my class by far) but I don't know how to get started on making my game other than creating the general outline and writing some rough pseudo-code.

I was thinking of doing it in ASCII first (it's a simple game, think of the back and forth of Pong but the usage and spawning of objects like Tetris) but I think it would just be best if I headed in a direction of using GUI and actual art for the program.




Slightly off-topic:
How does keyboard input work? I'm assuming that XNA will function at 60 frames per second, and I want to have frame perfect commands in my game, so how does the game recognize if I'm holding say 2 buttons down at once? Or if I held 'A' before I held 'B' down, how does the computer determine that in the span of 1 frame?
 

AltF4

BRoomer
BRoomer
Joined
Dec 13, 2005
Messages
5,042
Location
2.412 – 2.462 GHz
For questions specifically relating to XNA, you might want to try here.

I think you'll find that even trivial games can be very difficult coding tasks. Certainly not one done by a single person. You know those crappy games that you see in sleeves being sold for $9.99? Even those took a team of people at least a couple months to do.

But that doesn't mean it won't be good practice as long as you know what you're getting into. Just use it as a learning experience.

Any general coding questions are algorithmic stuff I (and others likely, too) can answer here.
 

Goldberg

Smash Apprentice
Joined
Mar 20, 2008
Messages
194
OOP might feel like a very different aproach to programming, as opposed to the "structured programming" of C, but it is the only way to (in general) keep your programs well organized, you can try dividing your programs variables on structures, to adopt the way classes are defined, please do ask anything that gives you trouble,.

I have never tried making a graphic game, the closest was a "Guess a number between 1 and 20" written on Assembler, so I might not be really useful on that aspect.
 

Jazriel

Smash Ace
Joined
Sep 23, 2006
Messages
838
Location
Belleville, ON
Thanks for the forum link AltF4Warrior, I'll send all my XNA queries in their general direction.

As for my keyboard input question, I would like an answer.

My confusion is this: What is the logic behind making the computer accept, understand, and compute, multiple inputs in the span of one frame? Or the timings of said multiple inputs?

If I press and hold 'A', then press 'B', then release 'A', how does the computer know that 'A' was pressed, and then held first, and then 'B' was pressed while 'A' was being held?
 

DOWSER

Smash Rookie
Joined
May 6, 2008
Messages
23
Programming a game would be totally cool but extremely difficult. I know some programming too but don't you have to be really good at graphic design for videogames?
 

Goldberg

Smash Apprentice
Joined
Mar 20, 2008
Messages
194
It involves many different aspects, just planning the game, the rules, coding everything, gathering visual and audio material and splicing eveything.

I'm currently researching on the keyboard input issue, I can't come up with a way to make both the loop(wich can be replaced with the real-time game) and the input work at the same time.
 

Jazriel

Smash Ace
Joined
Sep 23, 2006
Messages
838
Location
Belleville, ON
DOWSER: The visual portion of programming can be extremely difficult from what I understand, but my game is very simple in terms of menus/gameplay/and visuals. It's very basic 2D, with a health bar.

Goldberg: I think that the way to do it is instead of having an array handle all possible inputs and go from there (like I've seen it before), it would need an array for every potential input (11 buttons on 360 controller?), and the cycle to fill the array would take up most of the processing speed (most of it's wasted anyways with small programs). Then while it goes through the loops for that, while a button isn't pressed it would input null into the array.

So it would look like this:

[] [] [] [] [] [] [] [] [] [] [] [] is your array.

The array for A would look like this:

[] [] [] [] [] [X] [X] [X] [X] [X] [X] [X] Where X's are when the button is held down.

The array for B would look like this:

[X] [X] [X] [X] [X] [X] [X] [X] [X] [X] [X] [X]

Then it would just compare the two, and figure out what happened during that frame. It would see B as being held down, and then A being pressed.


Conceptually, this would be good for my game (I'm making the most technical fighting game ever conceived, which is why I need frame perfect inputs) as it would create a bias for the simpler/first on the list buttons.
 

the_dannobot

Smash Rookie
Joined
May 11, 2006
Messages
18
Location
Austin
Well, like there are two types of input: immediate and buffered. In directx for keyboard immediate mode when you are going through the game loop every frame you call a function and it fills an array of roughly size 104 with the status of each key on the keyboard (since directx interfaces straight to the hardware it's super fast).

So like if your game is played on wasd and you want to check the 'w' key you say something like:
if (m_keyboard[w])
or whatever.
If you need to check if 'w' was hit for the first time this frame, you could have another array that keeps track of which keys are currently held down. That way, if the w entry on the keyboard is true and the w entry in the "held keys" array is false, the w key was just pressed this frame.

cheers!
 

Jazriel

Smash Ace
Joined
Sep 23, 2006
Messages
838
Location
Belleville, ON
That's interesting. But does this make determining inputs in one frame impossible? Is the absolute minimum time for determining inputs and in what order they've been held 2 frames?

The game I'm hoping to make, will be extremely technical. It's a weird hybrid type thing fighting game, and I want it to be the most technical game ever conceived, which is why I want to know if I can make it so that a command can theoretically be entered every frame, or will I have to wait 2 frames?
 

Mew2King

King of the Mews
Joined
Jul 18, 2002
Messages
11,263
Location
Cinnaminson (southwest NJ 5 min drive from Philly)
so guys I have a question

I love video games more than anything else, but I haven't learned anything about graphics design or programming or anything yet really; but I can't see myself in the future doing anything besides video games, whether it be playing them or making them.

While video game testing might be really easy for me, I know it doesn't make much so that's like a last resort thing I would consider.

I really just wanna know what you guys recommend me do, because I don't know what I should do in my future, and I'm already 19 so I need to decide fast. Is there anything anyone recommends to help, like a website or something I can get a head start in having some understanding of what to do before college (which I need to start when summer ends). Anything that could help, I feel like I've just been wasting time but I don't want to waste time.. I can't be wasting time anymore.
 

Goldberg

Smash Apprentice
Joined
Mar 20, 2008
Messages
194
http://www.igda.org/

Take your time to learn from the different aspects that relate to videogames as a profession and a form of art.

Programming is something I never expected to like so much, even though I entered college without knowing anything about it.
 

snoblo

Smash Journeyman
Joined
Jul 25, 2007
Messages
361
so guys I have a question

I love video games more than anything else, but I haven't learned anything about graphics design or programming or anything yet really; but I can't see myself in the future doing anything besides video games, whether it be playing them or making them.

While video game testing might be really easy for me, I know it doesn't make much so that's like a last resort thing I would consider.

I really just wanna know what you guys recommend me do, because I don't know what I should do in my future, and I'm already 19 so I need to decide fast. Is there anything anyone recommends to help, like a website or something I can get a head start in having some understanding of what to do before college (which I need to start when summer ends). Anything that could help, I feel like I've just been wasting time but I don't want to waste time.. I can't be wasting time anymore.
From what I've heard, game testing takes the fun out of videogaming and is very tedious and boring.
if you're interested in programming, you can see if any local schools/colleges offer summer programs in which you can take classes. That's how I got into programming.
You can also try to find some books from a local library or search for some stuff on the internet, but from my experience, real-life classes are much easier to learn from.
I don't know much about graphic design, but I think the same thing applies here also.
 

Jazriel

Smash Ace
Joined
Sep 23, 2006
Messages
838
Location
Belleville, ON
so guys I have a question

I love video games more than anything else, but I haven't learned anything about graphics design or programming or anything yet really; but I can't see myself in the future doing anything besides video games, whether it be playing them or making them.

While video game testing might be really easy for me, I know it doesn't make much so that's like a last resort thing I would consider.

I really just wanna know what you guys recommend me do, because I don't know what I should do in my future, and I'm already 19 so I need to decide fast. Is there anything anyone recommends to help, like a website or something I can get a head start in having some understanding of what to do before college (which I need to start when summer ends). Anything that could help, I feel like I've just been wasting time but I don't want to waste time.. I can't be wasting time anymore.
No offense M2K, but I have to laugh. I've been told that you're extremely nerdy and stereotypical, but you can't even program. Reality ftw.


Joking aside, honestly, don't look into video-game testing. I did a research project on it (every kids dream right? Wrong... So wrong...) and it's a nightmare.

Video game testing:
-Minimum wage
-Boring
-Boring
-Boring
-Repetitive
-Repetitive
-Repetitive

If you have OCD for being thorough and methodical, then video game testing is for you.


Think of it like this:

You know that FPS you really like? With all the weapons and cool levels and graphics? Well imagine being ordered to go through the first level over and over and over and over and over again, using every weapon, hitting every wall, with every weapon. Think of killing every enemy in every way possible, at every different moment possible. Think of sitting there, for hours, just running. Back and forth, checking for things.

Then, imagine the reports you write. Halo 3, had over 200,000 bugs (I think, 200k or 20k or something) that had to be discovered, analyzed, diagnosed, and debugged. After you "fix" it, you have to test that the bug is actually gone and that no new bugs have occurred.

So yeah, video game testing most likely isn't for you :p


Anyways... Honestly, online tutorials are nice and everything, but try to find classes, or something with direct contact. I never learned what a For loop did, until my teacher off-handedly told me it's a loop that executes a pre-designated amount of times.

It seems simple, but understanding how to apply programming concepts and the like really need to be taught first hand (in my experience at least). I've read over classes and OOP quite a few times, and I'm only now just getting it (after talking to my teacher about it).

Other than that, I have no idea. Look into taking computer science courses (obviously) at college/university. It'll be hard if you have no previous experience, but it's a start.
 

the_dannobot

Smash Rookie
Joined
May 11, 2006
Messages
18
Location
Austin
That's interesting. But does this make determining inputs in one frame impossible? Is the absolute minimum time for determining inputs and in what order they've been held 2 frames?

The game I'm hoping to make, will be extremely technical. It's a weird hybrid type thing fighting game, and I want it to be the most technical game ever conceived, which is why I want to know if I can make it so that a command can theoretically be entered every frame, or will I have to wait 2 frames?
Naw dude, you can detect input strings in one frame, but it depends on the type of input string though.

You won't be able to determine like quarter-circles in one frame, because the input needs to be in a certain order. (i don't think you'd want to anyways, nobody can do qcf+p in one frame)

You could easily do like smash-style moves though, where all the specials are command normals. All you have to do is when you are going through checking for attacks every frame, if the player hit an attack button check if a direction is being held down too.

cheers!
 

Bedi Vegeta

Smash Master
Joined
Apr 7, 2002
Messages
4,668
Joking aside, honestly, don't look into video-game testing. I did a research project on it (every kids dream right? Wrong... So wrong...) and it's a nightmare.
I'm currently a character animator at a game studio, and as well as having the QA department, most people in the project team test our game on our own machines from time to time (it's the thing you do when you don't have any real work to do, but want to look like you're still working :p), and I gotta say, I quite enjoy the whole testing part of it, and have quite a good critical eye for it. But maybe that's just me.

Mew2King, I would definitely recommend getting into game testing, sure it doesn't pay too well, but it's a foot in the door, and it will give you more of an idea of the development pipeline. From there, if you have no art or coding skills, you might be able to still get into a Design or Level Design position, although some general knowledge of art or code is usually helpful. One of the junior designers on my project actually came from the QA department, so there's definitely an opportunity to move up. As well as trying for a degree in code or design or animation or something like that, start signing up for some public Beta testing for games, and get involved in the modding community.
 

Ørion

Smash Ace
Joined
Mar 19, 2008
Messages
858
Location
Probably in front of his Wii
so guys I have a question

I love video games more than anything else, but I haven't learned anything about graphics design or programming or anything yet really; but I can't see myself in the future doing anything besides video games, whether it be playing them or making them.

While video game testing might be really easy for me, I know it doesn't make much so that's like a last resort thing I would consider.

I really just wanna know what you guys recommend me do, because I don't know what I should do in my future, and I'm already 19 so I need to decide fast. Is there anything anyone recommends to help, like a website or something I can get a head start in having some understanding of what to do before college (which I need to start when summer ends). Anything that could help, I feel like I've just been wasting time but I don't want to waste time.. I can't be wasting time anymore.
Like many have said, I would start with a book at your local library/bookstore. For a first language, a type of Basic such as Visual Basic might be good, you can learn basics from that and then progress to something more game-realistic such as C++. After you have a good grounding in C++/Java, you could turn to graphics in the form of Directx or opengl depending what you want to make the games for. You should be able to find books on this at any barnes and noble or borders or I'm sure you could find good tutorials on google.
 
Top Bottom