Jump to content

  • Log In with Google      Sign In   
  • Create Account

Banner advertising on our site currently available from just $5!


1. Learn about the promo. 2. Sign up for GDNet+. 3. Set up your advert!


Forenkazan

Member Since 30 Oct 2012
Offline Last Active Jul 04 2015 11:27 PM

Topics I've Started

how to serialize so many variables?

03 July 2015 - 11:09 PM

Hello

 

currently i am learning C# serialization to save and load Player Data.

 

following this tutorial:

http://gamedevelopment.tutsplus.com/tutorials/how-to-save-and-load-your-players-progress-in-unity--cms-20934

 

i know how to save and load variables.

 

but lets say i have such class:

[System.Serializable]
public class PlayerData {

	public static  int PlayerLevel;
	public static  string PlayerName;
	public static  string PlayerClass;
	public static  int PlayerHealth;
	public static  int PlayerExp;
	public static  int PlayerAttack;
        public static  int PlayerStrength;
	public static  int PlayerAgility;
	public static  int PlayerAttack;
        public static  List<Item> Inventory = new List<Item>;
        public static  int PlayerMana;

        // A lot of variables ....

}

so my questions:

 

1- how can i save all of them together instead of one by one

2- is saving all of them when only one of them is changed slows the game?


How can i save player data, and how to prevent cheating?

30 June 2015 - 08:48 PM

Hello

 

i am using Unity and C# for my projects.

 

till now i am using PlayerPrefs to save and load Player Data, but any user can edit and change it, so i want to know a better method to save and load data.

 

(i found this plugin https://www.assetstore.unity3d.com/en/#!/content/18920 which encrypt the PlayerPrefs, but i dont know should i use it or ignore PlayerPrefs completely)

 

Also if i saved a player data, how can i prevent the player from cheating and hacking?

 

i read about XML Serialization and i am learning it right now, how safe is it and should i continue learning about it?


how to program A LOT of skills/spells?

27 June 2015 - 10:55 PM

Hello

 

How do you program a spells/skills system for a game with one character but a lot of spells/skills (maybe 100+)

 

currently i am using this method: (i am using Unity2D with C# btw)

 void PlayerCharacter()
 {
	 if(SkillNumber1Unlocked)// when he presses the first skill button and it Unlocked
	UseSkillNumber1();

	 if(SkillNumber2Unlocked)// when he presses the second skill button and it Unlocked
	UseSkillNumber2();

 }

void SkillNumber1()
{
	Code;
	Code;
}
void SkillNumber2()
{
	Code;
	Code;
}

Start with Aspect ratio or Resolution?

17 June 2015 - 02:11 PM

Hello

 

i am going to develop a new game for PC using Unity2D. 

 

but i am confused, should i start designing and developing based on an aspect ratio or a resolution. also is there any difference if i started with any of them?

 

Aspect ratio:  16:9

or

Resolution: 1920x1080

 

 since when i use Unity and put aspect ratio 16:9 i can see the full screen of the game, but when i put it 1920x1080 resolution i dont see all the screen and it says different resolutions.


code for doing something while the game is off

26 September 2014 - 07:23 AM

Hello

 

i am trying to make a clicker game, but there is a problem faced me sad.png

 

 

how can i let the game does something while its off?

 

for example Cookie Clicker, when u close the game and then open it after 10 mins u will find ur cookies increased.

 

i am using Unity Engine and scripting in C# btw.


PARTNERS