// SAVING/LOADING: ** NEEDS WORK // needs to do zlib compression * // saving/loading cells * // need to remove char[] from classes // instead, reference read-only table of names with integers // saving/loading method does not save char[] // however, need to save player's name -- so a char[] will have to be saved // saving/loading player // OTHER GAME STATES: **** // need an item and ship displayer (needs more thought before development) * // FU_DISPlAY class, constructed with an FU_ITEM or FU_SHIP * // 3 possible drawings: // small: shows on HUD, shows short name, quality and charge * // medium: shows in item lists, name, type, value, quality etc. // full: shows in detailed item description: lists everything // to draw, give X-Y coordinates and draw type (1-3) * // clickable: * // small: (left click) toggle activation * // medium: (left click) select on list (right click) go to detailed view // large: (left click) select (right click) go to medium view // sell/buy selected items/ships // need questing options // BUGS: // * no time passes when docked // LATEST STUFF TO WORK ON: // work on ship AI // gotta do lots of testing: // testing following/grouping/gaurding of AI (OK) // do they follow through transpaths? // do they follow through cruisers? // do they guard their leader? // do they stay as followers for a decent amount of time? // testing fleeing of miners, travelers, tourists on projectile hits (OK) // testing attacking from police, killers on projectile hits (OK) // testing killers taking on ships of other factions (OK) // AI vs AI attack needs work -- they just go in circles, both dodging constantly // randomly fly away to get distance between two? // testing patrollers return to posts after fleeing (OK) // testing miners killing rocks (OK) // some miners with no weapons can't attack rock? // have to make following (gaurding) AI // make cruisers, travelers be followed often by police etc. // make homing projectiles work (OK) // sensors and shields should take a little energy (OK) // make weapons do item damage (OK) // in weapon generation, items need to have specific type to damage (OK) // populate with all weapons (OK) // AI should never use afterburners when energy is somewhat low (so they can fire etc.) (OK) // shuttles should never be police or miners (OK) // weapons need shield / armor modifiers (OK) // are some AI ships choosing weird transpaths to dock to? (FIXED) // sound effects (get at sounddogs.org?) // does hitting ships cause them to go off transpaths? (OK) // price of ships being selled was wrong (FIXED) // make sure killers/police/miners don't get shuttles (FIXED) // AI would ignore projectile hits if already attacking, even if target was miles away (OK) // new docking AI code (OK) // item spawnage (OK) // ships need to spawn (some, damaged) items on explosion (OK) // AI needs to use strafer engines (OK) // need to improve on missle homing code (BETTER) // have torpedos and missles 'regenerate' (OK) // because right now, a player can 'sell' 1 missle for value of 25 // and, we need to buy complete new weapon missle to replace? // ship attacking AI needs to be improved (OK) // items need to be damaged more (OK) // have item-specific weapons take down activate_tmr ? (OK) // CRASH: selecting a carrier AI ship: (FIXED *I THINK*) // there WAS a cloaked AI shuttle ship on-screen // target info MAY have been showing // used '2' key to auto-select carrier // Error: Access Violation // ships should not create thruster particles when cloaked (OK) // pirate/police generated ships should (most likely) be pirate/police // pirates have slightly different outfit of items (NEEDS WORK) // AI attackers should switch 'attackMode' more often? (OK) // game gets oddly jumpy when many ships in play (FIXED) // do rest of items (OK) // need to do cloaking (OK) // how will AI use cloaking? (OK) // use it while fleeing (OK) // use it sometimes while wandering (e.g. killers) (OK) // sensors and cloaking need proper prices (OK) // what happens to followers/attackers when you buy new ship? (FIXED) // is an objectExists check happening on leader? (FIXED) // CRASH: when loading player saved game (FIXED) // BUG: existing profiles list needs 'trimming' (FIXED) // need to have options for NEW GAME and LOAD GAME even when current game is in play (OK) // BUG: player's updateAction: (OK) // when you attack something, you switch to AI_ACTIOM.ATTACK // but, if you quickly change your target, followers will attack switched target // solution: upon switching target, clear player's AI_ACTION // player death (OK) // BUG: you hit yourself after going thru telegate? (FIXED) // afterburners should use a little more energy? (Made 0.4 -> 0.5) // planet might not exist in starting zone (OK) // need to jetison items (OK) // ships being attacked should run from very near attacker // no, just attack instead (OK) // make "saves", "universe" etc. folders if they don't exist (OK) // add "Install All" button (OK) // improve weapon homing ability (OK) // more ship types should fight back (OK) // newly created ship oddities: (OK) // they like to circle around their spawn point wandering // they should start with full shields / energy (OK) // should we now save floating items in space? (NO!) // ------------------------------------------------------------------------- // armor / sheild / item stats and balancing (TESTING) // higher level carriers / cruisers are too heavy / slow // this must be from too much cargo (REDUCED CARGO) // need more planet, station, rock, projectile, item images (NEED TO GET) // make graphics closer to power-of-2 to clear up (NEEDS WORK) // need to have waypoints (NEEDS IMPLEMENTATION) // work on player statistics (NEEDS WORK) // pirates should aggresively attack faction_diff > 2 (NEEDS TESTING) // need planet / station names (NEEDS WORK) // miners should go grab items more often (NEEDS WORK) // so they pickup the item the rock spawned // add button shortcuts (NEEDS WORK) // jobs jobs jobs // need to "accept" job (OK) // display more info // during docking // during space // need to check for job completion // on destroy // following etc. // object generation... // should have objType as argument // only create 1 planet, station // should we even have rocks? // 'locate missions' shouldn't ask the player to locate then destroy then protect, it should just be locate this, locate that (clay) // all ships / items should clear on dock // garbage collect after clear // waypoints (WORKING) // should allow user to create / remove? // or be job-only? // "Objective Completed" message keeps showing iteself // e.g. floating near protected target after completed // ships should have some 'jobFlag' boolean // when set: // they will never start or stop following // they will never completely leave the 'quest area' // universe files should compress themselves immediately after load // so if game crashes midgame, won't have "data error" // items should not be saved in cells // improve game speed // should be able to cancel job when showingObjectives in HUD // ships / items should be removed when docking (TESTING) // need trimSpaceObjects function // doesn't remove quest objects // jobs / ships / items available on dockables should be saved // save with zone information // ISSUE: empty planets / space stations are being saved // stations / planets get populated with items / ships on dock // if you haven't docked, nothing exists on planet // game is saved this way, and then dockable doesn't create new items / ships // space storms // background grows in color for intensity / type of storm // red: fire, damages armor // blue: ion storm, damages shields // white: emp storm, disables targets / sensors // green: ?? storm, disables / reduces thrusters // purple: space-time storm, teleports / rotates ships // each ship has protection against one storm // FIXED: player credits and other player save information // FIXED: docking item generation on multiple players // FIXED: No more "protect" items jobs (AI would pick them up etc.) // FIXED: completed jobs won't show to be accepted // "follow" jobs need the target ship to start flying randomly when reached // use same trigger system -- triggers ship to start exploring // PROBLEM: quest objects, like planets/stations can overflow zone // if player keeps accepting protect/destroy missons // each time quest activated, items will be created // "protect" jobs should have enemies come to destroy target // when to send attackers? // use a 'trigger' variable // set trigger when near target, set random wandering ships to attack // need some way of NOT setting the Player's AI Action to ATTACKING when // just using friendly modifiers // change the ATTACKING update to activation of weapons, not hitting F key? // BUG: followers don't always dock with you? (FIXED) // problem with good modifying leader // BUG: miners will try to "mine" with bad modifiers! (OKAYish) // what should AI do when attacking planets / stations too? // make bad ETUs do very little armor damage // BUG: followers after transpath travel still stuck on docking (FIXED) // CRASH: no error message (FIXED) // - was on a PROTECT STATION mission // - was trying to use a good modifier on a ship // - two police ships were stuck following each other on-screen // - loaded objects weren't having effectModifier initialized // BUG: should never be able to dock with a quest station/planet (FIXED) // BUG: followers get "stuck" following each other (FIXED) // BUG: rocks are getting incorrect faction rating?? (FIXED) // - zones weren't saving factionIndex (duh!) // BUG: police like to attack miners of same faction? (REPRODUCE?) // BUG: job created items for destruction get incorrect faction (FIXED) // BUG: normal items being generated have no correct factionIndex (FIXED) // using good modifiers should increase your faction with target (OK) // how to apply and manage effects? (OK) // store array of effect amounts in FU_SHIP (OK) // higher usage/level takes more amount away (OK) // amounts taken away in specific functions (OK) // can you apply effects to yourself? (OK) // target yourself, "shoot" good effects (OK) // good modifier adjustments (TESTING) // AI needs to use good modifiers on themselves (OK) // ships with only good modifiers should flee, not attack protect targets (NEEDS TESTING) // AI needs to attack with negative modifiers (OK) // give good modifiers to leaders etc. (OK) // have a seperate key to "shoot" good modifiers (OK) // follow job targets could possibly dock, or be allied with etc. (FIXED) // followers should be of same faction (OK) // killers come and take out follow target! // followers should always have engines! (FIXED) // removed ABANDONDED ship // BUG: cannot select yourself when cloaked! (FIXED) // CRASH: was using 'engine disrupter' modifier on friendly's (FIXED) // probably have to do some stack tracing // should add scope(failure) to all functions (IN PROGRESS) // was AIAction of player was set to NONE // if AI is attacking something other than a ship? // if attacked BY a ship, they should defend against ship, and not continue (OK!) // port holes (OK!) // adding port holes to telegates linked list // still needs all testing // make color variations in different item display borders (OK) // BUG: AI should NOT pickup quest items! (FIXED) // objectholder could use some optimizations (DONE) // use a int counter instead of all those iterBools // array of linked lists instead of multiple lists? // balancing // engines good modifier too short/weak (OK) // shields storm too weak (OK) // engine disrupter too weak (NEEDS TESTING) // weapon disrupter doesn't work? (OK) // mining can be very lucrative (INCREASED ROCK ARMOR) // ship hull weights (NEEDS TESTING) // improve space generation // need more items to possibly create in zones // removal of space friction *OK* // bug in using transpaths *FIXED* // instantly calls "thrust" and stops transpath access // why does thrust get called? // only happens with player, huh // projectile information needs to be changed *FIXED* // non-homing weapons need high acceleration (initial push) // homing weapons should be OK // make sure AI is OK (using transpaths, fighting, mining etc.) *OK* // BUG: AI should never follow someone who is following *FIXED* // weapons: // need "turret" flag *OK* // AI needs to fire "turret" weapons at any angle *OK* // need some turret flag (fire just turrets, fire all, fire non-turrets) // turret (fire bullets in general direction of target automatically) *OK* // BUG: when ship explodes, item float too far too fast *FIXED* // should turners turn more slowly, now that turret's exist? *FIXED* // BUG: engine sounds are terribly buggy // sound effects! *FIXED!?* // BUG: engine sounds *FIXED!?* // sounds only start to play when channels >0 are started // emailed Clay for help // use panning // doppler effect? // BUG: AI ships sometimes incorrectly follow player in opposite direction when joining a middle transpath // need to program AI ships to point themselves in desired direction before docking to transpath *FIXED* // playtesting/balancing // does the levels scale OK? // turning scales TOO SLOW // 1.75 -> 3 *TOO SLOW* // 3 -> 24 :) *OK..? BIT SLOW STILL* // 24 -> 32 *OK* // engine thrust slightly low // OK, might still be a little low.. // weight ranges // BUG: shuttle had no turner (or couldn't turn) at level 7.. too much weight // generally increased/balanced weight limits *TEST* // needs a little more *OK* // prices // weapon prices grow very slowly, why? // made price more dependent on damage *TEST* // player ship should undock at zero speed, random position and rotation *DONE* // soundchannels should have a global volume multiplier *DONE* // BUG: AI likes to orbit around transpaths and telegates *FIXED* // BUG: black hole graphics need better transparent backgrounds *BETTER* // BUG: AI engine sounds carry into the main menu *FIXED* // have only one playChannel for menus // do not process in-space playChannels // BUG: cargo items should not be repaired!! *FIXED* // can you jettison an item, shoot it, pick it backup and see damage? *NOW CAN!* // player should start will maximum utilities *DONE* // better ship graphic replacement for that ugly white ship? *GOOD ENOUGH FOR NOW* // BUG: when switching ships after accepting a job, job is lost! *FIXED* // BALANCE: mining should spawn more goodies *OK->40%* // BUG: AI also orbits pickups *FIXED* // job importance should have an effect on faction adjustment *DONE* // BALANCE: need to reduce high-speed friction! *FIXED* // BUG: faction adjustments are BROKEN *FIXED* // BUG: found still ships near telegate, without graphics! *FIXED* // poorly generated ships! // they have zero shields // do not move or respond // PROBLEM: ships were being generated level 0 *FIXED* // telegates should spin *DONE* // contraband *IN, ONLY DIFF FACTIONS ARE ATTACKED FOR IT* // verify police & pirates get it // should police scan for contraband? // AI fighting should be improved *DONE* // nearby zones should still be level 1 *DONE* // turret weapon prices should be increased *30% increase* // implement newlists *DONE* // for projectiles and particles // make the constructor a seperate function, so freelist allocated things can call // stars should not draw in sensor *DONE* // reduce opacity of space storms *100%->60%* // make the target info bars fill up space better *DONE* // make AI follow you longer *DONE* // BUG: police ship did not stay wandering when he was to be followed // make quest ships not allow patrolling *FIXED* // BUG: waypoint did not get set correctly! *FIXED* // said "new waypoint set", but went to already completed objective // followers to you will not ungroup *OK* // need to start up some documentation! *OK!* // "engine enhancer" modifier should be an agility enhancer // should also improve turning *DONE* // ship generation // make sure items are not generated that you know won't fit // only create weapons up to max_weapons *DONE* // reduce rock health *DONE* // BUG: quest ships shouldn't interfere with other quests! // protect missions call other quest ships into action! *FIXED* // shorten protection jobs *OK* // while increasing the rate of attackers *OK* // tweak job prices *OK* // ship interaction // conversations? // get thanks from killing a ship someone else was attacking? *DONE* // name generation *DONE* // improve sounds *DONE* // grouped ships *DONE* // be able to un-group ships // need more projectile graphics *OK* // make ship sizes more dynamic *OK* // defending stations/ships don't defend very well *OK* // -------------------------- LAST RELEASE ------------------------------ // space rocks spin too fast *OK* // space rock image sizes are not saved? they are huge on cell reload *FIXED* // white ship's graphic is too low-resolution, remove/replace it *REPLACED* // -------------------------- COMPLETED UP TO HERE ---------------------- // playtesting (level scaling) // weapons need to be less balanced.. weapons don't feel different enough module FreeUniverse; private import init.init; private import docked.docked; private import std.stdio; void main() { // Close FreeUniverse even when the program randomly crashes scope(exit) { CloseFreeUniverse(); } if( InitFreeUniverse() == false ) { writefln("Error, quitting."); return -1; } while(1) { arc.io.window.clear(); gameTime.process(); arc.io.input.process(); // handle the current gameState switch( gameState ) { case GAME_STATE.NEW_GAME: gameTime.delay(10); menu.main_menu.DisplayNewGame(); playChannel[SOUND_CHANNELS].process(); break; case GAME_STATE.LOAD_GAME: gameTime.delay(10); menu.main_menu.DisplayLoadGame(); playChannel[SOUND_CHANNELS].process(); break; case GAME_STATE.MAIN_MENU: gameTime.delay(30); menu.main_menu.DisplayMainMenu(); playChannel[SOUND_CHANNELS].process(); break; case GAME_STATE.SPACE: gameTime.delay(17); globalTimer++; selectionMade = false; space.handler.HandleInput(); space.handler.HandleSpaceObjects(); for(int i=0;i