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

Username:   Password: 
 RegisterRegister   
 How can I make this a playable game?
Index -> Programming, Turing -> Turing Help
Goto page 1, 2  Next
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
DaveAngus




PostPosted: Wed Mar 19, 2008 8:31 am   Post subject: How can I make this a playable game?

Ok so,
This is a simple "backdrop" for a part of a game that I would like to create.
I know the code may be so far from how you would do it but I am very new (1 week) into ever programming.
I would like to know how to put a character (no specific character) into the game
and then make it able to move around in the level and jump onto the different objects.
After I can figure out how to do that I can expand onto this.
That is the only reason as to why its just a small little nothing level right now
If you could help me that would be great!!!
Thanks a lot!


code:

/*
 Name : Dave Angus
 Date of start : March 19th 2008
 Date of Completion :
 Description: This is the back drop for what will me a 'Mario' type game
 */

setscreen ("graphics")

/*
 Background of blue sky and green grass/floor
 */

drawfillbox (0, 50, 650, 800 div 2, 11) %sky
drawfillbox (0, 0, 650, 150 div 2, 2) %Grass
drawfilloval (20, 375, 35, 35, yellow) %sun
/*
 Clouds
 Left to right
 */
drawfilloval (5, 415, 40, 40, white)
drawfilloval (70, 415, 40, 40, white)
drawfilloval (265, 415, 40, 40, white)
drawfilloval (135, 415, 40, 40, white)
drawfilloval (200, 415, 40, 40, white)
drawfilloval (265, 415, 40, 40, white)
drawfilloval (330, 415, 40, 40, white)
drawfilloval (395, 415, 40, 40, white)
drawfilloval (460, 415, 40, 40, white)
drawfilloval (525, 415, 40, 40, white)
drawfilloval (590, 415, 40, 40, white)
drawfilloval (655, 415, 40, 40, white)


/*
 These are the platforms that 'Mario' can jump on
 */

drawfillbox (325, 175, 400, 200, brown)
drawfillbox (120, 275, 200, 300, brown)





And also,
To the people that hate that I have posted a lot,
I'm sorry but get over it.
I am just trying to better myself in turing
because im very new at it.
So get over yourself.
Sorry to be rude but I have gotten to much hate male because I made 3 posts
of assignments I want to better.
Sponsor
Sponsor
Sponsor
sponsor
Zampano




PostPosted: Wed Mar 19, 2008 10:13 am   Post subject: Re: How can I make this a playable game?

Right, you're going to want to look at the 'How to Jump' tutorial which should tell you how these things generally occur. You should apply the lesson from that article to how physics should work in you game world (mind you, that doesn't mean just copying the code as some have done). Think how the character should react when colliding with any solid object in your game, and code the reaction approporiately. As for now, this program is just a picture.

Also, please check out my latest post:
http://compsci.ca/v3/viewtopic.php?p=156661#156661
Sean




PostPosted: Wed Mar 19, 2008 11:18 am   Post subject: RE:How can I make this a playable game?

Alright, you'll need to look up Input.KeyDown for character movement. This can be used on created sprites, or pictures.

Your character can be any pre-defined shape given by Turing, or a picture that you have created, and made into the sprite.

For platform detection, you'll want collision of your character x and y positions to check against the platforms x and y positions.
Token




PostPosted: Wed Mar 19, 2008 1:07 pm   Post subject: Re: How can I make this a playable game?

You also might want to look into something like this for the clouds to simplify your code

code:
for i : 5 .. maxx+60 by 60
    drawfilloval (i, 415, 40, 40, white)
end for


check the documentation for for loops
and maxx just returns the width of the screen
Insectoid




PostPosted: Wed Mar 26, 2008 5:19 pm   Post subject: RE:How can I make this a playable game?

1 week in and you already know how to draw pictures? I've been doing it for 3 and we haven't done looping yet (although I know how)
Of course, your teacher probably teaches his stuff in a different order, in which case you are very far from creating a game.

Well, except a text-based game.

...and I know how to make shapes, just not how to accurately place them.
DaveAngus




PostPosted: Tue Apr 01, 2008 9:21 am   Post subject: Re: RE:How can I make this a playable game?

insectoid @ Wed Mar 26, 2008 5:19 pm wrote:
1 week in and you already know how to draw pictures? I've been doing it for 3 and we haven't done looping yet (although I know how)
Of course, your teacher probably teaches his stuff in a different order, in which case you are very far from creating a game.

Well, except a text-based game.

...and I know how to make shapes, just not how to accurately place them.


haha its not my teacher teching me this.
I am doing it all on my own.
That is the reason why I am using this site because I need to learn more about making games on my own.
THanks a lot
and I hope all goes well with your class!
If you ever need any help,
we should work on things together to feed off of eachothers strengths.
Take care,
-Dave
DaveAngus




PostPosted: Tue Apr 01, 2008 9:22 am   Post subject: Re: How can I make this a playable game?

Token @ Wed Mar 19, 2008 1:07 pm wrote:
You also might want to look into something like this for the clouds to simplify your code

code:
for i : 5 .. maxx+60 by 60
    drawfilloval (i, 415, 40, 40, white)
end for


check the documentation for for loops
and maxx just returns the width of the screen



Thank you very much for the help token!
Doug101




PostPosted: Tue Apr 01, 2008 10:39 am   Post subject: Re: How can I make this a playable game?

just add a character and input arrow key commands to move him.
Sponsor
Sponsor
Sponsor
sponsor
DaveAngus




PostPosted: Wed Apr 02, 2008 10:39 am   Post subject: RE:How can I make this a playable game?

doug...that actually far from what you have to do.
sure that will make this graphic move...but that has no gravity to hold it on the ground and that wont let it jump onto anything. Please dont post on my threads with no brainer responses. My threads arent here to boost your posts.
Doug101




PostPosted: Wed Apr 02, 2008 10:41 am   Post subject: Re: How can I make this a playable game?

i know im just trying to be helpful if you want to use gravity micheal516 has a gravity simulating game
Michael516




PostPosted: Wed Apr 02, 2008 10:43 am   Post subject: Re: How can I make this a playable game?

here it is,


gravity and move.t
 Description:
gravity simulating game

Download
 Filename:  gravity and move.t
 Filesize:  3.94 KB
 Downloaded:  93 Time(s)

DaveAngus




PostPosted: Wed Apr 02, 2008 10:44 am   Post subject: RE:How can I make this a playable game?

ok thanks.
But i think if Im trying to program a game I know hthat I need to use key commands.
lol
DaveAngus




PostPosted: Wed Apr 02, 2008 10:45 am   Post subject: Re: How can I make this a playable game?

Michael516 @ Wed Apr 02, 2008 10:43 am wrote:
here it is,


Michael,
Im on a school computer at the moment.
Is there any way you could copy and paste the code in a [ code ] [/code ] kind of thing?
That would help alot.
Downloading is blocked here.
hahaha
Doug101




PostPosted: Wed Apr 02, 2008 10:45 am   Post subject: Re: How can I make this a playable game?

ya k but there micheal posted his gravity thing its actually helpful
Doug101




PostPosted: Wed Apr 02, 2008 10:49 am   Post subject: Re: How can I make this a playable game?

me and micheal are right beside each ohter in school at the moment
to download it all you have to do is hit open and save it as something in your documents

do you live in belleville ontario
Display posts from previous:   
   Index -> Programming, Turing -> Turing Help
View previous topic Tell A FriendPrintable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 1 of 2  [ 20 Posts ]
Goto page 1, 2  Next
Jump to:   


Style:  
Search: