Old 05-28-2009, 01:57 PM   #1 (permalink)
Zuner
 
AFlakjuju's Avatar
 
Join Date: Nov 2008
Location: Ohio
Posts: 93
AFlakjuju is on a distinguished road
Arrow Please help me.

hey, whats up everybody. yea u guys probably haven't seen me log in for awhile. I need serious help with coding. maybe i just don't get programming or something. I'm really good with html code but when it comes to Arrays and stuff, Its pointless for me. i need help creating a game. maybe if somebody could walk me through learning the code i would really appreciate it.
I already know how to import a sprite and draw them in the game code.
It's a side view game btw.

What i need to do:
Create Collision Detection.
Create Events.

I think thats it for now.

Please Help me.

Trevor,

Last edited by AFlakjuju; 06-02-2009 at 04:59 PM.



AFlakjuju is offline   Reply With Quote

Advertisement [Remove Advertisement]
Old 05-29-2009, 08:49 AM   #2 (permalink)
Zuner
 
badmoodguy88's Avatar
 
Join Date: Jun 2008
Posts: 72
badmoodguy88 is on a distinguished road
Default

3 things
First
Look at similar SIMPLE (or at least short) open source games.
The index card game would be ideal for this. As it IS basically a slide show.
http://www.zuneboards.com/forums/ope...rds-1-0-a.html
I also learned a lot from this. It shows you how to play a simple sound clip and also some arrays.
http://www.zuneboards.com/forums/ope...metronome.html
This is another short program that might help.
http://www.zuneboards.com/forums/ope...ician-4-a.html

For tile based stuff...
This is a tile based game.
http://www.zuneboards.com/forums/dow...power-ups.html
And so is this.
http://www.zuneboards.com/forums/dow...-3-0-zune.html
But they are both a lot more complicated.
Second
This tutorial really is great. It probably starts at more basic skill level than you need but it definitely finishes at a higher level of skill (I say this from reading what you posted). Plus they go through collision detection.
XNA Creators Club Online - beginner's guide 2d: chapter 1 - introducing the 2d tutorial
Third
Do post questions. There are topics about arrays and how to create Create Collision Detection but that is not always enough for it to click. Arrays were a little tricky for me.

an array would look like
Code:
int[] NameOfArray = { 0, 4, -2, 1, 0};
there are 5 numbers in this array. Think of them being in 'slots' from 0 to 4. So 0, 1, 2, 3, 4.
Starting with the number 0 is just the way they are numbered in most languages. The explanation for why is in the wiki article on arrays but it is not really worth knowing.

Now when you use the array it would look like this.
Code:
NameOfArray[0] 
//or
NameOfArray[SomeOtherVariable]
//or 
NameOfArray[3]
//but not
NameOfArray[5]
becuse 5 is the sixth number when you count from 0 to 5 and that is more numbers than were put in that array.

what the arrays are really saying is
if the number in the brackets of the array is 0 then the array is equal to the number in the first space of the array { 0, 4, -2, 1, 0}; which happens to be 0. If the number in the brackets of the array called NameOfArray is 1 then the array is equal to 4.

Code:
if (NameOfArray[SomeVariable] < 1)
{
      //some stuff happens
      SomeVariable == 1
}
//in the above the if statement will be true if SomeVariable equals 0 , 2, or 4 because those numbers correspond to 0, -2, and 0 in the array.
by then setting the variable called SomeVariable to 1 the array will now be equal to 4 and the if statement will be false again.


But don't give up or think you can't do this.
The Tracker program I made is proof of what you can do (and cant do)
if you just jump right in. The code is an overly long and complicated mess (what a mess) but I really had no knowledge of any programing language when I started. AT ALL. What so ever. I did not even start with a hello world. I just watched that tutorial, and saw some examples of how to do certain specific things and then expanded upon it.

Last edited by badmoodguy88; 05-29-2009 at 09:05 AM.



badmoodguy88 is offline   Reply With Quote
Old 05-29-2009, 12:48 PM   #3 (permalink)
lost in paradise with rae
Support Team
Moderator
Expert Zuner
 
Red Sky's Avatar
 
Join Date: Nov 2007
Location: Pennsylvania
Posts: 2,660
Red Sky is just really niceRed Sky is just really niceRed Sky is just really nice
Send a message via MSN to Red Sky
Default

Why not check out Nick Gravelyn's tite tutorial series for the Tile Engine? It's very well put together, and you'll certainly learn a thing or two from it!





Red Sky is offline   Reply With Quote
Old 05-29-2009, 12:57 PM   #4 (permalink)
Zuner
 
AFlakjuju's Avatar
 
Join Date: Nov 2008
Location: Ohio
Posts: 93
AFlakjuju is on a distinguished road
Default

thanks for all your replies everybody. yea, i downloaded a couple of his tutorials but there for xna 2.0. not 3.0. I'm making the game for pc if anybody wanted to know. badmoodguy88, could you give me some more information about xna, i just hate downloading videos. i prefer reading tutorials then watching them. like just the basic stuff like; How to make a sprite move, How to make a sprite change to a different animation when they move it, how to make a sprite jump, how to make a sprite shoot. stuff like that.

Thanks For the Help So Far,
Trevor,



AFlakjuju is offline   Reply With Quote
Old 05-29-2009, 01:31 PM   #5 (permalink)
lost in paradise with rae
Support Team
Moderator
Expert Zuner
 
Red Sky's Avatar
 
Join Date: Nov 2007
Location: Pennsylvania
Posts: 2,660
Red Sky is just really niceRed Sky is just really niceRed Sky is just really nice
Send a message via MSN to Red Sky
Default

they upgrade flawlessly to xna 3.0. the proper method to make a tile engine doesn't change over the course of a program version (or should I say API, or library?)

Check out sites like xnadevelopment.com There's some great stuff there for beginners. Or google reimers xna





Red Sky is offline   Reply With Quote
Old 06-02-2009, 05:04 PM   #6 (permalink)
Zuner
 
AFlakjuju's Avatar
 
Join Date: Nov 2008
Location: Ohio
Posts: 93
AFlakjuju is on a distinguished road
Default

Guess what everybody? i got the player movement and tile engine to work!
I can't get collision detection to work though :\
and also I'm working on jumping so is there a way that if the user presses a button for jump it goes up for about 1 seconds then it descends its way down to the ground? thanks.



AFlakjuju is offline   Reply With Quote
Reply

Bookmarks

Thread Tools