• Advertisement
  • Popular Tags

  • Popular Now

  • Advertisement
  • Similar Content

    • By Michael Santer
      We're currently two programmers and a game designer working on a turn-based tactics fantasy board game. For reference you can search for images of "Tactics Arena Online", a fairly dated game that used to have a lot of depth and complexity.
      Our goal is to use the same combat concepts, but giving it a much needed modern touch as well as a whole new set of heroes to choose from with additional abilities. The game is a mix of isometric and 3D and we plan to release the game on Steam and hopefully Android & iOS as well.
      We are looking for someone to work with us pro-bono (just like we're doing) as a 3D character artist. The skills needed are creativity, a hard working attitude and an ability to make minor animations (things like idle, walk, block and very rudimentary attack animations). A perk to have would be the ability to make some VFX. If the game makes it on steam and money starts coming in, you'd obviously be compensated for your hard work, but as it stands this is a hobby project to garnish your portfolio.
      A bit more about the game:
      This game will be an online multiplayer game where each user gets to pick up to 10 characters to place on his half of the board (this would be done before even entering matchmaking. Think runes in League of Legends for example). The user can place his 10 units of choice anywhere he likes on his half board. Some units can be used more than once. So if you want 4 knights and 2 mages or even if you want 10 clerics, you can do as you please. You can then save your setups for future use. The goal of the game is to wipe out the enemy team.
      Each character or Hero (except premium and abyss characters) start with 1 ability and they can ascend (either by playing a certain amount of matches with the character or by forcing the ascension with real money) to gain a new ability or passive. Acquiring a new character can be done by using in-game currency that you earn from playing matches or using real money with the exception of Abyss characters which can only be acquired by winning certain rare matches. The goal is to offer a freemium game with lots of customizable elements while making sure that no user can "buy power" with real money. We want everything that a paying user can get to be available to non-paying users who play the game a lot.
      Ultimately we want this to become a competitive game that people can enjoy and really get invested in. Each character is designed with options for counterplay in mind and synergy with other heroes.
      We sincerely believe in what this game can become and we home to find someone just as passionate as we are to get involved in this project!
    • By CrazyApplesStudio
         Hello , i would like to showcase my first game project, a simple endless casual arcade game called Apples Mania : Apple Catcher. The game has simple goal , scoring as high as possible by collecting falling apples while the difficulty gradually increases. Different apples are worth different amount of points and there are also 2 power-ups to help you in your challenge.
        The game took me about 2 months to complete and polish and i made everything except for the music tracks and some of the sound files. Made in unity and blender3d.
        Would appreciate any kind of feedback.
      Google Play Link
        A trailer showing basic game-play:
    • By Paszq
      Troglodytes are a playable races in Arpago - they usually don't talk much and most of them lives near water sources.
    • By Paszq
      a Fox in a dungeon :)
    • By Paszq
      Fox Folk is one of 3 playable races in Arpago.
  • Advertisement
  • Advertisement
Sign in to follow this  

C# How To Structure My Rogue-Like Game?

Recommended Posts



So I'm currently working on my first serious project. It's basically a rogue-like combat game that focuses on melee. I want the combat to be a blend of Crawl and Hyper Light Drifter. Anyways, I've been thinking about how to structure the game and cannot organize my ideas. Earlier, I wanted to create a health system for my player. Instead of just adding one to my 'PlayerController' however, I made a generic one with variables and methods that would allow for generic data storage. You'd specify a max health, and then use a method to inflict damage whenever needed. There was also a method to check if the entity died.



I'm not sure if I can structure my whole project this way. So far my only other script is the one controlling player movement/attacks. I'm using Unity, so component-based design is a pretty big thing, Now I have to implement things like an XP system, a generic control for monster AI, and a template to define weapons. How should I approach all this code? How should I structure it? I took a look at this but still don't quite understand what it means.



The entire time I've been making games, I've just been doing my thing. I found out with my last decently sized project that just writing code is not a good idea. Can someone introduce me to some game design/structure principles?



Edited by Ovicior
Add Unity tag.

Share this post

Link to post
Share on other sites

So the problem you might have with the approach you took is being able to guarantee that a specific object has a specific module. So what would happen if a Crate Object was attacked but you hadn't given it a 'health' module? Sure you could go ahead and give it one but when you start entering things like: 0 health 100 damage reduction, into your modules just to avoid things crashing you are hacking your away around an issue.
Like wise, Unity provides functions for searching and checking for components being present:

SomeScript script = gameObject.GetComponent<SomeScript>();
if( script == null ) {
	// error out 

But that, while good coding practice to handle errors, is writing special exception cases for things you should be handling a little more consistently and smoothly. Also if the above code was to appear everywhere an entity tried to attack another entity, you would have a lot of redundant code that is prone to introducing errors.

So my suggestion would be to find some way of generalizing what actions can be taken in game. For example if you dictate something like "ALL objects that are physically present in the game are a subclass of class X" then you can place all your interactions that are possible in class X: hit, push, pickup etc. That way no matter what tries to 'hit' any object, for example, you know that it is an action that can be handled. Now of course you want to have every object act differently when interacted with. So that is where you could use the Strategy Pattern to 'attach' different behaviors to objects. Ask me directly later if you need help with the Strategy Pattern itself.

There are other ways to solve this problem of course, as is the way with programming, but this would be my specific recommendation. 

Share this post

Link to post
Share on other sites

It helps me a lot to think about everything in the game as an object, and then understand the concepts beyond gameobject hierchys and Interfaces(like the C# term not the User inteface one)

Everything in your game will likely be a gameobject, so you should create a gameobject prefab.

Anytime you update your GameObject prefab, those changes will happen globally to any prefabs using the GameObject prefab.

Then think about the people in your game world, because in my world ALL players/npcs interact with physics. So I built a character prefab.

The character prefab handles ALL environment related interactions.  If I build it right, I can build it once and never look at it again in a best case scenario.

Expand character into 2 new prefabs.

Player and Enemy

Player -> attach Controllers  to move character

Enemy -> Attach AI to move character.


Sorry if my explanation is weird, but the overall idea is think really really hard about your objects and try to make them as versatile as possible and slowly expand.  If you run into a physics problem 8 months into the development process, you don't want to have to look through 152 different objects with physics attached to them, you just want to try to fix 1.

Don't be afraid to write, and if you study UML that is not a bad place to start either.




Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this  

  • Advertisement