Deciding the game will be a strategy game, either Real time or turn based.

Real time

  • Recording each pixel for information
    • Record it’s X and Y so it can passed to a class that deal with all information.
      • deciding Range of X and Range of Y so Building does not build on top of each other
      • if Units is in range of attack
    • Record it’s health and damage dealt
      • Passing health information to display
      • deleting unit if negative or zero
  • Path Finding
    • Fastest way
      • diagonal is always shortest
        •  When unit is selected, entering movement mode, after mouse is click, record mouse X and Y and store them, unit X and Y , if X or Y have already reach is mouse recorded location, stop increase X or Y, but other will still increase until is reach the record.
  • Information Record for units and building (Two unis does not overlaps)
    • If in range of a unit/building, mouse will return null for unit movement.
  • Information Passing(How  Damage and position of unit is done)
    • If with in unit attack range, and selected unit is able to attack, int X and attack have cool down.
    • if not, record unit that user wants attack location(X,Y), set that as movement point, move until is in range of attack

Turn Base

  • Block record ( this takes care 4 things in Real  time)
    • Each Block store same type information.
    • If block already have Building can not be built another building.
    • Units can stack, which mean there have to be an int in every block. (Joe)
    • when attack, the value in that block can decrease.



Turn Base is much Easier and less confusing than Real Time (Joe and I both agree)


The following was decided by me(Yo) and Joe

  • Map is 10 block by 10 block
    • Each block is 100 pix by 100 pix, so map is 1000 by 1000 pix
    • UI will be 1000 by 200 pix, so whole thing is 1000 by 1200 pix
    • Unit is stackble due to small (10×10) Map
  • 4 type of units, (CQC, Range, Siege, Calvary )
    • CQC can only attack with in same block
    • Range can attack with few blocks but can not attack within same block
    • Siege can only attack building and do more damage than CQC and Range (Scraped)
    • Calvary can move though enemy unit while others can’t(Scraped)
  • Tech Tree(Scraped)
    • Enable each class to do other’s job but not good as other class
    • Calvary able move and attack(When move though a unit it gets damage)



Map is 10 x 10 with each block with 100×100 and 200 UI

so map is (1,1000,1200)

Either we doing mouse or an object that is already in the map

For some reason Mouse is just not working, too much error and yells a lot(like woman on her period, Jk)

Going for object on map to decide user wanted action

The object will be refer as Cross

If Cross is in same position of base

It can trigger Building and making Unit UI by press enter

then it will set that UI triggered on, the UI will always running, because if only triggered once, it only check for key press for 1 frame, therefor, UI have to always running and wait for boolean to turn on, or in this case, waiting correct condition to be met and then it will turn boolean true, after UI is being used, triggered next UI while shutting is own to fault prevent Bugs and glitch.

When building is built, or Mine(As this point you can only do Mine)

  • Mine will increase money value after turn, if build finish
    •  Money is dealt with in base class
    • Earning works by
      • base earning is 50
      • Each time turn is end, money increase by amount of Mines times base earning
      • Each time a mine is built it increase Mines value by one
  • int X, every time a  turn ends(Pressing T) it increase by 1, when reach 4 (4th turn after built) it will increase Mines value in Base class by one, then X will set to 50 prevent Mines value keep increase.

Prevention of Building collapse(Joe idea)

  • List(Will be explained later) System
    • When a building is in block, is block building information will set to 1
      • If that information is 1, not building allowed to build




List System(Me and Joe)

  • Making list(Array List) that correspond to each block(Joe and Me)
  • For every block, there is range of X and Y, and every Range of X and Y will identify the the user Cross current block, therefor User will able to select what Unit or Building they trying to modify  (Me)
  •  Unit  Movement(Joe)
    • When unit move, record Cross position as int, then when player wanted to move certain
    • Then get that recorded value  and added to current user Cross Block
    • Delete or set recorded block Unit value to zero
  • Unit Attack(Because combat System is huge part of the game and is major balance issue, here is few idea but we found them to not work and is not in the code yet) (Joe)
    • Version 1
      • for unit, each have  health,  attack, and  armor. For attack, it will be amount of unit*dmg*enemy arrmor then that value will applied to enemy
    • Version 2
      • CQC
        • Each unit 1 heath, therefor there is no health System, During combat
          • If  enemy amount and user amount is 1 to 1 or less 1 to 2,
            • Enemy unit decrease by the amount of user unit
            • User unit takes 1/3 of the damage that they have dealt to themselves
          • if user unit amount is 1 to 2  or less 1 to 3
            • User unit take 1/4 of damage
          • if is 1 to 4 or more
            • Both side do not take damage rather enemy unit will convert in to user unit as a form of surrender.
      • Ranged
        • Does not take the damaged penalty for attacking

As this point, both System has been coded but was scraped as we saw it as unbalanced, so for the demo, it will just get rid of enemy attack if attack is giving.

We also found UI to be glitch, if game speed run slow some will work, and other just wont work, it was working after coded, however after combing both mine and Joe’s code is just stopped working.


Greenfoot : http://www.greenfoot.org/scenarios/19582

Journal https://docs.google.com/document/d/13hEmJNU3I8Kqn2E4PvYMFFy9CDoUwZa65t_PMmmJ5YA/edit

Leave a Reply

Your email address will not be published. Required fields are marked *