Brain Damage
From codeTank
Brain Damage is an Integrated Development Environment (IDE) for programming simple applications and games in Lua. Brain Damage comes embedded with the Brain Damage Library, which adds general purpose and windowing functions.
The latest version of Brain Damage is v1.2, which was released on 1 January, 2008. It has fixed a lot of bugs, and added a bunch of features, mainly dealing with image loading and manipulation.
You can download the v1.2 files here:
- BrainDamage-1.2-LICENSE.txt
- BrainDamage-1.2-hash.txt
- BrainDamage-1.2-src.zip (MSVC++ 6.0)
- BrainDamage-1.2.exe
- Bonus Scripts - Save them, open them in Brain Damage, and run!
- Strife.lua - Read about Strife.lua
- RayCastDemo.lua - Read about RayCastDemo.lua
- StrifeSprites.png (needed for Strife)
- StrifeTiles.png (needed for Strife)
The permanent home for Brain Damage releases is http://codetank.com/damage/.
All files are scanned using Dr. Web immediately after being released to ensure the online versions are 100% free from viruses. You are highly encouraged to scan the files yourself after downloading (before you run the program) just to be safe. While I try my best to ensure Brain Damage doesn't include any viruses, please remember that you are downloading and using Brain Damage at YOUR OWN RISK. Please read the license for more information before downloading.
Contents |
Version History
Unreleased - Next Version
Bug fixes:
- window.setposition and window.createedit do not calculate the same height parameter - ensure that when we set a position with a certain height (or width), it is the same as having that height specified in the creation. Probably client size/window size issues.
- Alpha blending formula looks wrong for alpha values near opaque
Upgrades:
- Visual C++ 6.0 → Visual C++ Express 2008
- Lua 5.1.2 → Lua 5.1.3
- Scintilla 1.75 → Scintilla 1.76
- libpng 1.2.24 → libpng 1.2.25
1 Jan 2008 - v1.2
Bug fixes:
- paint.rectangle and paint.ellipse ignored height parameter, and always drew squares/circles - FIXED
- paint.print does not correctly handle newlines - FIXED
- window.pumpmessages would block even if no windows were open - FIXED
- onmouseout calculated window mouse coordinates incorrectly - FIXED
- CLuaWrapper::GetObjectPointer failed to pass along objectIndex to itself - FIXED
- CLuaWrapper::GetObjectPointer didn't ensure lightuserdata was valid, which could result in rare crashes - FIXED
- oncreate crashes program if it returns false - FIXED
- paint.getpixel was coded, but not exported to Lua - FIXED
- Window's totalwidth and totalheight were not tracked after creation - FIXED
Behavior correction:
- onsizing and onmoving have been rewritten to correct numerous inconsistent and buggy behaviors from previous versions. They should be mostly good now :-).
- oncreate is now called via the object interface, which will check for hooks and onevent just like any other event (old behavior was to treat oncreate as a special case, and not execute hooks or onevent)
- window event handling and hooking is now inheriting the event/hooking functions from the newly added object table
- object.addhook+object.removehook replaces window.addhook+window.removehook, and corrects the mechanism for removing hooks (old behavior would break when removing a hook after a hook before it in it's chain was removed, because the indexing was absolute, and removing the prior hook would alter the correct hook index of hooks after it)
New stuff:
- Used timeBeginPeriod+timeEndPeriod to ensure timing functions have highest resolution available
- Added syncframe for more accurate timer functions
- Added object table, and moved event handling to that table
- Added image table, with loading support for PNG, JPG, and BMP (24/32-bit uncompressed) image formats
- Added input table, with support for mouse, keyboard, and joystick inputs
- Added rgba to handle pixels with alpha values
5 Dec 2007 - v1.1.1
Bug fixes:
- window.hasmessages spelled wrong, and failed to work correctly - FIXED
- popup's not correctly handling multiple newlines - FIXED
Behavior correction:
- paint functions now don't paint borders when border color is false (fill colors had already defaulted to transparent for all non-color values... paint borders default to black, UNLESS the value is false - in which case, the paint border is transparent)
New stuff:
- Added function sleep
- Added function paint.printsize
- Added Window Event onerasebkgnd
Bonus Game Included - Asteroids.lua
3 Dec 2007 - v1.1
Finished renaming project to "Brain Damage", added window.createbutton, window.createedit, and window.createstatic functions, along with some minor bug fixes with the popup code (responsible for alert and friends). Added line marking when the script has an error. Also embedded a manifest file to ensure the program will use Windows XP themes for the common controls.
30 Nov 2007 - v1.0.1
Intermediate release renaming the files from "Kalua" to "Brain Damage". The actual source code and binary hasn't changed - it's simply a renaming of the v1.0 files. The decision to rename "Kalua" to "Brain Damage" was made once I realized there was already a popular Lua-related project named "Kahlua". "Brain Damage" was chosen as a replacement, as a homage to Pink Floyd's Dark Side of the Moon.
26 Nov 2007 - v1.0
Initial Release of Kalua.
Ideas and To Do's
- Implement image to image with image.stretchblit (currently only image to paint implemented)
- Implement paint drawing functions for images too
- DirectX
- Sockets and internet access (with proper security measures in place)
- The other common controls (combo boxes, lists, icons, bitmaps, etc)
- Some way to help promote the idea of making modules
- Better file stuff (mounting zips/rars), and security for file access
- Code folding
- Sound + Midi + FFT + Synths
- Context-sensitive popup help window thingys

