Jump to content
  • Advertisement


  • Content Count

  • Joined

  • Last visited

Community Reputation

0 Neutral

1 Follower

About WolfWin

  • Rank

Personal Information

  • Interests

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. Happy Thursday! Looking for some recommendations for apps that help plan/organize classes and methods for a project (something like xmind but for programming). Also Looking for good app beyond GitHub for project coordination. Thanks in advance :3 ~Wolf
  2. Hey all. looking around and it seem the Godot community is fractured, where the best place to ask godot specific questions? Thanks in advance, Wolf
  3. WolfWin

    Best practice for passing data in C#?

    Yeah I redid a bit of a class that holds Stats for a character and incorporated some of your advice. Though quick and dirty. It already feels better. I added a bit of functionality but some of it is probably unnecessary. Handles lvl, exp, modifiers from status ailments or equipment etc. So from what you are saying it would probably be best to pass stats or other data in dicts lists or arrays? Ex: StatSheet.Get can send a dictionary<statID, value> public class StatSheet { public int Level = 0, EXP = 0, HP = 0, HPMax = 0, SP = 0, SPMax = 0, Strength = 0, Speed = 0, Soul = 0; private Dictionary <MID, Modifier> mModifiers = new Dictionary <MID, Modifier>(); public StatSheet() { mModifiers = new Dictionary<MID, Modifier>(); } public StatSheet(Dictionary<SID, int> newStats) { Set(newStats); mModifiers = new Dictionary<MID, Modifier>(); } public void Set(Dictionary<SID, int> newStats) { foreach (KeyValuePair<SID, int> stat in newStats) { this.Set(stat.Key, stat.Value); } } public void Set(SID statID, int value) { switch (statID) { case SID.Level: Level = value; break; case SID.EXP: EXP = value; break; case SID.HP: HP = value; break; case SID.HP_Max: HPMax = value; break; case SID.SP: SP = value; break; case SID.SP_Max: SPMax = value; break; case SID.Strength: Strength = value; break; case SID.Speed: Speed = value; break; case SID.Soul: Soul = value; break; default: Debug.LogError("Nonexistent Stat Type Added"); break; } } public int Get(SID statID) { switch (statID) { case SID.Level: return Level; case SID.EXP: return EXP; case SID.HP: return HP; case SID.HP_Max: return HPMax; case SID.SP: return SP; case SID.SP_Max: return SPMax; case SID.Strength: return Strength; case SID.Speed: return Speed; case SID.Soul: return Soul; default: Debug.LogError("StatSheet: Cannot find stat type:" + statID.ToString()); return 0; } } public Dictionary<SID,int> Get() { Dictionary<SID, int> rawStats = new Dictionary<SID, int>(); rawStats.Add(SID.Level, Level); rawStats.Add(SID.EXP, EXP); rawStats.Add(SID.HP_Max, HPMax); rawStats.Add(SID.SP_Max, SPMax); rawStats.Add(SID.Strength, Strength); rawStats.Add(SID.Speed, Speed); rawStats.Add(SID.Soul, Soul); return rawStats; } public void Add(SID statID, int value) { int newValue = this.Get(statID) + value; this.Set(statID, newValue); } public void Add(Dictionary<SID, int> stats) { foreach (KeyValuePair<SID, int> stat in stats) { this.Add(stat.Key, stat.Value); } } public Dictionary<MID, Modifier> Modifiers { get{return mModifiers;} set{value = mModifiers;} } public void AddModifier(MID modID, Modifier modifier) { mModifiers.Add(modID, modifier); } public void RemoveModifier(MID modID) { mModifiers.Remove(modID); } }
  4. WolfWin

    Game Character

    You should post front side and back orthographically. At first glance Something in the torso proportion seems off. Use proportion guides such as this:
  5. What are some good practices for passing around data in C#? What are the pros and cons of using custom container classes versus a list or a dictionary or array?
  6. WolfWin

    C# Concepts Useful For JRPGs?

    Thanks Nyperen! My stats class holds some other information as well such as modifiers, but Ill consider your approach. Definitely going to use enums instead of strings though! Going to read up more on linq. Is their anything you guys recomend for code structure for turnbased games in unity? Looking for examples of implementation.
  7. Hey all, been working through Daniel Schuller's "How to Make an RPG", except in Unity in C#. Its been fun so far, finished basic stats and leveling, and eveything works as expected. However: knowledge of C# is lacking, What aspects of C# would be useful for this kind of project? For example I have been using Dictionaries to store stat keyvaluepairs. Any specific aspects of C# I should dig into more?
  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!