Programming C, C++, Java, PHP, Ruby, Turing, VB
Computer Science Canada 
Programming C, C++, Java, PHP, Ruby, Turing, VB  

Username:   Password: 
 RegisterRegister   
 How to make a 2d game.
Index -> Programming, Turing -> Turing Tutorials
View previous topic Printable versionDownload TopicRate TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
gafiga




PostPosted: Thu Jun 19, 2008 5:31 pm   Post subject: How to make a 2d game.

Hey, i had some extra time and thought i would make a game Tutorial.
this tutorial is for people who know the basic Turing commands.
it includes:
-basic movement
-health bars
-warp pads
-HP boxes

this is my first tutorial so if theres anything i could work more on just let me know.



Tutorial.zip
 Description:
This is it. not the best but you should get an idea of how to make a game.

Download
 Filename:  Tutorial.zip
 Filesize:  18.94 KB
 Downloaded:  3779 Time(s)

Sponsor
Sponsor
Sponsor
sponsor
andrew.




PostPosted: Mon Jul 21, 2008 7:31 pm   Post subject: RE:How to make a 2d game.

Did you get this checked out by Tony or one of those guys? I think you have to do that with any tutorial.

Also, if you are making a tutorial, you should make one that doesn't use whatdotcolour. That is a crappy and inefficient way of collision detection. You may also want to add barriers because my guy walked out the screen and I couldn't come back. Also, I know this is for beginners only, but I think you should show how to read and write from a file so that you can create as many maps as you want. So, each map will have a text file that goes with it describing platforms, danger areas, jumpads, etc.

It's pretty decent though. Just make sure you change the whatdotcolour and get it checked out by one of the mods.
Tony




PostPosted: Mon Jul 21, 2008 7:41 pm   Post subject: RE:How to make a 2d game.

The explicit moderator involvement is only required to have something included into the Turing Walkthough. At least for now.
Latest from compsci.ca/blog: Tony's programming blog. DWITE - a programming contest.
andrew.




PostPosted: Tue Jul 22, 2008 5:36 pm   Post subject: RE:How to make a 2d game.

Oh, I thought you had to get everything checked out before posting here.
amaranth18




PostPosted: Tue Jan 12, 2010 9:13 am   Post subject: RE:How to make a 2d game.

Hey I just read your tutorial and i found it extremely helpful. I was wondering though, if there was any way to get enemies and to make the screen bigger? I want to make a mario typed game based off your code (which i will cite), but I need to add enemies and maybe make it a larger screen. If you can help then it would be much appreciated.

Cheers,

Amaranth18
0isin




PostPosted: Wed Jan 13, 2010 2:25 pm   Post subject: Re: RE:How to make a 2d game.

amaranth18 @ Tue Jan 12, 2010 9:13 am wrote:
Hey I just read your tutorial and i found it extremely helpful. I was wondering though, if there was any way to get enemies and to make the screen bigger? I want to make a mario typed game based off your code (which i will cite), but I need to add enemies and maybe make it a larger screen. If you can help then it would be much appreciated.

Cheers,

Amaranth18


To make the screen, near the top, you should put this into turing.

setscreen ("graphics:800;600,nobuttonbar")

this is to "set" the screen. 800 is how many pixels wide, and 600 is how many high. The no button bar line is so that the "save, new, whatever" button bar isn't there.

Hope this helped.
feebas200




PostPosted: Sat Apr 09, 2011 2:23 pm   Post subject: RE:How to make a 2d game.

Nice tut, what's the other way for collision detection? What if I wanted to make a maze? What should I use for collision of all walls? Thanks in advance.
apython1992




PostPosted: Sat Apr 09, 2011 2:33 pm   Post subject: RE:How to make a 2d game.

I think tile-based collision detection would be the best way for something like a maze. It could be as simple as having your grid mapped out as such:

1 1 1 1 1 1 1 1 1 1 1 1
1 0 0 0 0 0 0 0 0 0 0 0
1 1 1 1 0 0 0 1 1 1 1 1
1 1 1 1 0 1 0 1 1 1 1 1
1 1 1 1 0 1 0 1 1 1 1 1
1 1 1 1 0 1 0 1 1 1 1 1
1 1 1 1 0 1 0 1 1 1 1 1
0 0 0 0 0 1 1 1 1 1 1 1
1 1 1 1 0 0 0 0 0 0 0 1
1 1 1 1 1 1 1 1 1 1 1 1

Where a 1 is a barrier/wall. Now that is the crappiest maze ever, but for the purpose of illustration I think that would be your way to go.
Sponsor
Sponsor
Sponsor
sponsor
feebas200




PostPosted: Sat Apr 09, 2011 3:27 pm   Post subject: RE:How to make a 2d game.

is there a tutorial for it? I'm not that experienced yet.
apython1992




PostPosted: Sat Apr 09, 2011 4:16 pm   Post subject: RE:How to make a 2d game.

http://compsci.ca/v3/viewtopic.php?t=15927
feebas200




PostPosted: Sat Apr 09, 2011 4:55 pm   Post subject: RE:How to make a 2d game.

thanks, but isn't it difficult to draw a difficult maze with 1 and 0's manually. It seemed kind of easier by using an image of a maze and dotclour.
apython1992




PostPosted: Sat Apr 09, 2011 10:54 pm   Post subject: RE:How to make a 2d game.

If you plan on using an already-made maze, you could use colours initially to store the map in a format better suited to collision detection, like the one I showed you before.

Pseudocode:
code:

if pixel.color == {whatever colour acts as the boundary} then
    gridNode = 1
else
   gridNode = 0
Display posts from previous:   
   Index -> Programming, Turing -> Turing Tutorials
View previous topic Tell A FriendPrintable versionDownload TopicRate TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 1 of 1  [ 12 Posts ]
Jump to:   


Style:  
Search: