ME FIRST GAMES
Menu
games for me and you
![]() 📌 Stay organized by creating one class per file. Nested classes and structs are an exception. 📌 Use Pascal and Camel Case naming conventions: DoSomethingMethod() and localVariableName. 📌 Method names should inform the programmer exactly what they are doing: DashForward() and FireWeapon() 📌 Use arrays for sets of data that do not need to change in size. 📌 Use List<> for sets of data that change over time. Understand that methods like Insert() can have poor performance. 📌 Opt for a HashSet<> when you need an ordered set of keys. 📌 Dictionary<> should only be used when you have both key/value pairs. 📌 Strings are immutable, which means every string every created will allocate its own set of memory. 📌 StringBuilder should be used when concatenating strings in a loop. 📌 string.IsNullOrEmpty should be used instead of a null check. 📌 Use string interpolation to concatenate short strings: string message = $"Hello {nameList[n].FirstName}"; 📌 Shorten your conditional statements by using the operator ? 📌 Higher-level methods most likely mean less performance. LINQ provides powerful functionality like Where() and Select() which can be slow. 📌 Minimize Garbage Collection. Know which calls allocate on the heap; you probably don't want them called in tightly looped operations.
0 Comments
Leave a Reply. |
Me First Games is an independent game studio dedicated to creating unique and bizarre video games.
Red MatterStar Impact is an upcoming adventure platformer coming to PC, Mac, and Linux.
Archives
April 2021
Categories |
Copyright (c) 2020 Me First LLC
|