Results 1 to 40 of 43

Thread: Demon Arena [Updated April 18th, 2015]

Threaded View

  1. #1

    Thread Starter
    Angel of Code Niya's Avatar
    Join Date
    Nov 2011
    Posts
    9,017

    Demon Arena [Updated April 18th, 2015]



    This is actually a re-writing of a VB6 screen saver I created years ago. You can download the source for that one here. I no longer use VB6 so that one is pretty much stagnant. I've chosen to re-write it VB.Net rather than try to wrangle with that one.

    Simply run the application and click any of the three menu items to add creatures to the Form. The creatures would then engage each other in projectile fights to the death until creatures of only one type remain.

    For now there are only three different creatures but I'll be adding more over time. I'll also be adding new effects, and abilities for the creatures and eventually, sound, just like the VB6 version.

    Additional credit
    • The community members of ZDoom.org for the creation of those sprites.
    • ID Software for the creation of Doom which ZDoom is based on.


    DemonArenaV1.0.0.0 Source.

    Note: You need VS2010 or later to open.

    Update: Version 2.0.0.0

    • Added three new monsters.
    • Added glow effects to projectiles.
    • Added explosive projectiles, explosive physics and area of effect damage.
    • Added multiple attack types to certain monsters. The Creature base class now allows to define multiple attack types for derived monsters.
    • Moved the arena from the Form to a control. Inherits from Control and implements IArena.
    • Added a teleport fog which appears when new monsters are spawned.
    • Added explosion animation when explosive projectiles explode.
    • Added an Anomaly base class for creating simple entities. The teleport fog and explosion inherit from this class.

    Additional credit
    • Jemidiah for helping me with the math that powers some parts of the engine.


    I'll leave the original version up as well since its much simpler in comparison to this one.

    DemonArenaV2.0.0.0 Source.

    Update: Version 2.1.0.0
    • Added two new monsters.
    • Minor code changes.


    Note: This is the last version that can work without XNA.

    DemonArenaV2.1.0.0 Source.

    Update: Version 3.0.0.0
    • Added two new monsters.
    • Added a high performance XNA renderer. It will no longer slow down when there are too many entities in the arena.
    • Added dash defense for some creatures. Implemented in the Creature base class so every creature has the potential to use it.
    • Added dash blur for creatures that are dashing.
    • Added random spawning. This is configurable. You may configure ratios for how much of a particular creature will spawn as well as a duration between spawns.
    • Added NonAnimatedEntity base class which can be used to create entities that have no animation frames. The dash blur is implemented via that class.
    • Both NonAnimatedEntity and Anomaly based entities can fade out. The teleport fog now fades out.


    Additional credit
    • dday9 who's XNA scroll demo showed me how to use XNA to render to a Control as well as how to convert GDI+'s Bitmap to a Texture2D.


    IMPORTANT
    This version utilizes XNA 4.0 so in order to be able to run this in the IDE you would need to install XNA. If you're using Visual Studio 2010 then I recommend you install the XNA Game Studio 4.0. This may not work with Visual Studio versions other than 10. If you're using a later edition of Visual Studio then I recommend installing the Microsoft XNA Framework Redistributable 4.0.

    The redistributable will provide the components but for some reason when you start new projects, the IDE doesn't list the assemblies if you're trying to add references to them in a new project so you cannot develop new XNA applications with just the redistributable. You would need the whole Game Studio package.

    DemonArenaV3.0.0.0 Source.

    Update: Version 4.0.0.0
    • Added a new monster.
    • Monsters now implement the IDemon interface.
    • Added ComplexCreature base class which allows use to define creatures with a great degree of flexibility with respect to their behavior. The Afrits and the DarkCardinal creatures are defined using this base class now.
    • Added the ability to resize the arena on the fly using the "+" or "-" key.


    Note: Some things may be broken in this version. The random spawner hasn't been rewritten to consider ComplexCreature derived monsters so it may not spawn the new monster and the reworked Afrits or it may throw exceptions. It remains untested.

    DemonArenaV4.0.0.0 Source.

    Update: Version 4.1.0.0
    • Added a new monster.
    • Random Spawner now works with ComplexCreature based monsters.
    • Minor code changes such as the addition of a couple ECMD(Entity command) procedures to the ComplexCreature base class in order to facilitate melee type attacks.


    DemonArenaV4.1.0.0 Source.

    Update: Version 5.0.0.0
    • Added two new monsters.
    • All sprites are now rendered with their original aspect ratio.
    • Implemented new entity commands and functions for use in creature definitions.
    • Fixed bug where Lost Souls would repeat their dying frames without dying when caught at the edge of the arena.
    • Implemented global variables for use in creature definitions. It will allow more complex behaviors to be defined. For example, Spirits now swarm a single target at a time.
    • Made a few stat changes to some creatures.
    • Iron Lich, Wizard and Spirit creatures now inherit from the ComplexCreature class.
    • Fixed bug where the application crashes when run on a PC where the graphics hardware is low end.


    DemonArenaV5.0.0.0 Source.

    Update: Version 6.0.0.0
    • Added a ChangeLog text file to the DemonArena project. It would allow me to log changes as I make them. That's why this log is so much more detailed.
    • Increased Dark Cardinal's rocket damage.
    • Added some comments to code in the Arena class.
    • Minor code changes: Altered the EntityCollection class and how its used within the Arena class.
    • Minor code changes: Made collision detection slightly more efficient.
    • Minor code changes: Made XNA renderer slightly more efficient by caching Texture2D objects to Sprite objects instead of doing look-ups based on string keys.
    • Fixed bug where the XNA renderer would crash when the GraphicsDevice was lost. Changing the resolution while the app was running was one such way to cause the crash.
    • Decreased time ArachNorb's takes from preparing an attack to the actual attack.
    • Fixed bug in loop implementations of creature defininition execution where the loop would go one extra iteration.
    • Random spawner's maximum number of spawns per creature changed from 20 to 100.
    • Made PurpleAfrit more formidable. It attacks more frequently, it stays longer in its dashing attack and it selects a new target if it still has dash time instead of stopping. It also has a greater chance of executing the dash attack.
    • GetSprite now performs dictionary look-ups instead of a linear scan when retrieving sprites to render. However, linear look-ups are performed when sprites are requested for the first time.
    • Creature's definition execution engine can now execute multiple states concurrently. This makes more complex creature behavior possible. This is the most significant change of this version.
    • Added entity commands for changing creature alpha value.
    • Entity commands in creature definitions are now executed through the Action class rather than the Delegate class. It would improve performance of the definition execution engine as Invoke is much faster than DynamicInvoke.
    • The Wraith now inherits from the ComplexCreature class. It also uses the new capability of the definition execution engine to execute states in parallel in order to implement its new special ability.
    • Some DefinitionExpression derived classes now implement fields instead of properties since accessing fields are faster. The RenderInfo class also use fields instead now.
    • XNADrawImage now passes Rectangles by reference instead of by value.
    • Removed LINQ filtering when cycling entities in RefreshXNA.
    • Made the selection of targets by creatures more efficient by not recreating a list of potential targets every time a call is made to select a target.
    • The Size property of the ComplexCreature, Creature and Projectile classes were made more efficient by moving scaling calculations out of the property. Scaling is now done only when the entity's sprite has been changed and the value cached to a private field.
    • Changed SpriteBatch sorting mode from Immediate to Deferred. Deferred according to various online sources is supposed to be more efficient in XNA 4.0.

    DemonArenaV6.0.0.0 Source
    Last edited by Niya; Apr 19th, 2015 at 05:33 PM.
    Treeview with NodeAdded/NodesRemoved events | BlinkLabel control | Calculate Permutations | Object Enums | ComboBox with centered items | .Net Internals article(not mine) | Wizard Control | Understanding Multi-Threading | Simple file compression | Demon Arena

    Copy/move files using Windows Shell | I'm not wanted

    C++ programmers will dismiss you as a cretinous simpleton for your inability to keep track of pointers chained 6 levels deep and Java programmers will pillory you for buying into the evils of Microsoft. Meanwhile C# programmers will get paid just a little bit more than you for writing exactly the same code and VB6 programmers will continue to whitter on about "footprints". - FunkyDexter

    There's just no reason to use garbage like InputBox. - jmcilhinney

    The threads I start are Niya and Olaf free zones. No arguing about the benefits of VB6 over .NET here please. Happiness must reign. - yereverluvinuncleber

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width