User Tag List

Results 1 to 2 of 2

Thread: OOP Diagram

  1. #1
    Here lies mero. Died by his own dumbassitude.
    Join Date
    May 2011
    Posts
    929
    Mentioned
    102 Post(s)
    Tagged
    2 Thread(s)
    vBActivity - Stats
    Points
    5,527
    Level
    23
    vBActivity - Bars
    Lv. Percent
    13.96%

    OOP Diagram

    With ZC approaching Opensource, I think our first order of business should be to create an object oriented programming diagram containing the classes and what inherits from what. I was thinking Using yEd for this would be best. Thoughts? Link below.
    http://www.yworks.com/en/products/yfiles/yed/

  2. #2
    Cor Blimey! CJC's Avatar
    Join Date
    Dec 2002
    Location
    Fading into the darkness
    Age
    35
    Posts
    1,398
    Mentioned
    150 Post(s)
    Tagged
    6 Thread(s)
    vBActivity - Stats
    Points
    6,621
    Level
    25
    vBActivity - Bars
    Lv. Percent
    1.44%
    Not great with the whole object-oriented scene, but I was thinking that we could simplify the objects themselves and give them boolean properties to determine characteristics (I'm looking at you, WEAPON)!

    Thing
    Has coordinates
    Has Width, Height, and Depth. These establish the hit box.
    Has a function to detect collision and one to toggle it on and off
    Has Directional velocities
    Has a TILE and CSet
    Has Animation Frames
    Has Animation Speed
    Has TileWidth, TileHeight, and TileDepth, which set its visual width and height in multiples of 16 and its layer draw position (TileDepth). Note that these are NOT used in collision detection and they can be adjusted to be different from the Width, Height, and Depth.
    Has a bool 'invisible'
    Has a miscellaneous array

    Combo (Inherits from Thing)
    Has a solidity 3D array which is pixel-by-pixel and assembled based on the size of the combo. When a collision is detected, the game compares the solidity array of two combos with a NOT AND comparison. If any of the overlapping indices return true from such comparison, a collision effect is triggered.
    (The combo's solidity would need an editor just like the tile editor; players could edit the combo with the same tools and 'paint' the various types of solidity onto each index of the combo's collision array)
    Has an array of booleans to assign combo types
    Has an array of booleans to assign inherent flags

    Weapon (Inherits from Thing)
    Has Damage
    Has an array to dictate which factions of enemies it can harm (Link, Guys, Enemies)
    Has a deadstate
    Has an array of flags that it triggers on collision
    Has an array of combo types it triggers on collision

    Guy (Inherits from Combo)
    Has directions and an animation style.
    Has a Health variable which can be set to -1 for invulnerability
    Has an Action array

    Enemy (Inherits from Guy)
    Has a movement pattern
    Has a Hunger rating
    Has a Projectile Type
    Has a Projectile Style
    Uses its miscellaneous array to dictate behaviors
    Has a defense 2D array which takes WEAPONS and constants that dictate how the enemy reacts to the weapon (Knockback, Stun, Shield, Damage Multiplier, CounterWeapon)
    Has an on-hit tribble variable with two values (#of target enemy, # to spawn)
    Has an on-death tribble variable with two values (as above)
    Has an on-timer tribble variable with three values (# of target enemy, # to spawn, Timer duration)

    Link (Inherits from Guy)
    Has button input bools
    Has a Magic variable
    Has counter variables
    Has an owned item array


    I know this doesn't cover everything and I've even missed features that some of these objects need to have. It's just a start to help other people come up with a better diagram.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
About us
Armageddon Games is a game development group founded in 1997. We are extremely passionate about our work and our inspirations are mostly drawn from games of the 8-bit and 16-bit era.
Social