Jump to content


Photo
- - - - -

leveling system - New Version!V3!


  • Please log in to reply
13 replies to this topic

#1 CrazyGamer

CrazyGamer

    GMC Member

  • GMC Member
  • 81 posts

Posted 03 April 2011 - 12:16 PM

Title: [Leveling System]
Description: [A leveling system for any type of game]
GM Version: [ GM 8]
Registered: [ NO ]
File Type: [.gmk]
[Version1]
File Size: [9.88 KB]
File Link: GMK File
Easy to understand by anyone and even that there are about 10 lines of code it is fully commented :D .
[Version2] - NEW! (includes a exp bar :D )
File Size: [10.38 KB]
File Link: GMK File
this one is harder but i hope you will understand it
Rearanged the code so it will be easier to read and understand
[Version3]
File Size: [10.72 KB]
File Link: GMK File
New: this one keeps track of your current level needed exp and how much you have of your current level
but also of how much Exp you earned for all your levels. (worth download and try)

Please if you download also reply :D .
Free to use in any game; Credit goes to CrazGamer :D;(id also like to see the game you are using it in(pm) )
Thanks for downloading,using and replying.:)

Edited by CrazyGamer, 26 February 2012 - 08:03 PM.

  • 0

#2 GPro

GPro

    Gun Powder Games

  • GMC Member
  • 293 posts
  • Version:GM8

Posted 08 April 2011 - 06:01 AM

Nice example but it's more complicated than the one I use in my game :)
  • 0

#3 CrazyGamer

CrazyGamer

    GMC Member

  • GMC Member
  • 81 posts

Posted 08 April 2011 - 10:26 AM

Nice example but it's more complicated than the one I use in my game :)

Thanks :D

Common 100 downloads one reply?? :|
  • 0

#4 GPro

GPro

    Gun Powder Games

  • GMC Member
  • 293 posts
  • Version:GM8

Posted 09 April 2011 - 08:10 PM

Nice example but it's more complicated than the one I use in my game :)

Thanks :D

Common 100 downloads one reply?? :|


Yeah people just hate to reply, btw i dont think you need global. before every variable, you're using only one object! :S and try to make it simpler (or at least look simpler) because im good at gml and i can hardly understand your coding xD
  • 0

#5 Rare

Rare

    rawr

  • GMC Member
  • 371 posts
  • Version:GM8.1

Posted 11 April 2011 - 06:13 AM

It's awesome. I'll definately use it if I need it :)
  • 0

#6 _194598

_194598

    GMC Member

  • New Member
  • 9 posts

Posted 11 April 2011 - 03:11 PM

Title: [Leveling System]
Description: [A leveling system for any type of game]
GM Version: [ GM 8]
Registered: [ NO ]
File Type: [.gmk]
File Size: [9.88 KB]
File Link: GMK File

Easy to understand by anyone and even that there are about 10 lines of code it is fully commented :D .
Please if you download also reply :D .
Free to use in any game; Credit goes to CrazGamer :D


Simple and straight to the point! Thanks for a great start! I can try and modified it to my justification and needs! :D
  • 0

#7 CrazyGamer

CrazyGamer

    GMC Member

  • GMC Member
  • 81 posts

Posted 11 April 2011 - 09:07 PM

Simple and straight to the point! Thanks for a great start! I can try and modified it to my justification and needs! :D


Thanks :D
  • 0

#8 CrazyGamer

CrazyGamer

    GMC Member

  • GMC Member
  • 81 posts

Posted 12 April 2011 - 09:20 AM

Added a new system :D ! Check the main post for download !
180 downloads and just a few replies?? common if you download try also replying :D !!

Edited by CrazyGamer, 12 April 2011 - 10:31 PM.

  • 0

#9 Zwander

Zwander

    GMC Member

  • New Member
  • 181 posts
  • Version:GM8

Posted 16 April 2011 - 09:30 AM

reminds me (fondly) of anti idle:the game.
I like it, i actually spent about two minutes just hammering the q button. lol. nice job.

Edit: i find (it might just be me) if you put the braces "{}" on their own lines (in code) it is easier to read. its probably just me tho.
Spoiler

here it is indented. I dont know if its done right tho.
the code snippet function is messing up the spacing tho, so it doesn't look right
-Zwander

Edit: Made code a spoiler to prevent unnecessarily clutter.

Edited by Zwander, 02 November 2011 - 08:33 AM.

  • 0

#10 CrazyGamer

CrazyGamer

    GMC Member

  • GMC Member
  • 81 posts

Posted 02 May 2011 - 07:54 PM

reminds me (fondly) of anti idle:the game.
I like it, i actually spent about two minutes just hammering the q button. lol. nice job.

Edit: i find (it might just be me) if you put the braces "{}" on their own lines (in code) it is easier to read. its probably just me tho.

// 			|       			EXP FORMULA                	|       			
global.needexp=floor(((global.level*global.level)*1.2)*global.expmf) // UPDATE THE EXP NEEDED FOR THE NEXT LEVEL 
// ADDING EXPERIENCE 
// EXPTOADD - EXP GIOING TO BE ADDED TO YOUR REAL EXP, "GAINED EXP"
// QFACTOR  - YOU CAN USE THIS TO INCREASE EXP ADDING SPEED( FOR DEFAULT SPEED SET IT TO 1 )
// WHY ITS ADDING YOUR LEVEL * QFACTOR TO EXP?? - BECAUSE AT HIGH LEVELS WHEN LETS SAY YOU KILL 
// SOMETHING AND YOU GET 2000 EXP YOU DONT WANT TO ADD IT 1 BY 1 SO THAT IS USED FOR ADDING SPEED
if global.exptoadd>0
	{
    	if global.exptoadd>=global.level*qfactor
    	{  	
        	global.Exp+=global.level*qfactor
        	global.exptoadd-=global.level*qfactor
    	}
    	// IF YOU DO NOT HAVE ENAUGH EXP( LEVEL * QFACTOR ) ADD A SMALLER VALUE ( YOUR GAINED EXP / QFACTOR )
    	// IF THAT VALUE IS SMALLER THAN 1 ADD 1 BY 1 
    	else if global.exptoadd<global.level*qfactor
    	{
        	if global.exptoadd/qfactor>1
        	{
            	global.Exp+=global.exptoadd/qfactor
            	global.exptoadd-=global.exptoadd/qfactor
        	}
        	else if global.exptoadd/qfactor<1
        	{
            	global.Exp+=1
            	global.exptoadd-=1
        	}
    	}
	}
// IF YOUR EXP IS LARGER OR EQUAL WITH THE NEEDED EXP AND YOU DO NOT HAVE MAXIMUM LEVEL THEN LEVEL UP AND ADD STAT POINTS
if global.Exp>=global.needexp && global.level<global.maxlvl
	{
	global.Exp=0     			// SET YOUR EXP TO 0
	global.level+=1          	// INCREASE LEVEL BY 1 
	global.statpoints+=1 		// INCREASE STAT POINTS BY 1
	} 
// IF YOU GET MAX LEVEL SET YOUR EXP TO THE MAX VALUE(THE NEEDED EXP) AND ERASE ANY GAINED EXP LEFT
if global.level=global.maxlvl
	{      	// CHECK IF LEVEL IS EQUAL WITH THE MAX LEVEL
	global.Exp=global.needexp;          	// MAKEYOUR EXP EQUAL TO THE NEEDED EXP
	global.exptoadd=0           			// ERASE ANY REMAINING GAINED EXP
	}
 	// END OF LEVELING SYSTEM                                              	//

// increase/decrease qfactor(exp adding speed)  
if keyboard_check_released(vk_up)
	{
	qfactor+=1
	}
if keyboard_check_released(vk_down)
	{
	if qfactor>1
	qfactor-=1
	}
here it is indented. I dont know if its done right tho.
the code snippet function is messing up the spacing tho, so it doesn't look right
-Zwander

Thanks :D
And yeah if you put the "{}" braces on their own lines it would be easier to read . Ill rearange the code so it will be easier to read and understand :D .

EDIT : Rearanged the code so it will be easier to read and understand

Edited by CrazyGamer, 02 May 2011 - 08:00 PM.

  • 0

#11 beeproductions

beeproductions

    Helping gmc users

  • GMC Member
  • 1132 posts
  • Version:GM:Studio

Posted 14 November 2011 - 06:45 PM

Nice example!!!!Will use it!
  • 0

#12 CrazyGamer

CrazyGamer

    GMC Member

  • GMC Member
  • 81 posts

Posted 26 February 2012 - 08:04 PM

NEW VERSION OUT :) !! Check the main post.
  • 0

#13 Beanchilla

Beanchilla

    GMC Member

  • New Member
  • 1 posts
  • Version:GM8

Posted 29 February 2012 - 08:43 AM

Looks amazing! thanks a lot, I'll definitely try to employ this with my game
  • 0

#14 CrazyGamer

CrazyGamer

    GMC Member

  • GMC Member
  • 81 posts

Posted 05 March 2012 - 11:36 AM

Looks amazing! thanks a lot, I'll definitely try to employ this with my game

Thanks man :) i would like to see you game after you put this in it :) .
  • 0




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users