HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Spawn v4.0 Development

09-26-2009, 04:48 AM#1
Nestharus
What Previous Versions Had-
Spawn 1.0-
The ability to make any object mimic any other object, including units mimicing items
The ability to lend and borrow bases and spawns up to any degree
Easily trade spawns, etc
Spawn at the handle's x and y coordinates

Spawn 2.0
API Improvements and many performance enhancements

Spawn 3.0
Relative Spawning (spawn relative to x, y, and facing of handle and base spawn slot)
More performance improvements
Improved mimicing

Advanced Data Attachment
-Attachment Archiving
-Multi Data Attachment
-3 Levels of Data Attachment All With Multiple Attachments

Extensibility-
It uses a combination of interfaces and structs so that any type of variable or set of data can be used-
Collapse JASS:
library MyHandle
    globals
        private unit array u
    endglobals

    public struct Unit extends Handle
        //sets up u and makes the getters and sets of the handle point to the unit array
        //and use unit getters/setters (SetUnitX and GetUnitX for example)
    endstruct
endlibrary

Flexibility-
Contains many delegates so that pieces of objects can be put together to create a full object. These pieces can all be changed at a whim!

Just to name a few-
Base- modifiers, custom method injections
Spawn- modifiers, algorithms, custom method injections, creation

Advanced Data Manipulation-
Cloning, Mimicing, trading between large sets of data, and so forth all with very simple calls!

Custom Data Attachment On Top Of Spawn's Architecture-
All Handles, Bases, and Spawns may be used as ids for attaching data in an array-
myArray[handle] = myData

For validation, all handles, bases, and spawns include an id that stays unique for the entire game. They also include a mimicId that stays unique for
entire game. The reason for the id is because struct ids get recycled-

Collapse JASS:
if handle.id == myId[handle] then //make sure it's the same handle and that it's still in its state
    set myData[handle] = data
endif

The mimic id can be used if you only wanted to attach data to something for a specific instance of a mimic

Advanced Data Production so that Produced Data can be relative to any other piece of data up the tree-
Spawn Objects can produce any data you want. They use everything you plugged into them and then pass all of the data into a method you
write yourself.

Parameters: spawn, player, typeId, x, y, z, facing

The Spawn calls your function multiple times, so all you have to worry about is making the type, Spawn does the rest =).
Collapse JASS:
local unit u = CreateUnit(player, typeId, x, y, facing)
call SetUnitFlyHeight(u, z, z*10)

JASS Description

Design Upgrades-
onBaseAdd/onBaseRemove
onSpawnAdd/onSpawnRemove
Modifier Object

UML Guide
Eclipse

ERD Guide Part 1
ERD Guide Part 2
MySQL Workbench

Progress-
1. Use Chart
2. Initial Class Chart
3. Sequence Diagram and map out the API
4. Write Spawn 4.0
5. Write out manual using the charts and API (very technical and in-depth) (for designers)
6. Release 4.0 as a beta and get feedback
7. Work on 4.1 if any features are requested or any bugs are found
8. Write a guide (for users)

MySQL Workbench File
Spawn ERD