Written in C++ and using SDL, The Powder Toy is a desktop version of the classic 'falling sand' physics sandbox, it simulates air pressure and velocity as well as heat.
Go to file
jacksonmj 236ff08da9 Fix some problems noted in http://www.viva64.com/en/b/0298/
I've left some of the less important items, like SearchView.cpp "'then' statement is equivalent to the 'else' statement", and RequestBroker::Request::~Request, because I don't feel like spending a few days entirely rewriting those files at the moment (which is what I'd end up doing if I started fixing minor problems and refactoring...)

GameSave::readOPS - not changed. At some point we may have to move to a larger type for element IDs (probably two or four bytes), but PT_NUM isn't likely to be raised to the maximum value of that type immediately, so this check will be needed then. There should be an elements[partsData[i]].Enabled check in there too, but it might be a bit difficult - I'm not sure how to access a Simulation object from GameSave::readOPS...

Notes on changes:

Graphics::textsize, Element_FRZW::Element_FRZW - typos

Button::Draw - the extra case was originally used to invert the icon (draw it in black instead of in white) when the button was clicked. However, the icon colour is now automatically set depending on the background colour. (Note similar conditions "if(Enabled) { if(isButtonDown || (isTogglable && toggle)) " near the start of the function - same logic but in a different place, setting icon colour indirectly).

Simulation::transform_save - unused redundant function, everything uses GameSave::Transform which does much the same thing.

PreviewView::NotifySaveChanged - should be height==YRES/2, it's checking whether the preview image is the correct size, and resizing it if it isn't.

Element_FWRK::update - no idea why that line was there, even though it was my commit that originally added it...
2014-12-25 17:09:35 +00:00
data fix a few of the most spammy warnings (there are still hundreds of warnings though) 2014-10-23 00:42:13 -04:00
resources Icons for OS X 2012-09-26 14:43:24 +01:00
site_scons/site_tools Very very basic wall rendering for opengl 2012-08-14 23:18:39 -04:00
src Fix some problems noted in http://www.viva64.com/en/b/0298/ 2014-12-25 17:09:35 +00:00
.gitattributes Fix gitattributes file 2012-08-21 13:37:06 +01:00
.gitignore update stamps.def when deleting stamps, missing stamps show up as "error loading save" and can be deleted 2014-11-11 23:48:36 -05:00
generator.py generator.py warns when two elements have the same ID 2014-10-31 01:24:26 -04:00
LICENSE Add missing license file (GPLv3) 2012-05-24 19:01:00 +01:00
README Capitalize Tpt to TPT. 2014-06-18 11:02:41 -07:00
SConscript msvc compiling fixes 2014-09-04 17:21:39 -04:00
SConstruct New graphics api function: getColors, returns r, b, g, and a from a hex color 2014-06-09 16:50:49 -04:00
TODO TODO file 2013-03-21 21:58:36 +00:00

The Powder Toy - June 2014

Get the latest version here: http://powdertoy.co.uk/Download.html

To use online features such as saving, you need to register at: http://powdertoy.co.uk/Register.html


Have you ever wanted to blow something up? Or maybe you always dreamt of operating an atomic power plant? Do you have a will to develop your own CPU? The Powder Toy lets you to do all of these, and even more!

The Powder Toy is a free physics sandbox game, which simulates air pressure and velocity, heat, gravity and a countless number of interactions between different substances! The game provides you with various building materials, liquids, gases and electronic components which can be used to construct complex machines, guns, bombs, realistic terrains and almost anything else. You can then mine them and watch cool explosions, add intricate wirings, play with little stickmen or operate your machine. You can browse and play thousands of different saves made by the community or upload your own - we welcome your creations!

There is a Lua API - you can automate your work or even make plugins for the game. The Powder Toy is free and the source code is distributed under the GNU General Public License, so you can modify the game yourself or help with development. TPT is compiled using scons.


Thanks:
---------------------------------------------------------------------------

Stanislaw K Skowronek - Designed the original
Simon Robertshaw
Skresanov Savely
cracker64
Catelite
Bryan Hoyle
Nathan Cousins
jacksonmj
Felix Wallin
Lieuwe Mosch
Anthony Boot
Matthew "me4502"
MaksProg
jacob1
mniip


Instructions:
---------------------------------------------------------------------------

Click on the elements with the mouse and draw in the field, like in MS Paint. The rest of the game is learning what happens next.


Controls:
---------------------------------------------------------------------------


TAB                      Switch between circle/square/triangle brush
Space                    Pause
Q                        Quit
Esc                      Quit
Z                        Zoom
S                        Save stamp (+ Ctrl when STK2 is out)
L                        Load last saved stamp
K                        Stamp library
1-9                      Set view mode
P / F2                   Save screenshot to .png
E                        Bring up element search
F                        Pause and go to next frame
G                        Increase grid size
Shift + G                Decrease grid size
H                        Show/Hide HUD
Ctrl + H / F1            Show intro text
D / F3                   Debug mode (+ Ctrl when STK2 is out)
I                        Invert Pressure and Velocity map
W                        Toggle gravity modes (+ Ctrl when STK2 is out)
Y                        Toggle air modes
B                        Enter decoration editor menu
Ctrl + B                 Toggle decorations on/off
N                        Toggle Newtonian Gravity on/off
U                        Toggle ambient heat on/off
Ctrl + I                 Install powder toy, for loading saves/stamps by double clicking
~                        Console
=                        Reset pressure and velocity map
Ctrl + =                 Reset Electricity
[                        Decrease brush size
]                        Increase brush size
Alt + [                  Decrease brush size by 1
Alt + ]                  Increase brush size by 1

Ctrl + C/V/X             Copy/Paste/Cut
Ctrl + Z                 Undo
Ctrl + Cursor drag       Rectangle
Shift + Cursor drag      Line
Middle click             Sample element
Alt + Left click         Sample element
Mouse scroll             Change brush size
Ctrl + Mouse scroll      Change vertical brush size
Shift + Mouse scroll     Change horizontal brush size
Shift + R                Horizontal mirror for selected area when pasting stamps
Ctrl + Shift + R         Vertical mirror for selected area when pasting stamps
R                        Rotate selected area counterclockwise when pasting stamps

Only the left Ctrl, Shift, and Alt buttons are enabled to work, not the ones on the right


Command Line:
---------------------------------------------------------------------------

scale:1                  Normal window resolution
scale:2                  Doubled window resolution
kiosk                    Fullscreen mode
proxy:server[:port]      Proxy server to use [Example: proxy:wwwcache.lancs.ac.uk:8080]
open <file>              Opens the file as a stamp or game save
ddir <directory>         Directory used for saving stamps and preferences
ptsave:<save id>#[name]  [Example: ptsave:2198#Destroyable_city_5_wth_metro~dima-gord]