Hi! Welcome to the forum for Platinum Arts Sandbox Free 3D Game Maker. I currently have the forums locked as I am attempting to properly update them.

In the meantime please join the new Discord Server!

If you have any questions please e-mail me through the Platinum Arts website.

Making the login and register.

Learn more on how to use Sandbox, or submit your own tutorials or resources.
daltonds1
Member
Member
Posts: 368
Joined: September 13th, 2010, 12:26 am
Name: Dalton
IRC Username: Daltonds1
Location: Tomball, Texas

Making the login and register.

Post by daltonds1 »

*Before doing this tutorial please note this. we will be changing the menu when you get into the game and other things.
Please Backup your files and do this to the copy.

Also this is not 100% but it works
UPDATES ON THIS WILL BE POSTED SOON WITH A BETTER REG AND LOGIN SYSTEM


Now lets get started

This is what we will be adding today.


Now the first thing we will be doing is changing the screen when you get into the game

Go ahead and open up this
PlatinumArtsSandbox2.5 - Copy\data\lang\en\menus.cfg

In menus.cfg You are going to want to Search this

Code: Select all

            guibutton "Exit The Game"    quit    exit
Now you will come up with this

Code: Select all

        guilist [
            guibutton "Toggle Editmode (e)"    "edittoggle"
            guibutton "Load Map"        "showgui maps; MODE = (getmode); mode (getmode); initmapgui"
            guibutton "Load Custom Map"    "showgui loadmap"
            guibutton "Multiplayer"        "showgui multiplayer"
            guibutton "Help"        "showgui help"
            guibar
            guibutton "Options"        "showgui options"
            guibutton "Jukebox"        "showgui jukebox"
            guibutton "Change Skill Level"     "showgui skilllvl"
            guibutton "About"        "showgui authors"
            guibutton "Exit The Game"    quit    exit
Now. If you want, you change Keep all of these options on here or you can do what i did
If not skip to Option 2.

OPTION 1
(DELETE SOME POINTLESS THINGS AND THINGS FOR EDITING THE GAME)
So to make it cleaner you want to delete some pointless things.
I deleted this

Code: Select all

            guibutton "Change Skill Level"     "showgui skilllvl"
            guibutton "Jukebox"        "showgui jukebox"
            guibutton "Toggle Editmode (e)"    "edittoggle"
            guibutton "Load Map"        "showgui maps; MODE = (getmode); mode (getmode); initmapgui"
            guibutton "Load Custom Map"    "showgui loadmap"
            guibutton "Multiplayer"        "showgui multiplayer"
Now when you go to the menu all of these options will be gone. remeber you can also add them back
Now skip past option 2 since you did this

OPTION 2
So you dont want to delete them so what you will do is just Add the things i add above Toggle Edit mode (E)
----------------------

So after you have deleted those or keep them We are now going to want to start adding the Login and register Menu

So above one of the buttons one line of those codes you are going to add this

Code: Select all

			guibutton "Login"		"showgui login"
This basically will Add a button telling it to show a new GUI
Now for the register
Add this under the Login code

Code: Select all

            guibutton "register"        "showgui reg"
This is what it should look like

IF DELETED

Code: Select all

            guibutton "Login"        "showgui login"
            guibutton "register"        "showgui reg"
            guibutton "Options"        "showgui options"
            guibutton "About"        "showgui authors"
            guibutton "Exit The Game"    quit    exit
IF NOT DELETED

Code: Select all

   guibutton "Login"        "showgui login"
            guibutton "register"        "showgui reg"   
            guibutton "Toggle Editmode (e)"    "edittoggle"
            guibutton "Load Map"        "showgui maps; MODE = (getmode); mode (getmode); initmapgui"
            guibutton "Load Custom Map"    "showgui loadmap"
            guibutton "Multiplayer"        "showgui multiplayer"
            guibutton "Help"        "showgui help"
            guibar
            guibutton "Options"        "showgui options"
            guibutton "Jukebox"        "showgui jukebox"
            guibutton "Change Skill Level"     "showgui skilllvl"
            guibutton "About"        "showgui authors"
            guibutton "Exit The Game"    quit    exit
--------------------------

Alright so now if you go in the game you will see those 2 buttons but they do nothing atm if you click on them.
Now lets go ahead and add the LOGIN Menu
Go ahead and search (CTRL + F)

Code: Select all

newgui scratchpad
and right under the LAST ]

add this

Code: Select all

newgui login [
    guititle "Login"
    guibar
    guitext "Username:"
    guifield username 18
    guitext "Password:"
    guifield password 18
    guibutton "Login" "showgui UserMenu"
]
Now to explain
Gutititle = This is the title of the GUI
guibar = makes a bar separating them
guifield = This creates a text box and 18 = How many chars you can put in
guibutton = This makes a clickable button

Now for the register
Right under this ] of the login you are going to add

Code: Select all

newgui reg [
    guititle "register"
    guibar
    guitext "Username:"
    guifield username 18
    guitext "Password:"
    guifield password 18
    guitext "Email:"
    guifield email 30
    guibutton "Submit" "showgui login"
]
Now when you press Sumbit it will go ahead and show the LOGIN menu with your user id and pw already typed in.

Now you notice here

Code: Select all

    guibutton "Login" "showgui UserMenu"
You see showgui UserMenu

But we have no user menu.

This is also optional It will just create a new menu.
You can see at the end of the video

Right under the barracks add this

Code: Select all

newgui UserMenu [
    guititle "Welcome to the Game"
    guibar
    guitext "Welcome to the game. Please choose a option"
    guibutton "Play" [sp "dalton"]
    guibutton "Options" "showgui options"
    guibutton "Website" "showgui options"
    guibutton "Exit" quit    exit
]
Now. I do not have website working yet.

Now this will create that last menu.

Now to make the PLAY BUTTON WORK to go to your map
You are going to want to replace the word DALTON with your map name.

Save and thats it. Have fun
Last edited by daltonds1 on September 22nd, 2010, 4:34 pm, edited 2 times in total.
chocolatepie33
Support Team
Support Team
Posts: 2458
Joined: April 27th, 2010, 5:31 pm
IRC Username: CP

Re: Making the login and registar.

Post by chocolatepie33 »

Nice tut, please try to simplify it, I almost got lost :)
quick FYI: It's register, not registar.
Julius wrote:Contribute to http://www.opengameart.org NOW!
Save the wiki!
User avatar
PizzaLover101
Member
Member
Posts: 1751
Joined: October 23rd, 2009, 1:33 pm
Name: NAME
IRC Username: DaItsicle
Location: By a computer
Contact:

Re: Making the login and register.

Post by PizzaLover101 »

lol, Nice tut, didn't read it all, and I have no use for it (yet) but hope I can someday
Project 1: Da Chest Collector [TBD]
Project 2: Tis a secret [End of summer] announcement June 22 2011
Project 3: An even bigger secret!

http://pizzagametime.tk/
http://forums.pizzagametime.tk/
User avatar
klimyriad
Support Team
Support Team
Posts: 969
Joined: December 23rd, 2009, 1:43 pm
Name: liam
Contact:

Re: Making the login and register.

Post by klimyriad »

maybe when the master server is up mike/hirato and offtools may use this to keep online play under like a admin control which would be better for kids nice work.
Firstspace the attack Progress. Image
Maps= Image finishing the town of hisal map.
Models and textures Image Just started finding these.
Menus, script's and other stuff. Image
arcones
Support Team
Support Team
Posts: 2734
Joined: January 13th, 2010, 12:42 pm
Name: Timothy
IRC Username: I use Steam
Location: Looking over your shoulder...
Contact:

Re: Making the login and register.

Post by arcones »

Wow that's beautiful... Thank you so much for this tut!

I'm going to be using this for my game (eventually :P)

Arcones
Image
Want a user bar like this one? PM Leo!
User avatar
goldstylez
Member
Member
Posts: 35
Joined: May 22nd, 2010, 11:40 am
Name: goldstylez
IRC Username: goldstylez

Re: Making the login and register.

Post by goldstylez »

thanks i will use:)
come to the dark side
we have cookies=3
Dial3ct
Member
Member
Posts: 30
Joined: November 6th, 2010, 2:52 pm

Re: Making the login and register.

Post by Dial3ct »

err... i didnt watch the vid but did you create a place that actually stores the values typed into the register part so that when it come to the login, it can verify if the username exists and if it does, does the password match the username?
User avatar
PizzaLover101
Member
Member
Posts: 1751
Joined: October 23rd, 2009, 1:33 pm
Name: NAME
IRC Username: DaItsicle
Location: By a computer
Contact:

Re: Making the login and register.

Post by PizzaLover101 »

I have an idea:
Couldn't you make an svn type thing, and have it connect to a file there with a list of user names and encrypted passwords?
Project 1: Da Chest Collector [TBD]
Project 2: Tis a secret [End of summer] announcement June 22 2011
Project 3: An even bigger secret!

http://pizzagametime.tk/
http://forums.pizzagametime.tk/
daltonds1
Member
Member
Posts: 368
Joined: September 13th, 2010, 12:26 am
Name: Dalton
IRC Username: Daltonds1
Location: Tomball, Texas

Re: Making the login and register.

Post by daltonds1 »

I could but it would take time
User avatar
GR1M
Support Team
Support Team
Posts: 1305
Joined: August 22nd, 2009, 4:35 pm
Name: Luke
IRC Username: Gr1m
Location: Texas
Contact:

Re: Making the login and register.

Post by GR1M »

Can you make it to where, once you hit register that information will send to a certain "email address"
Image
Want a user bar like this one? PM Leo
Post Reply