Jump to content

  • Log In with Google      Sign In   
  • Create Account


Havsmonstret

Member Since 16 Oct 2011
Offline Last Active Yesterday, 08:52 AM
-----

Topics I've Started

Feedback on turn-based combat system

19 May 2013 - 11:22 AM

Hey.

 

I'm thinking a bit about a simple turn-based combat system, nothing fancy but at least something out of the ordinary. It's planned to be implemented in a roguelike game. The game is based around a lower health means greater power mechanic, so the lower your health, the better your character performs. Health can never be recovered, only temporarily fortified.

 

First of all, there is no character stats. You do not have strength, agility or anything that really changes the combat. All weapons inflict the same amount of damage, but they work in different ways. There's four types of weapons; Short weapons, medium weapons, long weapons and ranged weapons.

 

Short weapons can attack any adjacent cell.

iKguiJT.png

 

Medium weapons can attack any adjacent cell and the two cells next to it. It can hit up to 3 opponents.

AsdBi9U.png

 

Long weapons can attack any adjacent cell and the next cell behind it. It can hit up to 2 opponents.

aAcsyVn.png

 

Ranged weapons can attack any cell in the field of view. The first enemy on the projectiles path is hit and does not continue.

0rQSq9w.png

 

 

When you attack something, a random number is generated with normal distribution, with the mean at the base damage for all weapons. The two red lines indicate that everything between them is a hit and everything outside is a miss. These lines depends on the opponents armour class. The lower the armour class, the closer the red lines are to the mean and the harder the opponent is to hit. If the attack is considered a hit, the random number generated is the damage output.

 

ZPfFypy.png

 

The higher the amour class though, the more damage is reduced from the incoming damage.

 

Lets set up a scenario:

GI8wukf.png

The character is using a medium weapon and there's two enemies adjacent to her. She attacks them and one roll is made for each opponent. She hits one but misses the other. Since there was two potential targets, the damage done is halved.

 

Lets say the damage output for the opponent we hit was 10. The damage is halved, so there's 5 damage sent to the opponent. That opponent has a high armour class so the damage is reduced by 3, the damage inflicted on the opponents health is 2.

 

 

Instead of having a lot of different weapons with different damage and magic attributes, the game features power-ups instead. A power-up might heighten the players damage in different ways (changing the mean and standard deviation in the damage roll), or increase the players effective health. You can increase your armour class by using heavier armour, this will of course make you easier to hit but the incoming damage is reduced more. 

 

I'd love to hear your opinions on this idea, does it sound anything like fun? Will the lack or different weapons become dull and boring?


Textures for a tile-based game

02 November 2012 - 03:22 PM

Hello,

I've worked on a tile-based on and off for a while. I have three classes, TileManager, TileLayer and Tile. The first one contains a list of TileLayers and really only handles the layers (add, remove, deactivate etc). The TileLayer contains a 2-dimensional array of Tile. The Tile class is abstract and other classes inherit from it.

Now, the first way I did this was that each class that inherits from the Tile class has a Vector2 which contains the position of its texture in a spritesheet. The TileManager together with the TileLayer class handeled the drawing of the classes. To structure this a little more I now want each tile to have its own Texture2D. And my question is how do I get the Tiles to load the textures on its own?

I don't want any code examples I just want to know in which way you would have done this. Should I pass the ContentManager down to the Tile in order for it to load the texture? Should I have another class (TileManager I suppose) load all the textures and then pass it to the Tiles?

Maybe I shouldn't even go this way and keep the old way? What do you think is the best way to solve this?

Thanks in advance!
Havsmonstret

Disposing of ContentManager increases memory usage

04 June 2012 - 11:24 AM

Hello,

I'm trying to wrap my head around how memory management works in XNA 4.0
I've created a screen management test and when I close a screen, the ContentManager created by that screen is unloaded.
I have used ANTS Memory Manager to look at how the memory usage is altered when I do this, and it gives me some results which makes me scratch my head.

The game starts with loading two textures (435kB and 48,3kB) which puts the usage at about 61MB. Then, when I delete the screen and runs Unload on the ContentManager, the memory usage drops to 56,5MB but instantly after goes up to 64,8MB.
Posted Image

Am I doing something wrong or is this usual for XNA games? Do I have to dispose of everything the ContentManager loads seperatly or do I need to do something more to the ContentManager?

Thanks in advance!

PARTNERS