Note that there are some explanatory texts on larger screens.

plurals
  1. PORelation to C# classes in asp.net mvc
    primarykey
    data
    text
    <p>I am coding a simple web based RPG to learn to program ASP.NET MVC. When I come to the point of spells/effects I have some basic design questions. Because spells/effects work in so many different ways that it would be impractical to define models to handle spells/effects. I could make simple spells/effects so they could fit nicely in a table, but I am more interested in better functionality. </p> <p>My question is how to do this best with MVC?</p> <p>Should I make a controller and a view model for every spell/effects or should I just define some basic C# classes to handle spells/effects and then call them from "within MVC"? (in case of a spell activating an effect I think it would be bad design to make controllers that call each other with HTTP calls, so does that not mean It need to be C# classes) </p> <p>How do I make a reference to a controller or class (So I can link my spells to my Characters)? </p> <p>I am sorry that this question is a bit vague, and that is probably also why I where not able to find any resources on this. But hope you are able to help me. </p> <p>More details about the game (If you need this to answer the question): Turn based hack'n'slash, battles will be on a 2D map and spells will usually need different information from this map. </p> <p>Spells could be like: Chain lightning where damage and amount of jumps is based on the casters INT, passive effects, summons, "aktivation on hit" effects, a chain of effects that calls each other, "on death"-effects ect. ect. </p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload