Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Engine refactor (Revolutionary-Games#540)
* Organelle now sets the collision sphere offset and successfully parents its scenenode to the microbe * Fixed remaining forgetting to unparent Ogre::SceneNodes first * Added LoadGameButton code to thrive_menus.txt * Added a update method to thrive_menus.txt.Also yeah i cant seem to call any of the "useful" functions lke FileSystem::FileExists , i can however call the "get" methods for the things i wamt, how odd. * Added ExtraAccess for menu scripts and uncommented load game button setting * Accidentally committed by intro skipping code, whoops * Spawning a microbe now doesn't assert * removed now useless main menu folder * Removed extra debug print * working on load code, added old sound function (commented out to thrive_menus.txt) * Restoring the membrane color yay * Apparently i didn't commit it for some reason * Added loadSaveGame method, made the script call it when loading, of course it will just start a new game right now, (as i need to actually write the save code and the load code for the player microbe separately, but i think i have a pretty good idea as to how to progress, still learning the new engine. * Un-inverting the hex coordinates * fixing a bit of the movement organelles * Fixed the c++ definition of loadSaveGame not matching the angelscript registering String was by value and angelscript called it by reference * Added 2D constraints to stop the cell from falling, some random debugging code * Removed useless file * Changed the second debug cell spawn location * Fixed giving the cells their initial compounds * The player cell can now move forwards out of the camera view * Spinning around automatically works great now * Somewhat working movement and rotation * Made rotation be set directly and attempted to change the physics creation to stop the NaNs but didn't work * Fixing the camera * Added microbe stage intro video, and it is skippable. * Tweaked the microbe intro player to properly set the GUI afterwards and other slight tweaks to it * Changed the background to be slightly larger (this seems to stretch the background texture) * Made the autostart work again and cleaned up some comment in empty block * Movement direction is now maybe a bit better but this also needs a math wizard * Maybe fixed the movement finally * Another test that seems to work the best so far * The movement is now properly fixed But the orientation still uses the direct setting method * Updated setup and added fast(er) script for recompiling just the engine and thrive * I enabled the debug spawning of an additional cell for physics testing * Added a clang format file, which we'll start using at some point * Fixed uninitialized Ogre::Matrix4 use and the cells now collide * Changed the cell physics body creation to be slightly more efficient * Commented out the unused movement code * microbe hud now gets the player's atp but does nothing with it * ATP count is now shown on the compound bars * Removed old cmake things. And updated all of the documentation * Added a new file "setup.as" for the microbe stage tutorial and started working on converting from the lua code * Added info about forking and fixed one invalid code example * Cleaned up some old test code in ThriveGame and made the background back to a fully static plane It now definitely looks better than before * found spawn code, removed comments around function brackets and tabbed in commented out code so its easy to see. * Fixed syntax errors in setup.as and made the setup be called from a single function * Made QuickRecompile pull Leviathan updates * Made the compound panel less blurry * The ATP bar now works * trying to figure out how to spawn things. * Planning in setup.as not sure how register_microbe_components got there, it cna probabbly be delete dthough. * modularized code a bit more * script component registering is in setup.as * Enabling the spawning code in species_system which should have the species spawning instead of setup.as Also fixed using signed index for looping * Put in a basic ai (most of it is commented out). Things almost can spawn * Removed a typo * Tweaks to make the membrane change colour whenever called, and other small c++ side tweaks * The spawn system now creates visible cells but prints tons of errors * Added a Release method to spawn system, which doesn't seem to be really needed * Fixed return type from script spawn system function * Commented out debug spam * The spawned cells now move randomly * Removed more TODO: outputs * Added missing atomic include * Biome angelscript code now gets called * All micobes were defaulting to white, now they get random colours. * The change background material now works * Refactored the debug code a bit in biome.as * Made a hack to fix the cells blinking for a frame at origin. This is caused becase the rendernodeposition is applied before spawn system is ran * Added files for Microbe_editor * Fixed spawn system spawning things at a slight offset from 7 = 0 * Put the really smooth turning back in * Got all compound bars working (Revolutionary-Games#547) * Created tutorial folder inside microbe_stage * Deleted setup and manifest files * Got all other compound bars working * Fixed glucose bar * fixed oxygen bar * Compound cloud system definetly not running * Was trying to get compound clouds to spawn, i failed * removed wrongly implemented compoundcloudsystem code commented where system should be inserted in ruby (though i don't know how to insert it) also added opaqueness randomization for species, and when they split they only change color rarely (this should be actual new clade stuff i think) * Enabled running the compound cloud system * Removed unneeded includes * Deleted old registries that should not be used * The compound cloud planes now spawn. They are invisible and rotated wrong * Trying to get the clouds to show up. The plane orientation is now right but for some reason the texture update fails And it seems that only one of the passes is rendered. Ogre 2.1 might have something to do with that * The oxygen clouds now show up but the repositioning the plane is broken So they jump all over the place * The flagella animation is now applied (but the orientation and material is a bit broken) * Desaturated cells a bit, found a good balance (suggested by nicktehnick) * we now take saturation and multiply it by .75 to mute the colors a bit * The health bar also works now, removed the commented out lua versions of the bars * Free floating organelles now spawn properly and have collisions and stuff all set up. The only issue is that they appear to all be spawning at 0,0,0 despite pos being random. Im sure its a simple to fix issue. * Changed the spawn to use a raw function * fixed positioning of free spawned organelles * gave free floating organelles some physics. * Started redoing the clouds, now they spawn but don't receive any compounds yet. Also I enabled clang format for my editor So expect a lot of changes until everything is formatted that way. Oh and the clouds are probably super broken, but this runs * Trying to figure out why all organelles aren't removed from a microbe * Fixed PlacedOrganelles not being handled when microbe was destroyed * Drawing a debug cloud now works * Some sort of line is spawned but not much else * changed z to y, it appears to have reduced teh cloud size and mad eit less ridicoulous, its still spawning at width, 0 instead of 0,0 though. * it spawns at 0,0 now. * Since the line is no longer needed since its spawning at the right location, removed the weird line * added a comment * fixed m_position in a more permanent way woo, now we can move on to more interetsing things :P * _needsColourUpdate now gets called * Added comments about the coordinate system used in the cloud * Clouds now work somewhat (committing just in case I break it later) * Commented out the spam of "Update colour" * Fixed the timestepping so now it looks a bit better * Trying to get the absorber working again * Some sort of absorption happens around the clouds spawning at origin * Disabled debugging printing * Added code to set the tint of an organelle (currently disabled so it should look the same) * Enabled the tinting and fixed a few other places that used the organelle models without the parameter * Registered vector4 with angelscript alongside constructor, need to register Item::setCustomParameter(const int, Vector4) though now. * removed vector4 stuff that was added earlier (the negien should handle that) added a changeModelTint method * Organelles now get tinted properly * Can now mess with hue saturation and brightness of organelles just like the membrane * Revert "removed vector4 stuff that was added earlier (the negien should handle that) added a changeModelTint method" This reverts commit a48f5bf. * Revert "Organelles now get tinted properly" This reverts commit 6f1fb5a. * Revert "Can now mess with hue saturation and brightness of organelles just like the membrane" This reverts commit 04909db. * Revert "Registered vector4 with angelscript alongside constructor, need to register Item::setCustomParameter(const int, Vector4) though now." This reverts commit c9ce57e. * Updated the one place where sound playing is used * Menu music now plays and never stops * Added copying the engine pdb for better windows debugging, also apparently I forgot to push my script changes... * Updated setup system * Implemented calculateHSLForOrganelle for organelle hue shifting * used proper values and changed method to return a float4 rather then a colour value. * if you comment out setHsb it doesnt crash. * applied hue shifting to the flash color aswell. * i forgot to commit this (it multiplies saturation by two now derp ) * add button click sound effects to main menu * fixed typo hhereylonem noticed * was trying to seperate the playing music code from the playing video code, but since if i do it any other way it plays during the intro video i just gave up and am going to work on microbe sound now, also deleted music player object. * Got ambient sounds working in the microbe stage, also comemnted out main menu music becaus eit annoyed me and mad eit harder to test the microbe stage ambient sounds :P * removed ambient code from setup.as since its working in the angel script now. * The split sound now plays * re-Implemented death sound and toxin sound. * Began implementing differnet sunlights for each biome * COntinue dimplementing biome colours, they now have rgb values and get turned into colourvalues * fixed sound bug, biome.as now calls set sunlight with the new properties. it doesnt appear to be actually changing the colours though, im sure its a simple fix. * hmm, its grabbing all the right values an dlogging them, but set sunlight just isnt working. * Fixed events for new leviathan version * The main menu music now starts after the intro and keeps playing until the menu is hidden and the microbe gui is shown * Fixed the CEGUI event returning wrong type * Moved the Moved the ambienceSounds object to the hud system As it is only used from there and it's a bit questionable as a global variable * Fixed typo * Made the ambient tracks a global constant and added a TODO comment about duplicated code * Refactored the ambient playing code + fixed one bug where microbe audio 2 might have been attempted to be played It doesn't exist * Reformatted ThriveGame with clang format * implemented the proper lighting orientation for biome lighting colours. * some minor biome changes * fixing off-by-one bug * Added physics callback for detecting cells hitting floating organelles * fixed orientation for er golgi and "sometimes" mitochondria. Eg the mitochondria on the main cell is fixed, but not all of the mitochondria are fixed. * Fixing crash when closing in the main menu * fixed orientation for everything except the nucleous. * Fixed all rotations, er and golgi are also fixed, also fixed the nucelous, everything appears to be fixed. * Updated setup to point to new leviathan URL * Fixed building with new Leviathan path name * Made key rebinding by editing ThriveKeybindings.conf possible * Golgi is now rotated correctly, added tints to golgi and er aswell. * Made ambient sound loop that is meant to be played along side the ambient music play properly, its a bit loud though. Player cell is now white instead of the ugly saturated dark purple that didnt fit with the other cells. * Added basic proof of concept prokayotes to the game, and they spawn alongside normal microbes aswell, and are subject to auto-evo. * Revert "Added basic proof of concept prokayotes to the game, and they spawn alongside normal microbes aswell, and are subject to auto-evo." This reverts commit 9cb4ff9. * fixed bug where oxytoxy bacteria never spawned. * Bacteria no longer get AI (bacteria and normal microbe ai should likely be seperate), also species component now has a variable that lets us know if its a prokayote. * Almost fixing the spawn system * Completed the spawn system fix yay * re-implemented sound volume change * re-implemented sound volume change * Disabled the master server check (as it is a long way off) * added 3 new organelles for prokayotes: Respiratory Protein Photosyntehsizing Protein Oxytoxy synthesis protein Bacteria use these organelles only also scaled bacteria down to proper "bacteria" size. * bacteria now spawn in groups of 1-3, its an expensive method so i think we can improve that efficiency a bit. Next i need to clean up the code and make bacteria a subclass of species instead of the way it currently works, and i need to make sure that normal microbes and bacteria dont have access to the same organelles. * bacteria no longer spawn with y values added (that was a stupid mistake) * fixed typo * removed "no ai" log, it has outlived its purpose for now. * made it only queue up a couple entities at once for deleting to reduce lag spikes a bit. * commented out AABB overlap log * set prokayote organelle chances to 0 so euakayotes can't use them, until i have eukaryotes & prokayotes seperated more. * bacteria can now spawn in either line shaped colonies or clump shaped colonies, also increased size of colonies * The flagella material now somewhat works (seems to only show the scene ambient light or be black) * Setting the sunlight to very extreme power seems to make the flagella not appear black anymore * Updated the light setting with the new parameters * Added the place where gamma correction could be enabled for compound clouds But it makes them look much fainter so currently shouldn't be enabled * Commented out cell physics callback printing * Editor button can now be enabled and it calls a function when it is pressed * Removed the converted lua scripts from microbe_stage * GUI now has the event for moving to the editor GUI state update * Removed even more old files that don't need converting. And moved the editor GUI to the right file * Initial automatic conversion of microbe editor (this is most likely broken). Also world switching * Removed the menu skipping I once again committed * Slight tweaks to get the compiler errors about the editor scripts to start rolling in * Removed a bunch more of old files * Working on getting the editor working. Some basic commented out code and switching attemp is in this commit * Going to the editor and coming back works, it even pauses sound. But the editor does nothing * Fixed some newlines in the editor so now they show up * Updated setup to get new fixes * Now runs with latest engine, but it is revolutionary games website simulator * Now just moves straight to the cell stage (GUI doesn't work yet) * Simplifying membrane code a bit using triangle fans * bacteria now start with a spawned component so colonies can be offloaded. * reduced the amount of times the membrane code calls per step (from 50 to 40), which should make things a little less laggy and didnt effect the membrane look at all. * fixed comment * Updated setup to allow running without arguments passed to leviathan setup * Movement now works normally (as far as I can tell, goes with leviathan commit a73a923) * Started on the HTML GUI * Added new method for spawning bacterial colonies since they despawned instantly,turns out their spawn radius number needed to be squared, as in the spawn system it also gets squared. This will also allow us to difffernetiate them better. * Added cellWallComponent which is a subclass of the membrane component, the only difference between the two is the drawMembrane function right now * membrane component destructor is now virtual so derived classes will automatically call it. * made cellwallcomponent override base getMovement method * applied gamma correction and compensated for it by adding more color variety * Properly started on the GUI. Also no longer directly goes to the cell stage * Added symlink creation for directly viewing the thrive GUI from the scripts/gui folder * Added one box that looks like something * Switched the background mesh generation code to the one in leviathan * Removed old files. And reformatted 2 files with clang format * Fixed compiling after merge with latest engine * Removed schemes and other older GUI files that aren't needed as reference for converting * Fixed setup creating recursive symlinks on linux * Added some more buttons and basic foundation for the GUI * The new GUI now has a working quit button * Mild refactoring of bacteria colony spawn code * Revert "Mild refactoring of bacteria colony spawn code" This reverts commit 2e60bc8. Also committed correct code * Gamma correction now enabled properly. * played around with things, ambient either doesnt work or i mad eit too bright. :) * reset biome.as ambient colour code to what it was when i took that awesome screenshot
- Loading branch information