Author |
Message |
gafiga
|
Posted: 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.
Description: |
This is it. not the best but you should get an idea of how to make a game. |
|
![](http://compsci.ca/v3/pafiledb/images/icons/clip.gif) Download |
Filename: |
Tutorial.zip |
Filesize: |
18.94 KB |
Downloaded: |
3944 Time(s) |
|
|
|
|
|
![](images/spacer.gif) |
Sponsor Sponsor
![Sponsor Sponsor](templates/subSilver/images/ranks/stars_rank5.gif)
|
|
![](images/spacer.gif) |
andrew.
|
Posted: 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.
|
|
|
|
|
![](images/spacer.gif) |
Tony
![](http://wiki.compsci.ca/images/f/f4/OniTony.gif)
|
Posted: 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.
|
Tony's programming blog. DWITE - a programming contest. |
|
|
|
![](images/spacer.gif) |
andrew.
|
Posted: 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.
|
|
|
|
|
![](images/spacer.gif) |
amaranth18
|
Posted: 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
|
|
|
|
|
![](images/spacer.gif) |
0isin
|
Posted: 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.
|
|
|
|
|
![](images/spacer.gif) |
feebas200
|
Posted: 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.
|
|
|
|
|
![](images/spacer.gif) |
apython1992
![](http://compsci.ca/v3/uploads/user_avatars/17001640684d87a16bb8fbb.jpg)
|
Posted: 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.
|
|
|
|
|
![](images/spacer.gif) |
Sponsor Sponsor
![Sponsor Sponsor](templates/subSilver/images/ranks/stars_rank5.gif)
|
|
![](images/spacer.gif) |
feebas200
|
Posted: 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.
|
|
|
|
|
![](images/spacer.gif) |
apython1992
![](http://compsci.ca/v3/uploads/user_avatars/17001640684d87a16bb8fbb.jpg)
|
|
|
|
![](images/spacer.gif) |
feebas200
|
Posted: 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.
|
|
|
|
|
![](images/spacer.gif) |
apython1992
![](http://compsci.ca/v3/uploads/user_avatars/17001640684d87a16bb8fbb.jpg)
|
Posted: 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
|
|
|
|
|
|
![](images/spacer.gif) |
|