how to make first screen

Game Editor comments and discussion.

how to make first screen

Postby ihpalash » Sun Feb 19, 2012 5:57 pm

i want to know how to make the basic screen like which screen has new game, load game, option, exit. can any one tell me please ??
ihpalash
 
Posts: 9
Joined: Sat Feb 18, 2012 12:26 pm
Score: 0 Give a positive score

Re: how to make first screen

Postby RippeR7420 » Sun Feb 19, 2012 7:50 pm

You're going to have to be a bit more specific... The way I do it is like this:

1. I draw the image in flash or ms paint.
I make different animations for each
Buttons that gets pressed etc.

2. Create an actor in GE for your background
Image. And a different actors for each
Button.

3. Either create another actor(filled region)
To place over each button, or simply
Add a key down function on the button
Actor.

4. Now, tell the buttons what you want
Them to do. Example;
ChangeAnimation, "new game button", " button pressed", "NO_CHANGE";
LoadGame("levelOne.ged") etc...

Basically like that.. Sorry for the incorrect
Language, I'm typing this on my phone haha.

Hope this was useful!
And anymore questions just ask :)
CURRENT PROJECTS:

-Olo: The Sword Shaman http://game-editor.com/forum/viewtopic.php?f=4&t=12919

-The Wrath of Blob: (On the back burner)

-StickMcGee - Blast to the Future http://game-editor.com/forum/viewtopic.php?f=4&t=13660
User avatar
RippeR7420
 
Posts: 391
Joined: Mon Apr 27, 2009 4:16 pm
Location: Salt Lake City, Utah.
Score: 23 Give a positive score

Re: how to make first screen

Postby skydereign » Sun Feb 19, 2012 9:14 pm

Just so you know, your game menu can be in the same game file as your actual game. And since you are new I'd recommend remembering this. Almost everything in gE is handled by actors. That means if you want to do anything, in your case you want to create the menu interface you can use the same approach as you would in making other aspects of your game. Create some actors that represent the individual elements of your game and give them some animations so the player knows what they are. After that you give them code to do what you want, currently start game/load game/options/exit button. For loading you'll have to learn how to use variables and saving.
User avatar
skydereign
 
Posts: 3510
Joined: Mon Jul 28, 2008 8:29 am
Score: 589 Give a positive score

Re: how to make first screen

Postby ihpalash » Mon Feb 20, 2012 6:43 am

thanks guys. actually this community is much helpful. but i am having some problems. how can i link the game to the button. or how to make a programme of the exit button etc. can you tell me? oh one more thing guys, i am currently trying to make a game . in that game there will be a box, in which player can write name or word. and for that word different animations can roll different scene. can you guys tell me how to make that programme? i only need code. design or animation will be mine.
thanks in advance.
ihpalash
 
Posts: 9
Joined: Sat Feb 18, 2012 12:26 pm
Score: 0 Give a positive score

Re: how to make first screen

Postby skydereign » Mon Feb 20, 2012 7:00 am

Do you know what scripts are? Essentially actors use events that are able to run lines of code. In the code is how you specify what happens. In RippeR7420's suggestion the way to link the button to the game is by using the LoadGame function.
Code: Select all
LoadGame("game_name");

That loads the file game_name (in the same directory as the current game). There is also another function called ExitGame, which as it says exits the game. So you can have a mouse button down event on your exit button running this code.
exit_button -> Mouse Button Down Left -> Script Editor
Code: Select all
ExitGame();


Now for the other bit you have to understand how strings work. By the sound of it this will be a little too advance for you, since it sounds like you are just starting gE and programming in general. But here is a somewhat simple explanation. A string is a bunch of single characters put together. To do this in C you use an array, which is a collection of variables under a single name. To keep it simple you will probably use gE's built in text actor type and text handling. To create a text actor create a normal actor, and in the actor control panel, click the [Text] button. From there click the font button and select the .ttf file you want to use. Then at the bottom left where it says text input, set that to yes. This way you the user can click the text and type into it.

This leaves just checking what the text is. Wherever the event you want things to happen depending on the text you can use strcmp (takes two strings and returns a 0 if they are the same).
Code: Select all
if(strcmp(text_actor.text, "string to compare")==0)
{
    // text was string to compare
}
else if(strcmp(text_actor.text, "other string")==0)
{
    // text was other string
}
User avatar
skydereign
 
Posts: 3510
Joined: Mon Jul 28, 2008 8:29 am
Score: 589 Give a positive score

Re: how to make first screen

Postby ihpalash » Mon Feb 20, 2012 11:04 am

thanks skydereign, a lot of thanks......... actually i am 16 years old. so it's really hard for my to know about the programmings. again thanks... i will try my best to work hard on this issue...... :D :D :) :P :P
ihpalash
 
Posts: 9
Joined: Sat Feb 18, 2012 12:26 pm
Score: 0 Give a positive score


Return to GE - General

Who is online

Users browsing this forum: No registered users and 1 guest