The Powder Toy, VB6 Edition

  • Videogamer555
    31st Dec 2011 Member 2 Permalink
    Rather than a mod using VC++ source, I'm starting from the ground up writing the TPT engine in Visual Basic 6. This is to correct bugs that have plauged the official VC++ version (such as things burning faster in one direction or C-4 exploding in one direction but just burning fast in another direction). Those bugs are so much based in the current code of the TPT engine that the developers are afraid to mess with the code for fear of breaking the whole thing (or at the very least to avoid reprogramming every element to work in the new engine).

    I have this in the "Powder Toy Mods" section only because it is about a non-official version of TPT, not because it uses any of the original VC++ programming (typically what a mod is), because I can guaranty that not a single line of programming was copied out of the VC++ source and converted to VB6. I'm literally starting from scratch to make an improved TPT engine. I don't even have temperature in it (wood is burned by contact with fire through direct programming, not because fire is programmed to make heat or because wood is programmed to burn in response to heat). I did however carry over the 4-letter naming convention of TPT. There are 3 elements currently. METL, WOOD, FIRE. METL is a solid which doesn't respond to FIRE. WOOD is a solid which burns when in contact with FIRE, and FIRE is used to make WOOD burn. I have no gravity (or anything for that matter that is a powder or liquid which should fall in gravity). I have no air pressure/velocity. As I said, I'm working from the ground up, and have yet to program those effects in. I'm considering trying a 1x1 pixel block size for air calculations when I finally get around to it.

    The current play-area size is 256x256 because this is a reasonable size for testing, and it doesn't go too slow (VB6 sucks for making 640x480 live rendered images at any reasonable frame rate).

    Oh, and I'm pretty sure my numerical values for the elements are nothing like those used in TPT. So even if I could duplicate the save stamp feature (something that is still VERY FAR OFF in this program's development), I'm certain that the lack of matching numerical index values for the different elements will render my saves incompatible with the official version.

    Here is a zip file that contains both the EXE file and the source code.
    http://www.mediafire.com/?2sv6b9geee0yjj5
  • jenn4
    31st Dec 2011 Member 0 Permalink
    Why VB6? Why VB at all? Why MediaFire?

    It's pretty nice start, but how do I change brush size. That box doesn't work by writing.
  • Videogamer555
    31st Dec 2011 Member 0 Permalink
    Box is for display only. Use the same keys as in TPT to make it work. ] = increase size. [ = decrease size.
  • jenn4
    31st Dec 2011 Member 0 Permalink
  • Dragonfree97
    31st Dec 2011 Member 0 Permalink
    Bug: If you draw over METL with FIRE, the METL is deleted
  • Videogamer555
    31st Dec 2011 Member 0 Permalink

    Dragonfree97:

    Bug: If you draw over METL with FIRE, the METL is deleted

    Actually that's how my version of TPT engine works. You don't have to erase an element before putting another element in place. Instead you just draw the element you want to replace the other element on top of the other element and it replaces it.
  • Turban-of-Terror
    31st Dec 2011 Member 0 Permalink
    "Russian voice" uhhh sounds very effective.... I'm not sure why a different system would effect the end result of a modified version of TPT, then again I know nothing about coding whatsoever. Can someone explain the relevance of it?

    If anyone trys to redirect me to "the search bar" I am going to strangle you and slowly explain to you how I have done that several times, each being futile attempts.
  • keperitan
    31st Dec 2011 Member 0 Permalink
    @Videogamer555 (View Post)
    I'm too lazy to find the rest, but here are the numbers for the first 30 elements in order:

    1.dust
    2.watr
    3.oil
    4.fire
    5.stne
    6.lava
    7.gun
    8.nitr
    9.clne
    10.gas
    11.c-4
    12.goo
    13.ice
    14.metl
    15.sprk
    16.snow
    17.wood
    18.neut
    19.plut
    20.plnt
    21.acid
    22.void
    23.wtrv
    24.cnct
    25.dstw
    26.salt
    27.sltw
    28.dmnd
    29.bmtl
    30.brmt

    Method used:
    Create PIPE. Change TMP value in increments on 1. Hover mouse over pipe. See what it says, pipe with what. This is possible since pipe uses tmp to store element type AND displays the type of element in an easy to see way.
  • mniip
    31st Dec 2011 Developer 0 Permalink
    ehm, i dont think original powdertoy used any component, i mean REMOVE THOS BUTTONZ
  • ArtMaster
    31st Dec 2011 Banned 0 Permalink
    This post is hidden because the user is banned