Two Questions, Can you help me?

Game Editor comments and discussion.

Two Questions, Can you help me?

Postby Rux » Sat Jun 02, 2007 10:13 pm

Can anybody answer these questions for my next game?

1.How do you save a game :?: (I know how to save a score, but not a game)
2.How do you make a typing box :?:
PLEASE HELP! :o :o :o :o :o :o :o :o :o :o :o
I'm not good at coming up with signatures...
User avatar
Rux
 
Posts: 645
Joined: Sun Apr 29, 2007 9:26 pm
Location: Sitting on your moniter invisable.
Score: 35 Give a positive score

Postby d-soldier » Sat Jun 02, 2007 10:45 pm

Saving a game is very complex stuff... you basically have to setup save a gang-load of variables, and then when resuming use the loadvar thing. You would have to set up a varibale to not only record the status of all the ingame variables, but also the player's location, ammo, etc... perhaps Sparky, Gogo, or Fuzzy would be able to help with this... And be sure when posting on the forum to make your post's title have something to do with the subject of the post, not "Help me" or "couple questions".
User avatar
d-soldier
 
Posts: 703
Joined: Sun Apr 08, 2007 2:13 am
Score: 61 Give a positive score

Postby Game A Gogo » Sat Jun 02, 2007 11:47 pm

ah, saving game is pretty easy!
I shall make a demo?
Programming games is an art,
    Respect it.
User avatar
Game A Gogo
 
Posts: 3466
Joined: Wed Jun 29, 2005 10:49 pm
Location: French Canada *laughs*
Score: 181 Give a positive score

Postby Rux » Sun Jun 03, 2007 1:36 am

Ok, what about a typing box or type field? :?: ?
I'm not good at coming up with signatures...
User avatar
Rux
 
Posts: 645
Joined: Sun Apr 29, 2007 9:26 pm
Location: Sitting on your moniter invisable.
Score: 35 Give a positive score

Postby Jay S. » Sun Jun 03, 2007 1:43 am

To create a type box, first of all, create a simple text actor. Then, once you are finished choosing your font and other, notice on the lower left corner of the window there is a "Text Input" button. If you set this to yes, then the user can type their own text in this area. :) (If you click the "Config" button beside this, you can change other attributes, such as the border color, etc.)

I haven't used this feature much, but by what I know, it appears to me that how much text you enter in for the text actor determines how large the type box is...
User avatar
Jay S.
 
Posts: 118
Joined: Thu Apr 26, 2007 6:51 pm
Location: My computer desk. :P
Score: 9 Give a positive score

Postby Rux » Sun Jun 03, 2007 1:53 am

Cool, thanks! :D
I'm not good at coming up with signatures...
User avatar
Rux
 
Posts: 645
Joined: Sun Apr 29, 2007 9:26 pm
Location: Sitting on your moniter invisable.
Score: 35 Give a positive score

Postby Rux » Sun Jun 03, 2007 3:10 am

Game A Gogo wrote:ah, saving game is pretty easy!
I shall make a demo?


Please post a link or post the demo in this topic. :wink:
I'm not good at coming up with signatures...
User avatar
Rux
 
Posts: 645
Joined: Sun Apr 29, 2007 9:26 pm
Location: Sitting on your moniter invisable.
Score: 35 Give a positive score

Postby Sgt. Sparky » Sun Jun 03, 2007 5:56 am

Rux wrote:
Game A Gogo wrote:ah, saving game is pretty easy!
I shall make a demo?


Please post a link or post the demo in this topic. :wink:

I made a file saving of multiple Actors Positions,
simple just use on the create actor event of the view after you have your variables,
Code: Select all
FILE*file;
file = fopen("Game", "r+b");
fread(&variable1, sizeof(variable1), 1, file);
fread(&variable2, sizeof(variable2), 1, file);
//ect.
fclose(file);
so and so Actor.x = variable_whatever; //ect.

and for the draw Actor event of your Player,
Code: Select all
FILE*file;
so and so variable_whatever = Actor.x; //ect.
file = fopen("Game", "w+b");
fwrite(&variable1, sizeof(variable1), 1, file);
fwrite(&variable2, sizeof(variable2), 1, file);
//ect.
fclose(file);

:D
(Here is a Link to a File Saving Demo I made: http://game-editor.com/forum/tp-3450-Fi ... ions-.html )
Image
Random Links:
viewtopic.php?p=19474#19474
Right now (10/14/2009) I'm working on some C++ projects, but I might be able to help if you have some Game Editor questions. :)
User avatar
Sgt. Sparky
 
Posts: 1850
Joined: Sat Oct 07, 2006 5:28 pm
Location: Somewhere out there, beneath the pale blue sky...
Score: 236 Give a positive score

Postby Rux » Sun Jun 03, 2007 9:43 pm

Please edit your post and remove all useless scripting.
Still use var #s (Variable1). The so and so (ect...) is confusing :?
I'm not good at coming up with signatures...
User avatar
Rux
 
Posts: 645
Joined: Sun Apr 29, 2007 9:26 pm
Location: Sitting on your moniter invisable.
Score: 35 Give a positive score

Postby Game A Gogo » Sun Jun 03, 2007 11:22 pm

I just remembered that I made something about it, go on the demo forum and go to Gui, it has game saving in it.
Programming games is an art,
    Respect it.
User avatar
Game A Gogo
 
Posts: 3466
Joined: Wed Jun 29, 2005 10:49 pm
Location: French Canada *laughs*
Score: 181 Give a positive score

Postby Kodo » Sun Jun 03, 2007 11:34 pm

It'll be easier if you only allow the player to save between levels or at checkpoints where there is less to worry about. You could create a save game in this manner by just saving a few common grouped variables like the ones listed below with saveVars(“filename”, “group”)

current_level
player_score
player_health
lives_remaining

When you create the variables you want to save you can put them in a Save Group, this group will be what the saveVars/loadVars functions load and save. If you need to you can edit variables to place them in a save group after they have been created.

When the player chooses to reload their saved game you load the data again using loadVars(“filename”, “group”) , look at the level and place the character and/or view in the correct position, set all the other saved variables and off you go!

Taking this approach you really don’t need to worry about where all the monsters were, which pickups the player has already cleared from a level, were there bullets flying about the place? which frames of animation were all the sprites on? what damage had been done to the environment and on and on etc etc. It's much simpler.

If you are worrying about keeping track of remapped controls, music/fx volumes and other optional stuff I prefer to keep those saved in a separate player profile group that I can load and save in the front end menus and also load when starting up the game separately from the save game info.
Inogames: http://www.inogames.com iOS gaming
Firetop Adventure (app store): http://itunes.apple.com/us/app/firetop- ... ?mt=8&ls=1
User avatar
Kodo
 
Posts: 449
Joined: Thu Oct 20, 2005 8:20 pm
Location: UK
Score: 23 Give a positive score

Postby Sgt. Sparky » Mon Jun 04, 2007 4:14 pm

Kodo wrote:It'll be easier if you only allow the player to save between levels or at checkpoints where there is less to worry about. You could create a save game in this manner by just saving a few common grouped variables like the ones listed below with saveVars(“filename”, “group”)

current_level
player_score
player_health
lives_remaining

When you create the variables you want to save you can put them in a Save Group, this group will be what the saveVars/loadVars functions load and save. If you need to you can edit variables to place them in a save group after they have been created.

When the player chooses to reload their saved game you load the data again using loadVars(“filename”, “group”) , look at the level and place the character and/or view in the correct position, set all the other saved variables and off you go!

Taking this approach you really don’t need to worry about where all the monsters were, which pickups the player has already cleared from a level, were there bullets flying about the place? which frames of animation were all the sprites on? what damage had been done to the environment and on and on etc etc. It's much simpler.

If you are worrying about keeping track of remapped controls, music/fx volumes and other optional stuff I prefer to keep those saved in a separate player profile group that I can load and save in the front end menus and also load when starting up the game separately from the save game info.

But But....
Thats to easy! :cry:

(I made a different kind of File saving(file making Demo I made)
Image
Random Links:
viewtopic.php?p=19474#19474
Right now (10/14/2009) I'm working on some C++ projects, but I might be able to help if you have some Game Editor questions. :)
User avatar
Sgt. Sparky
 
Posts: 1850
Joined: Sat Oct 07, 2006 5:28 pm
Location: Somewhere out there, beneath the pale blue sky...
Score: 236 Give a positive score

Postby Kodo » Mon Jun 04, 2007 7:19 pm

Sgt. Sparky wrote:But But....
Thats to easy! :cry:
lol

What I suggested is just the one way of doing it and it happens to suit my needs most the time; your way is perfectly ok and depending on what you need for your game may be preferred :) It's really good that people present different ways of doing things on these forums and share ideas; it shows the flexibility of GE as well broadening peoples understanding of what's possible!

+ 1 point for Sparky (again!)
Inogames: http://www.inogames.com iOS gaming
Firetop Adventure (app store): http://itunes.apple.com/us/app/firetop- ... ?mt=8&ls=1
User avatar
Kodo
 
Posts: 449
Joined: Thu Oct 20, 2005 8:20 pm
Location: UK
Score: 23 Give a positive score

Postby Sgt. Sparky » Mon Jun 04, 2007 9:34 pm

1 + Point For you! :D
Image
Random Links:
viewtopic.php?p=19474#19474
Right now (10/14/2009) I'm working on some C++ projects, but I might be able to help if you have some Game Editor questions. :)
User avatar
Sgt. Sparky
 
Posts: 1850
Joined: Sat Oct 07, 2006 5:28 pm
Location: Somewhere out there, beneath the pale blue sky...
Score: 236 Give a positive score

Postby Rux » Sat Jun 23, 2007 10:35 pm

I finally get Sgt.Sparky's script!
The first part ended up like this,
( view,create actor, script editor
Code: Select all
FILE*file;
file = fopen("Game", "r+b");
fread(&PlayB_Var, sizeof(PlayB_Var), 1, file);
fread(&Menu_var, sizeof(Menu_var), 1, file);
fread(&QuitB_Var, sizeof(QuitB_Var), 1, file);
fread(&Register_Var, sizeof(Register_Var), 1, file);
fread(&Seirial_Var, sizeof(Seirial_Var), 1, file);
fread(&Sessions_Var, sizeof(Sessions_Var), 1, file);
fread(&registerthegame_Var, sizeof(registerthegame_Var), 1, file);
fread(&sep_Var, sizeof(sep_Var), 1, file);
fread(&session_Var, sizeof(session_Var), 1, file);
fclose(file);
PlayB.x = PlayB_Var;
Menu.x = Menu_var;
QuitB.x = QuitB_Var;
Register.x = Register_Var;
registerthegame.x = registerthegame_Var;
Seirial.x = Seirial_Var;
sep.x = sep_Var;
session.x = session_Var;
Sessions.x = Sessions_Var;
) :shock: :shock: :shock:
Last edited by Rux on Sat Jun 23, 2007 11:13 pm, edited 1 time in total.
I'm not good at coming up with signatures...
User avatar
Rux
 
Posts: 645
Joined: Sun Apr 29, 2007 9:26 pm
Location: Sitting on your moniter invisable.
Score: 35 Give a positive score

Next

Return to GE - General

Who is online

Users browsing this forum: No registered users and 1 guest

cron