Readme:
Top Down City - Second public alpha (November 2019)

Discord:	https://discordapp.com/invite/UXmDPzS
Youtube:	https://www.youtube.com/channel/UCxGfOh3ld7Xm-ic3KEMB6iA
Email:		jernej.loknar@gmail.com
Twitter:	https://twitter.com/JernejL
Website:	http://mathpudding.com/ (not yet active)

What i'm trying to make: 
 
A fun top-down game set in a livable city, missions, massive online multiplayer and custom online game mode scripting.
 
A lot of work is still to be done, i'm making a team, you can ask to join. 
 
Second alpha - November 2019 brings over 200 changes since first alpha (13. February 2019), here are the most relevant changes:
	Improved particle effects - brand new graphics effects for explosions, fire, blood, etc.. 
	Map zones with audio zones
	Tanks driving over other vehicles
	improved network nametags
	Better city environment generator
	Big improvements to map editor including text export and import
	vehicle dummies now contain vehicle size so rescaling vehicles is easier, emergency light dummies can now have custom color specified.
	Sprites can now use more tightly packed sprites by using texture atlases
	Blood hemmoraging effects for dead actors, improved and corrected ground decal effects + fadeout effect
	reworked particle effects  they now use multiple radius-effects, this gives more flexibility in how they behave 
	AI pathfinding - player and other actors now find way around vehicles and obstacles.
	Additional sound effects - they might not be noticed quickly but they add a lot to ambient feeling of the game.
	Fixed a lot of crashes
	player actor sfx audio effects
	per-frame-step pause (F6)
	Improvements to how fire effects behave, brand new fire visual effect too
	Memory optimizations
	improved, tweaked melee behavior 
	crosshairs for aiming
	weapon firing recoil
	Weapon projectiles can now pass thru fences, if they are made properly (particle has a flag, the tile material must be correct).
	improved car anti-push behavior greatly
	closest car enter efunctionality - search doors improvements
	initial network termination initial logic, so game will be able to reconnect to server properly
	improvement to traffic AI
	All particle, audio, vehicle.. ident lengths are increased to 8 characters
	map lighting improvement
	Explosions - physical blast effects
	Audio: added driving effect sound support
	rendering speed improvements, fixed stuttering issues.
	fixed shot offsets for animations
	improvement to fps limiter
	networking sync improvements: should sync cars better.
	proper grenade throwwables reload delay
	fixed weapon pellet distribution 
	improved wanted level: you can now hide from copy and can lose wanted level, color and transparency of the wanted level stars also reflects this.
	changes to rotating camera: now it's mouse controlled, mouse controls vehicle turrets when availible. 
	changed mechanism how audio gets updated, which also solves some issues with high speed movement and stereo + proximity fading problems.

Third alpha - March 2020 - Quarantaine edition:

	A lot of reworking in the map renderer, now supports more than 1 quad per block face, various optimizations, tweaks, simplifications and corrections, as consequences more complex map cube shapes were added such as rounded and additional other irregular pieces
	Added feature: jumping over objects and cars (except the big ones)
	Additional debug view mode in map editor (see-thru topmost tiles to see errors)
	AI Threat tracking now supports multiple targets and picks one based on health (in future based on some priority.. )
	Audio sources on actors are now bound there, so that doppler works properly on footsteps
	Avoiding / running away brave sir robin scared logic
	Cars: support tyre oiling, this makes oil slicks work
	Fixed actors sinking occasional crash
	Fixed additional issue with touching objects
	Fixed findfriendlyZ and related actor traffic generation bugs
	Fixed graphical look when actors sink
	Fixed networking particles crash
	Fixed nonsense jump bugs hurting you when touching cars / objects
	Fixed the stuck-falling bug when going around objects
	Fixed traffic for singleplayer games
	Improved AI for wandering, fixed issues with traffic & pedestrians generation
	Improved audio: fixed audio lost crash bugs and improved audio effect gain levels for crash sounds
	Improved info boxes - corrected buttons
	Improved vehicle snap logic on longer vehicles, looks better, feels better and is a better approach (uses vehicle length and max velocity to know when snapping is appropriate)
	Improvements to ground detection functions for actors
	Improvements to handle landmine / ground placed particles, support for active and passive breaking of particles based on proximity
	IsUnderGround improvement: diagonals and irregular blocks are now properly checked so it no longer triggers underground mode when near building edges
	Map editor got some fixes aswell, plus a big upgrade to block shapes editor
	Maps now support version formats and editor will correctly open older maps from now on
	Particles now support collide sound
	Removed self-inflicted damage calling police on you
	Reworked map surface parameters, now it's a distinct parameter for where pedestrians spawn, and the surface type is determined per tile option as set in editor
	Some audio fixes and improvements
	Sorted out walking on slopes under angles (more or less)
	Triggers are again support in scripting
	Underground view improvements, fadein+fadeout effect


Fourth alpha april 2020:

	Improved driving AI
	New, shadow mapping projected realtime shadows
	Fixes to audio footstep effects for some surfaces
	Fixes to nametag rendering, network sync fixes (glitches, crashes, missing updates)
	Unified map, sprite shaders

Fifth alpha may 2020:

	Fixed Nvidia cards not rendering shadows properly.
	Network optimization: no syncing of passenger and vehicle actors when they are not needed
	Network fixes: packet length varies based on data that needs to be synced.
	Big AI improvements, more behaviors, less glitches
	conveyor belts: implemeted for all sorts of objects properly, this still needs to be added to map
	camera now properly moves up and down with your character's height / altitude
	further improvements to AI behaviors:
	- Police AI greately updated and improved
	- Pedestrian fight & threat reaction logic is also improved
	- Enchanched shake effect (adds some roll to camera)
	fixed map area zones
	fixed particle damage not being correctly attributed to shooter
	pickup sound effect
	Improved tank drive-over logic, sparks and excessive damage are fixed, drive-over tracked vehicled only apply damage when moving fast enough
	greatly improved stuck & obstacle checking, which improves traffic a lot
	improved logic: back off if obstacle not moving, this fixes a lot of traffic deadlocks.
	improvements to enter/exit logic - improved code, ability to cancel car exitting
	Added mobile phone pickup
	Moved traffic functions to javascript
	fixed CRC calculation for newton map collision files, now cache properly works - detects version, game loads faster.
	
	EDITORS:
	- A lot of bugs in map editor fixed, map editor also got a great UI makeover
	- road network: node manipulation API for editor greatly improved
	- improved map editor rendering, picking logic
	- map zones: improved rendering of grabber handles, editors makes use of inbetween handles to just extend / add areas
	

Sixth alpha - june 2020:
	Speeded up speed of rendering
	Fixed a lot of memory leaks
	Usual bunch of crash fixes
	Fixed issues with pickup crates
	Improvements to how traffic generation works
	Optimized texture usage for cars
	Corrected and improved GUI design
	Networking: Segmented area syncing, improved / automatic idling, improved / reduced networking traffic
	New debug menu (F3) with all the existing F-key options
	Ability to reload mission script on the fly (F3), this works also in networking mode
	Fixed network sync glitches (animations and vehicle actors suddendly appearing in the car shape, causing issues)
	Display packet sizes in network players menu
	Fixed offscreen arrows for players
	Improvement to performance chart (F4) visualization / rendering
	Shaders: Toggleable bicubic option, Changeable shadow quality, support for sunk effect on underwater cars
	Fixed audio volume control for ambient audio
	improved AI behaviors, added ARMY
	Improved memory management
	Improved car enter / exit actor positioning and animation logic
	Cars: they now burn for 5 seconds before they explode
	Fixed debug newton map option not rendering unless other options were on aswell

Seventh alpha - December 2020 rev. 2398 - 2425

	Added engine ignition sounds and effect for vehicles that were not yet driven.
	LIGHTS and night mode! lights are cast from vehicle headlights, siren lights, car braking lights. 
	Lights are also added to particle effects like fire, explosions.
	Improved logic for vehicle turrets, ability for AI to use vehicle turrets.
	Implemented AI for firemen and medics
	Initial work started on friendly fire / AI groups
	multi-script support improved, support for more than 1 global object injector
	improvement of weapons and particles system, so that multiple parameters can be specified for sounds, breakage and other parameters
	tracking max health of vehicles for correct health bar display
	corrections in weapon struct field names
	ability for particles to speed up into movement direction
	fixed raycasts being counted in performance graph when not in main thread.
	changes to traffic generation, how emergency vehicles are specified per level
	Improvement to car driving AI - pathfinding and more intelligence.
	nvidia rendering driver fix
	prepared stuff for multitextured map
	more debug options
	fixed a few crashes
	fixed some audio issues

BUGS / errata:
	Map editor lights support is unfinished and unreliable, it needs more work (missing parameters for animated rotation, blinking and intensity changes)
	option to choose how camera shakes
	cannot use tab for setting up controls

Future plan: 
	- Improved interiors
	- Dedicated server lobby
	- More map built
	- Actually usable scripting that can make storyline missions possible
	- Even more characters and more animations
 
Instructions:

Press F1 or ESC key: Settings and debug controls - Here you can change key setup and adjust some options.
F2 accesses chat window
TAB in multiplayer (client and server) shows player list.
Press F4 for Performance chart
F5 pause (only in single player mode)
F6 next frame (only in single player mode)


Default controls (change in settings / F1 screen)
Movement: WASD
Strafe: Q, E keys - if you hold right mouse button to aim, you can strafe with left/right control buttons.
Jump/handbrake: space
Special 1: Delete (aim turret, onfoot taunts)
CTRL: attack
Enter key: Enter / exit vehicle
G key: enter vehicle as passenger
Shift, - next, previois weapon

Rotating camera changes how some things work: 
Right mouse click - aim mode (in aim mode you strafe, left click = fires)

To run a dedicated server, run the game, click "start" and press "start server" button in top left corner.
To join a server, start game, enter server ip + port on the welcome window and click connect.
Alternatively, check how the cmd files RunClient.cmd and RunServer.cmd do it via command line.

Supplied editors:

CarEditor.exe	- Car and Object sprite editing tool (.cd32 files)
CityPaint.exe	- Map editor (.cmp files)
TexWorkshop.exe	- Map tiles, gui, various sprites including particles (.gl2d files)
To prepare packed texture atlas sprites for use with texworkshop, use ipartitioner tool.

Other:
Use any tool, but sqlitestudio is recommended to edit game.sqlite3 - this file contains all the game vehicle, weapon, etc.. data.

Credits:

                                  Direct

                             locO_G - Lead animator (Prototype Actor sprites)
                          illspirit - Boom operator (Prototype explosion sprites)
		        Fermi Salim - Water cannon operator (water splash) emisign.blogspot.com
                 Vladislav Andriyuk - Master sprite renderer
		      Flood control - animated water is © Bienenfisch Design bienenfisch.de

This game contains material, which is licensed under Creative Commons Attribution 2.5 License
                   Molotov cocktail - Photo Copyright© by Ohto Kokko
        http://en.wikipedia.org/wiki/Image:Molotovin_cocktail.jpg

This game contains material, which is licensed under Creative Commons Attribution 3.05 License
			https://creativecommons.org/licenses/by/3.0/

Uses audio from:
https://freesound.org/people/DomainHunter/sounds/370324/ Attribution 3.0 Unported (CC BY 3.0)
https://freesound.org/people/DomainHunter/sounds/377250/ Attribution 3.0 Unported (CC BY 3.0)
https://freesound.org/people/mkoenig/sounds/81173/ Attribution 3.0 Unported (CC BY 3.0)
https://freesound.org/people/FatLane/sounds/111671/	Attribution 3.0 Unported (CC BY 3.0)
https://freesound.org/people/InspectorJ/sounds/361546/ Attribution 3.0 Unported (CC BY 3.0)
https://freesound.org/people/klankbeeld/sounds/127863/ Attribution 3.0 Unported (CC BY 3.0)
https://freesound.org/people/Samgd14/sounds/359126/ Attribution 3.0 Unported (CC BY 3.0)
https://freesound.org/people/InspectorJ/sounds/422051/ Attribution 3.0 Unported (CC BY 3.0)
https://freesound.org/people/kwahmah_02/sounds/246332/ Attribution 3.0 Unported (CC BY 3.0)

https://freesound.org/people/sagamusix/sounds/452421/ CC0 1.0 Universal (CC0 1.0) Public Domain Dedication
https://freesound.org/people/PhilllChabbb/sounds/264455/ CC0 1.0 Universal (CC0 1.0) Public Domain Dedication
https://freesound.org/people/Pablobd/sounds/503000/ CC0 1.0 Universal (CC0 1.0) Public Domain Dedication
https://freesound.org/people/snakebarney/sounds/138101/ CC0 1.0 Universal (CC0 1.0) Public Domain Dedication
https://freesound.org/people/apolloaiello/sounds/338355/ CC0 1.0 Universal (CC0 1.0) Public Domain Dedication
https://freesound.org/people/davidou/sounds/88465/ CC0 1.0 Universal (CC0 1.0) Public Domain Dedication
https://freesound.org/people/guitarguy1985/sounds/68999/ CC0 1.0 Universal (CC0 1.0) Public Domain Dedication
https://freesound.org/people/mcpable/sounds/131930/ CC0 1.0 Universal (CC0 1.0) Public Domain Dedication
https://freesound.org/people/mickey1927/sounds/434878/ CC0 1.0 Universal (CC0 1.0) Public Domain Dedication
https://freesound.org/people/ivolipa/sounds/344948/ CC0 1.0 Universal (CC0 1.0) Public Domain Dedication
https://freesound.org/people/Nahlin83/sounds/220424/	CC0 1.0 Universal (CC0 1.0) Public Domain Dedication
https://freesound.org/people/cognito%20perceptu/sounds/121531/	CC0 1.0 Universal (CC0 1.0) Public Domain Dedication
https://freesound.org/people/Walter_Odington/sounds/26216/ CC0 1.0 Universal (CC0 1.0) Public Domain Dedication

Uses audio effects provided by sonnis
	https://sonniss.com/gameaudiogdc19/ 
	UNLIMITED USER LICENSE

The game uses freely availible models from sketchfab.com:

Flamethrower by Charlie Tinley - https://sketchfab.com/Tnkii
	https://sketchfab.com/models/1795a3b46ec24d39a0089b5338de894d
	Creative Commons Attribution
	Author must be credited. Commercial use is allowed.

TODO:

2 Palm Low Poly by RosticOstafi
	https://sketchfab.com/3d-models/2-palm-low-poly-a7a6ed3dac31493d8280e4bc6b1bfd9c
	Creative Commons Attribution
	http://creativecommons.org/licenses/by/4.0/

rocketlauncher by Melvin Stubbe - https://sketchfab.com/MelvinEbbuts
	https://sketchfab.com/models/a53d6716c9c24302a6fdd71ff70a7d63
	Bazooka M20
	This model is free
	Creative Commons Attribution
	Author must be credited. Commercial use is allowed.

machine gun by minghauLoh - https://sketchfab.com/minghau06
	https://sketchfab.com/models/924dea25b1844be6add89aa007196019
	M4A1 sopmod
	This model is free
	Creative Commons Attribution
	Author must be credited. Commercial use is allowed.
	More info

handgun by yarogor - https://sketchfab.com/yarogor
	https://sketchfab.com/models/66fd4a4ffcb64edfac68131c5ff4973c
	Sig Sauer p250
	This model is free
	Creative Commons Attribution
	Author must be credited. Commercial use is allowed.
	More info

army by DenisAlbu - https://sketchfab.com/DenisAlbu
	https://sketchfab.com/models/29883983eddd4808a4f90aec5ca57f16#download
	Rigged and Textured Mid-Poly Soldier
	This model is free
	Creative Commons Attribution-ShareAlike
	Author must be credited. Modified versions must have the same license. Commercial use is allowed.

Hazmat Player V3 by JeffFleetwood - https://sketchfab.com/JeffFleetwood
	https://sketchfab.com/models/567e92036c31406d815e9b5bbaa74b6f
	This model is free
	Creative Commons Attribution
	Author must be credited. Commercial use is allowed.

Uses graphics from https://graphicscrate.com / https://www.productioncrate.com/
	https://graphicscrate.com/hd-download-pages/graphicscrate-scorch-mark-5.html
	https://graphicscrate.com/hd-download-pages/graphicscrate-scorch-mark-2a.html
	https://graphicscrate.com/hd-download-pages/graphicscrate-scorch-mark-10.html
	Fire & SparksSpark Blast Head On
	Action & Horror:Blood ImpactsSlowmo Blood Squib Side 1
	Action & Horror:Blood ImpactsBlood Impact Spray 3
	https://vfx.productioncrate.com/search.html#query=DustSmokeShockwaves&type=dust-smoke : Dust & SmokeShockwave Birds Eye View

Uses graphics:
	https://commons.wikimedia.org/wiki/File:Black-android-phone.svg
	This file is from the Open Clip Art Library, which released it explicitly into the public domain
	https://openclipart.org/share

	https://commons.wikimedia.org/wiki/File:Business_Suitcase_Flat_Icon.svg
	Author: Videoplasty.com
	Business Suitcase Flat Icon.svg from Wikimedia Commons
	License: Creative Commons Attribution-ShareAlike 4.0

Uses Free fx graphics from https://www.actionvfx.com
	https://www.actionvfx.com/collections/free-vfx/
	https://www.actionvfx.com/collections/free-burn-mark-textures-vol-1-stock-footage
	https://www.actionvfx.com/collections/free-fire-sound-fx-stock-footage

Uses IES Lights Pack
	https://leomoon.com/store/shaders/ies-lights-pack/
	Licence: GNU GENERAL PUBLIC LICENSE Version 3, 29 June 2007

https://commons.wikimedia.org/wiki/File:Banana-Single.jpg
	By: Evan-Amos as a part of Vanamo Media
	Licence: Attribution-ShareAlike 3.0 Unported (CC BY-SA 3.0)

https://www.reddit.com/r/ArtefactPorn/comments/aqy4l3/insignia_globus_cruciger_gold_diamonds_pearls/
	globus cruciger
	Rudolf II, Holy Roman Emperor

https://www.premiumbeat.com
	https://www.premiumbeat.com/blog/free-explosion-sfx-vfx-elements/
	explosion & shockwave
	Used in accordance with their usage policy which states: "These SFX and VFX are free to use in any personal or commercial projects".
	
	https://www.premiumbeat.com/blog/free-ambient-background-tracks/
	Ambient background sounds
	Used in accordance with their usage policy which states: "These sound effects are free to use in any personal or commercial projects."

https://blogs.unity3d.com/2016/11/28/free-vfx-image-sequences-flipbooks/
	Free VFX Image Sequences & Flipbooks
	Licenced under CC0 1.0 Universal (CC0 1.0) - Public Domain Dedication license.

https://opengameart.org/content/smoke-aura
	Smoke Aura by Author Beast
	CC0 1.0 Universal (CC0 1.0) - Public Domain Dedication

https://kenney.nl/assets/game-icons, https://kenney.nl/assets/crosshair-pack, https://kenney.nl/assets/particle-pack
	Created by by Kenney Vleugels (Kenney.nl) - https://kenney.nl
	License: (CC0 1.0 Universal) / License (Creative Commons Zero, CC0)

https://opengameart.org/content/trees-and-bushes
	Created by chabull
	License: Attribution 3.0 Unported (CC BY 3.0)


                 This product uses the following third party libraries:

                    Newton Dynamics - Copyright © 2003-2019 Julio Jerez and Alain Suero.
                            PasZlib - Copyright © 1998,1999,2000 by Jacques Nomssi Nzali and contributors.
OpenAL cross platform audio library - Copyright © 2007 by Creative Technology Limited.
                               ENet - MIT License, Copyright (c) 2002-2016 Lee Salzman http://enet.bespin.org/
                    enet-freepascal - MIT License, Copyright by rasberryrabbit
                             SQLite - Public Domain, https://www.sqlite.org/copyright.html
                          JsonTools - GPLv3 License, https://www.getlazarus.org/json/
                     Bicubic shader - by theagentd, source in public domain.

	NO part of this game and included files may ever be distributed or sold for profit.

                        Influental development roles
                               
                              Dave Gravel 

                Influental people that inadvertently made this game happen

                              Big hello to:

                             #liero - HI! :)
                     Stuart Lowndes - Animator (Development Actor sprites)
                    Robert Tuovinen - Development vehicle sprites
                 Michael Mendelsohn - The mistery Gman
                          illspirit - The Good guy.
                           Steve M. - The Traveler.
Dwarf with Axe (gamedev.net forums) - Easy 2d viewport pixel-aligned matrix calculation
           http://www.sulaco.co.za/ - Teaching me OpenGL (site is now defunct)
