Coder Social home page Coder Social logo

newagepowder's Introduction

newagepowder
============

  Literally The Powder Toy only with a very old version. 


Building
--------

  Linux
  ~~~~~

    http://powdertoy.co.uk/Wiki/W/Compiling_for_Linux.html

    You'll need these packages:
    * libsdl1.2-dev (or 1.n, but not 2.n) 
    * libbz2-dev

    If you're on any system with the APT package manager you can get the 
    packages with this command: 
    % make deps
    ... which expands to 
    % sudo apt-get install libsdl1.2-dev libbz2-dev

    For other package managers, I'll leave finding out the package names 
    (which very often overlap but not always) as an exercise to the reader.

  Windows
  ~~~~~~~

    It's easier if you get MinGW (select the base, msys and C++ packages).

    (Note: chances are your %PATH% won't be updated after the install until
     the next restart so if you're impatient you can use the following: 
     `set PATH=%PATH%;C:\MinGW\bin` command in order to put the MinGW binary
     directory into the search path temporarily)

    You'll have to acquire the same packages: 
    You can get bzip2 within mingw-get
    > mingw-get install mingw32-libbz2 bzip2

    ...but SDL is a trickier business: you'll have to install it yourself.
    http://libsdl.org/release/SDL-devel-1.2.15-mingw32.tar.gz

    You will have to copy this into C:\MinGW\include\ so that it will all be 
    in its own separate SDL directory: C:\MinGW\include\SDL\SDL.h for example. 

    Also it'll include libSDL.a and libSDLmain.a which must be copied into
    C:\MinGW\lib. 

    After all those it should compile cleanly. Running however requires SDL.dll
    which can be acquired here:
    http://libsdl.org/release/SDL-1.2.15-win32.zip
    http://libsdl.org/release/SDL-1.2.15-win32-x64.zip (64-bit) 

    The two can either be placed to any directory on the PATH or into the repo's
    directory itself.

    -----------------

    For Visual Studio (later VS), there's a tutorial for newer TPT versions 
    which will apply quite a lot to the project at hand: 

    Prerequisites: 
    
    * a bunch of Visual Studio .lib files and includes.
      Get them from the TPT++ build guide: https://dl.dropbox.com/u/43784416/PowderToy/Required%20Libraries.zip
      (if the link changes, you'll find the link Required Libraries somewhere)
      http://powdertoy.co.uk/Wiki/W/Compiling_tpt%2B%2B_with_Visual_studio.html

      Shortly and simply extract everything in there into your TPT source 
      folder. Honestly, you'll not need half the things there. But some you will
      and those some are included in there.

    Process:

    1. Open Visual Studio, select 
       File -> New -> New Project from Existing Code...
       and from there select your TPT source folder.
       The project type should be "Windows application project" or similar. 
       Nothing else should be required - press Finish in the wizard.

    2. Keep the "Solution" selected in the Solution Explorer window, then select
       Build -> Configuration Manager. Under the "Active Solution Configuration", 
       select Release. We'll configure this first, you can set up Debug similarly
       later. Note that Debug attaches VS debug libraries which bog up the code.
       It'll be much more useful in debugging via VS though. Close the dialog
       box via OK.

    3. Select Project -> Properties... 
       
      Under Configuration Properties -> General: 
      1. Change the Output Directory optionally to: $(SolutionDir)Build\
      2. Change the Target Name to whatever you want, optionally use 
         $(Configuration) in the name to differentiate between Debug and 
         Release builds.
       
      Under Configuration Properties -> VC++ Directories:
      1. Edit Include Directories to include $(ProjectDir)includes\ 
      2. Edit Library Directories to include $(ProjectDir)Libraries\
         (for a static compile, use Staticlibs)
      Under Configuration Properties -> C/C++:
      1. Under General, select Warning Level and optionally turn off all 
         warnings. The code is terribly littered with them and they might be 
         disorienting.
      2. Under Preprocessor, edit the Preprocessor Definitions variable with 
         the following few defines: 
         X86
         X86_SSE2
         (for a static compile, add the below define: )
         PTW32_STATIC_LIB
      3. Under Code Generation, you can set the Floating Point Model to Fast in
         order to speed up the running time.

      Under Configuration Properties -> Code Generation -> Linker -> Input: 
      1. Edit Additional Dependencies to involve: (note some may be redundant) 
         shell32.lib
         ws2_32.lib
         wsock32.lib
         SDL.lib
         SDLmain.lib
         libbz2.lib
         regex.lib
         pthreadVC2.lib
         (for a static compile, add the below two:)
         winmm.lib
         dxguid.lib

      ... And that's it to make a Visual Studio build file for TPT!
      Hit F7 or click the Play button to build. Errors might not happen now!
       


  OSX
  ~~~

    ....Well we don't really know.
    http://powdertoy.co.uk/Wiki/W/Compiling_for_Mac_OS_X.html
    This guide might help you. Note that you will NOT need Lua, FFTW et al
    to compile. All you'll need is SDL and libbz2.

Font editor???
--------------

  The font editor has been relocated to 
  https://github.com/boxmein/tpt-font-editor . 
  The font.h produced is compatible, yet the program itself is far more
  reasonable to use. Make sure to unpack the current font.h before editing.

Credits
-------

  Originally by Skylark
  This project started by Ristovski, Nibble and boxmein 
  from irc.freenode.net #newagepowder

  Still licensed under the GPL which can be found in ./LICENSE

newagepowder's People

Contributors

ristovski avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.