UEZ

[GAME] AUTOITEROIDS v1.019 Build 2016-01-14 Final

55 posts in this topic

#1 ·  Posted (edited)

Here my 1st game ever.

 

A try to remake of the arcade classical 2D game Asteroids® by Atari (1979). :D

 

More information about Asteroids® here or here!

 

Play online here :idea:

 

 

Please don't link to file below directly from other websites!

 

Downloads (2263 previously):  AUTOITEROIDS v1.019 Build 2016-01-14.7z (use e.g. 7-Zip to extract archive)

 

Only compiled version incl. needed files here: <4shared.com> or <MediaFire.com>

 

 

post-29844-1242504010_thumb.png

 

 

 

LEGAL NOTICE:

 

This game is an unoffical clone of the original Asteroids®

game and is not endorsed by the registered trademark

and copyright owners Atari Interactive, Inc.

 

 

 

Short description:

 

AUTOITEROIDS is a remake of the video arcade game released in 1979 by Atari, Inc.

It was one of the most popular and influential games of the Golden Age of Arcade Games.

The player controls a spaceship in an asteroid field which is periodically traversed by flying saucers.

The object of the game is to shoot and destroy asteroids and saucers while not colliding with either,

or being hit by the saucers' counter-fire.

 

 

Keys:

 

ctrl - shoot,

up - thrust,

left - turn left,

right - turn right,

space - hyper jump

 

 

Game details:

 

game is starting with 3 asteroids

every 10.000 points increase of level (among other things amount of asteroids + 1)

every 30.000 points extra live

biggest asteroid = 20 points

medium asteroid = 50 points

smallest asteroid = 100 points

big alien spaceship = 200 points

small alien spaceship = 1000 point

 

 

Credits:

 

Main code: UEZ

Bass UDF: BrettF

Bass DLL: www.un4seen.com

GDI+ font loader code: Yashied

Menu item code: rasim

Sound + sound code modifications: Spiff59

Font: ck! [Freaky Fonts]

GetKeyboardState code: eukalyptus

Atari for the original game concept

AutoIt forum for all the help and the source of knowledge :P

 

Have fun :party:

UEZ

:D

 

 

Change log:

2009-05-16 release of the game AUTOITEROIDS

2009-05-17 thanks to Spiff59 for modification of the sound part -> now the sound is much smoother

2009-05-18 adjusted collision parameters -> now much better collision detection

2009-05-24 added highscore feature and fixed several bugs (RC1)

2009-05-31 pre final version released (only credit intro left)

2009-06-09 some bugs fixed and made some game setting modifications -> game play now smoother; also collision detection adjusted again; credit intro still in building phase :-(

2009-06-11 fixed some wrong game settings and change highscore file format -> now encrypted to avoid highscore manipulation ;-). Old score will be overwritten!

2009-06-13 display of level in GUI title menu was not working properly -> fixed

2009-06-14 released final version but without a credit part (will come later, if I find more time)

2009-06-16 minor: forgot to calculate font size when you change the window resolution (720x480 is optimized for collision detection - other window resolutions may not working properly for collision detection)

2009-06-17 minor: still overlooked font size parameteres and alien spaceship shoot parameters when windows sizes <> 720x480

2009-06-18 minor: some game settings added (will wait a few seconds after all asteroids have been destroyed) and added shadow at Asteroids label in About window

2009-07-01 minor: last update of the game code -> explosion of human spaceship fixed (copy/paste bug), change routine for copy bmp to GUI and added fps display counter

2009-12-21 minor: fixed some small bugs, replaced IsPressed() with WinAPI_GetKeyboardState function (thanks Eukalyptus), added latest Bass.dll, made game play specific modifications and changed code to be compatible with AutoIt v3.3.2.0!

2009-12-29 minor: forgot to undo silly modifications and added faster GDI+ backbuffer technique (thanks to AndyG for the idea)!

2011-04-12 minor: made small modifications, tried some optimizations (it is very hard to remember what I did in the code after a very long time of absence) :)

2011-04-29 minor: GUIRegisterMsg($WM_ERASEBKGND, "WM_ERASEBKGND") caused About window to look awful and added check for aero to place game graphic window to GUI more precise using _WinAPI_BitBlt()

2011-05-13 minor: cleaned up WinAPI display settings and forgot to undo About window settings.

2011-05-31 minor: speeded up game play by adding bitmaps instead of using one _WinAPI_CreateCompatibleBitmap(). I don't know why this is faster :P

2011-06-09 minor: changed FPS code because old code displayed too high FPS values

2012-07-30 minor: changed drawline function from integer to float to avoid wobbling of asteroids and spaceship

2016-01-14 minor: fixed code to run on AutoIt v3.3.14.2 when no highscore exists and changed GDI+ variable

Edited by UEZ
3 people like this

Please don't send me any personal message and ask for support! I will not reply!

Selection of finest graphical examples at Codepen.io

The own fart smells best!
Her 'sikim hıyar' diyene bir avuç tuz alıp koşma!
¯\_(ツ)_/¯

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

REALLY GOOD UEZ!!!

It's just like the real game... movement, sounds, feel-of-control, visuals.

I can even fly through the screen. I used to line up 2 rows of space ships on the pay-to-play game.

I do miss the ability to shoot 4 times in a row though. I used to lay-out a blanket of bullets for the ships.

Can this be added?

Thanks

8)

Edited by Valuater

NEWHeader1.png

Share this post


Link to post
Share on other sites

REALLY GOOD UEZ!!!

It's just like the real game.

I can even fly through the screen. I used to line up 2 rows of space ships on the pay-to-play game.

I do miss the ability to shoot 4 times in a row though. Can this be added?

Thanks

8)

Thanks Valuater.

Yes, you are right - the code is not working properly ($amount_of_shoots_max = 4 is already set) :)

I put it also to my to do list :party:

UEZ


Please don't send me any personal message and ask for support! I will not reply!

Selection of finest graphical examples at Codepen.io

The own fart smells best!
Her 'sikim hıyar' diyene bir avuç tuz alıp koşma!
¯\_(ツ)_/¯

Share this post


Link to post
Share on other sites

Well Done UEZ!!, very nice game, I like the realistic movements

Share this post


Link to post
Share on other sites

Well Done UEZ!!, very nice game, I like the realistic movements

Thanks, the human ship movement was a lot easier than the other parts.

UEZ


Please don't send me any personal message and ask for support! I will not reply!

Selection of finest graphical examples at Codepen.io

The own fart smells best!
Her 'sikim hıyar' diyene bir avuç tuz alıp koşma!
¯\_(ツ)_/¯

Share this post


Link to post
Share on other sites

Amazing! 100% Amazing

Thank you so much lots of great work very much to be learned from the source. An amazing demonstration!


AutoIt changed my life.

Share this post


Link to post
Share on other sites

UEZ, good job!

Posted Image

Thanks.

Amazing! 100% Amazing

Thank you so much lots of great work very much to be learned from the source. An amazing demonstration!

Thanks for the feedback - currently I lost the overview over my code :)

UEZ


Please don't send me any personal message and ask for support! I will not reply!

Selection of finest graphical examples at Codepen.io

The own fart smells best!
Her 'sikim hıyar' diyene bir avuç tuz alıp koşma!
¯\_(ツ)_/¯

Share this post


Link to post
Share on other sites

you should remove bullet limit to make it more authentic


0x616e2069646561206973206c696b652061206d616e20776974686f7574206120626f64792c20746f206669676874206f6e6520697320746f206e657665722077696e2e2e2e2e

Share this post


Link to post
Share on other sites

#10 ·  Posted (edited)

you should remove bullet limit to make it more authentic

I wanted to make it 1:1 as much as possible - keep it simple with all its limitations!

I forgot to implement the explosion of the human space which is not an explosion of 10 pixel but breaks in several parts!

I will implement it in the next release.

UEZ

Edited by UEZ

Please don't send me any personal message and ask for support! I will not reply!

Selection of finest graphical examples at Codepen.io

The own fart smells best!
Her 'sikim hıyar' diyene bir avuç tuz alıp koşma!
¯\_(ツ)_/¯

Share this post


Link to post
Share on other sites

#11 ·  Posted

This is absolutely fantastic!

Kudos, UEZ.

I wonder if this would speed collision detection?

;check space ship for border collision
                $z = $border_limes * $object_scale
                If $x < -$z Then $x = $width + $z
                If $x > $width + $z Then $x = -$z
                If $y < -$z Then $y = $height + $z
                If $y > $height + $z Then $y = -$z

Share this post


Link to post
Share on other sites

#12 ·  Posted (edited)

This is absolutely fantastic!

Kudos, UEZ.

I wonder if this would speed collision detection?

;check space ship for border collision
                    $z = $border_limes * $object_scale
                    If $x < -$z Then $x = $width + $z
                    If $x > $width + $z Then $x = -$z
                    If $y < -$z Then $y = $height + $z
                    If $y > $height + $z Then $y = -$z
Thanks for feedback.

Btw, the check of the border is not the real problem but your are right :)

UEZ

Edited by UEZ

Please don't send me any personal message and ask for support! I will not reply!

Selection of finest graphical examples at Codepen.io

The own fart smells best!
Her 'sikim hıyar' diyene bir avuç tuz alıp koşma!
¯\_(ツ)_/¯

Share this post


Link to post
Share on other sites

#13 ·  Posted

Thanks for feedback.

Btw, the check of the border is not the real problem but your are right :)

UEZ

Yes, I noticed that's not the "collision" that I'd like to see happening more often :party:

That area just jumped out at me. I'm good at cleanup, but all this GDI+stuff is greek to me.

How long ago did you start this?

I just have to say, again, I'm flabberghasted. Extremely impressed.

Share this post


Link to post
Share on other sites

#14 ·  Posted (edited)

Yes, I noticed that's not the "collision" that I'd like to see happening more often :)

That area just jumped out at me. I'm good at cleanup, but all this GDI+stuff is greek to me.

How long ago did you start this?

I just have to say, again, I'm flabberghasted. Extremely impressed.

I started it approx. 2 weeks ago but I had this in mind a long time ago (just dreamt of it).

Btw, how can I set up the music speed using bass.udf (_BASS_ChannelSetAttribute?)? Because the sound of the alien starship is too slow...

Thanks,

UEZ

Edited by UEZ

Please don't send me any personal message and ask for support! I will not reply!

Selection of finest graphical examples at Codepen.io

The own fart smells best!
Her 'sikim hıyar' diyene bir avuç tuz alıp koşma!
¯\_(ツ)_/¯

Share this post


Link to post
Share on other sites

#15 ·  Posted

UEZ this is just totally awesome. Kudos to you my friend. Here comes 5* :)

WBD

Share this post


Link to post
Share on other sites

#16 ·  Posted

UEZ this is just totally awesome. Kudos to you my friend. Here comes 5* :party:

WBD

Posted my 5 stars too! :)

8)


NEWHeader1.png

Share this post


Link to post
Share on other sites

#18 ·  Posted

Way Cool UEZ! Jumpy for me but looks just like the orig....

Share this post


Link to post
Share on other sites

#19 ·  Posted (edited)

The smaller files attached below seem to behave better...

Edit: I also tinkered with the definitions for the alien ship sounds to make them looping, then moved the Play() to the random statement that brings the ship out, so it's only called once. Then I put a ChannelStop in your alien_ship_reset routine. So it only starts the sound once when the ship appears and lets it loop until the ship is gone. Seems to sound real smooth with no pauses. I was playing with the control logic for the thump/thump game sounds too, so better make sure I didn;t screw it up. Anyway, it was easier to attach the changes in the whole file than paste them into this post. (Hope you don't mind me playing with your baby, I think it's pretty cool , and I guess I'm bored).

Edit: Deleted attachments to free up some disk space.

Edited by Spiff59

Share this post


Link to post
Share on other sites

#20 ·  Posted (edited)

The smaller files attached below seem to behave better...

Edit: I also tinkered with the definitions for the alien ship sounds to make them looping, then moved the Play() to the random statement that brings the ship out, so it's only called once. Then I put a ChannelStop in your alien_ship_reset routine. So it only starts the sound once when the ship appears and lets it loop until the ship is gone. Seems to sound real smooth with no pauses. I was playing with the control logic for the thump/thump game sounds too, so better make sure I didn;t screw it up. Anyway, it was easier to attach the changes in the whole file than paste them into this post. (Hope you don't mind me playing with your baby, I think it's pretty cool , and I guess I'm bored).

Thanks Spiff59, the sound is really much smoother. I updated it (1st post)!

UEZ

Edited by UEZ

Please don't send me any personal message and ask for support! I will not reply!

Selection of finest graphical examples at Codepen.io

The own fart smells best!
Her 'sikim hıyar' diyene bir avuç tuz alıp koşma!
¯\_(ツ)_/¯

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now

  • Similar Content

    • spudw2k
      Plasma_kIt
      By spudw2k
      Here's a fun tool I put together.  It's a Plasma sandbox.  More features to come.

      This page was a useful resource for learning about this kind of Plasma implementation.
      Warning! Not Epileptic Friendly (probably)! Use at own Risk!
      I tried to curve the "default/initial" Plasma patterns so they aren't too erratic.  That doesn't mean you can't alter the Plasmas to be more erratic.  If you are sensitive to flashing colors and lights, use due caution.  
      #Region - Includes and Globals #include <ButtonConstants.au3> #include <GUIConstantsEx.au3> #include <ComboConstants.au3> #include <GuiComboBox.au3> #include <SliderConstants.au3> #include <StaticConstants.au3> #include <WindowsConstants.au3> #include <GUIConstantsEx.au3> #include <GDIPlus.au3> #include <Misc.au3> ;#include <Array.au3> Opt("GUIOnEventMode", 1) Local $hDLL = DllOpen("user32.dll") Global Const $iWinMinWidth = @DesktopWidth * .25 Global Const $iWinMinHeight = @DesktopHeight * .25 Global $bIsPlaying = True, $bIsDrawing = False Global $hTimerFPS Global $iRows = 18, $iCols = 18 Global $iDisplayPlasma = 0, $iSelectPlasma = 0 Global $aPlasmaShapes[4] = ["($iX)", "($iY)", "($iX + $iY)", "Sqrt(($iX * $iX) + ($iY * $iY))"] Global $aPlasmas[4][7] = [[0, Random(6, 14, 1), 0, 0, 1, 0, 0], [1, Random(6, 14, 1), 0, 0, 0, 0, 0], [2, Random(8, 16,1 ), 0, 0, 1, 0, 0], [3, Random(8, 16, 1), 0, 0, Random(0,1,1), 0, 0]] ;Sine Wave | Spread | Position | Rotation | Spread Motion | Position Motion | Rotation Motion Global $aPallete[256] Global $aPalleteSettings[3][3] = [[0, 128, 128], [-1.75, 128, 128], [1.75, 128, 128]] ;Position | Spread | Value Global $aPalleteDefaults = $aPalleteSettings Global $iPalleteShift = 0, $bPalleteShift = True, $iPalletShiftDirection = -5 #EndRegion - Includes and Globals #Region - Main GUI Global $aGUI[1] = ["id|hWnd"] Global Enum $hGUI = 1, $idMnuFile, $idMnuFileExit, $idMnuFilePlay, $idMnuOptions, $idMnuOptionsPallete, $idMnuOptionsPalleteShift, $idMnuOptionsEditor, $idMnuOptionsZoom, $idMnuOptionsZoomIn, $idMnuOptionsZoomOut, $iGUILast ReDim $aGUI[$iGUILast] Global Const $sVersion = "0.1" Global Const $sTitle = "Plasma_kIt - Version " & $sVersion $aGUI[$hGUI] = GUICreate($sTitle, $iWinMinWidth, $iWinMinHeight, -1, -1, BitOR($WS_SIZEBOX, $WS_MAXIMIZEBOX, $WS_MINIMIZEBOX)) GUISetOnEvent($GUI_EVENT_CLOSE, "_Exit") $aGUI[$idMnuFile] = GUICtrlCreateMenu("&File") $aGUI[$idMnuFilePlay] = GUICtrlCreateMenuItem("&Pause", $aGUI[$idMnuFile]) GUICtrlSetOnEvent(-1, "_PlayToggle") $aGUI[$idMnuFileExit] = GUICtrlCreateMenuItem("E&xit", $aGUI[$idMnuFile]) GUICtrlSetOnEvent(-1, "_Exit") $aGUI[$idMnuOptions] = GUICtrlCreateMenu("&Options") $aGUI[$idMnuOptionsPallete] = GUICtrlCreateMenuItem("Pallete Mixer", $aGUI[$idMnuOptions]) GUICtrlSetOnEvent(-1, "_GUIPallete_Show") $aGUI[$idMnuOptionsPalleteShift] = GUICtrlCreateMenuItem("Pallete Shift", $aGUI[$idMnuOptions]) GUICtrlSetState(-1, $GUI_CHECKED) GUICtrlSetOnEvent(-1, "_GUIPallete_ShiftToggle") $aGUI[$idMnuOptionsEditor] = GUICtrlCreateMenuItem("Plasma Editor", $aGUI[$idMnuOptions]) GUICtrlSetOnEvent(-1, "_GUIPlasmaEditor_Show") $aGUI[$idMnuOptionsZoom] = GUICtrlCreateMenu("Zoom", $aGUI[$idMnuOptions]) $aGUI[$idMnuOptionsZoomIn] = GUICtrlCreateMenuItem("Zoom In" & @TAB & "+", $aGUI[$idMnuOptionsZoom]) GUICtrlSetOnEvent(-1, "_Zoom") $aGUI[$idMnuOptionsZoomOut] = GUICtrlCreateMenuItem("Zoom Out" & @TAB & "-", $aGUI[$idMnuOptionsZoom]) GUICtrlSetOnEvent(-1, "_Zoom") _GDIPlus_Startup() ;Start GDI+ UDF Global Const $hDC = _WinAPI_GetDC($aGUI[$hGUI]) Global Const $hHBitmap = _WinAPI_CreateCompatibleBitmap($hDC, @DesktopWidth, @DesktopHeight) Global Const $hDC_backbuffer = _WinAPI_CreateCompatibleDC($hDC) Global Const $DC_obj = _WinAPI_SelectObject($hDC_backbuffer, $hHBitmap) $hBackbuffer = _GDIPlus_GraphicsCreateFromHDC($hDC_backbuffer) ;_GDIPlus_GraphicsSetSmoothingMode($hBackbuffer, $GDIP_SMOOTHINGMODE_HIGHQUALITY) ;Sets the graphics object rendering quality (antialiasing) $hBrush = _GDIPlus_BrushCreateSolid(0x00000000) ;Brush for Coloring/Painting LED Pixels Local $aAccelKeys[5][2] = [["{+}", $aGUI[$idMnuOptionsZoomIn]], ["{NUMPADADD}", $aGUI[$idMnuOptionsZoomIn]], ["{-}", $aGUI[$idMnuOptionsZoomOut]], ["{NUMPADSUB}", $aGUI[$idMnuOptionsZoomOut]], ["{pause}", $aGUI[$idMnuFilePlay]]] GUISetAccelerators($aAccelKeys) #EndRegion - Main GUI #Region - Pallete Mixer GUI Global $aGUIPallete[1] = ["id|hWnd"] Global Enum $hGUIPallete = 1, $idSliderRPosition, $idSliderRValue, $idSliderRSpread, $idSliderGPosition, $idSliderGValue, _ $idSliderGSpread, $idSliderBPosition, $idSliderBValue, $idSliderBSpread, $idBtnResetPallete, $iGUIPalleteLast ReDim $aGUIPallete[$iGUIPalleteLast] $aGUIPallete[$hGUIPallete] = GUICreate("Pallete Mixer", 338, 260, -1, -1) GUISetOnEvent($GUI_EVENT_CLOSE, "_GUIPallete_Hide") $aGUIPallete[$idSliderRPosition] = GUICtrlCreateSlider(8, 132, 97, 33, $TBS_ENABLESELRANGE) GUICtrlSetLimit(-1, 20, -20) ;~ GUICtrlSetOnEvent(-1, "_GUIPallete_SettingsChange") $aGUIPallete[$idSliderRValue] = GUICtrlCreateSlider(48, 56, 33, 73, BitOR($TBS_VERT, $TBS_ENABLESELRANGE)) GUICtrlSetLimit(-1, 128, 0) ;~ GUICtrlSetOnEvent(-1, "_GUIPallete_SettingsChange") $aGUIPallete[$idSliderRSpread] = GUICtrlCreateSlider(8, 168, 97, 33, $TBS_ENABLESELRANGE) GUICtrlSetLimit(-1, 24, 2) ;~ GUICtrlSetOnEvent(-1, "_GUIPallete_SettingsChange") $aGUIPallete[$idSliderGPosition] = GUICtrlCreateSlider(120, 132, 97, 33, $TBS_ENABLESELRANGE) GUICtrlSetLimit(-1, 20, -20) ;~ GUICtrlSetOnEvent(-1, "_GUIPallete_SettingsChange") $aGUIPallete[$idSliderGValue] = GUICtrlCreateSlider(160, 56, 33, 73, BitOR($TBS_VERT, $TBS_ENABLESELRANGE)) GUICtrlSetLimit(-1, 128, 0) ;~ GUICtrlSetOnEvent(-1, "_GUIPallete_SettingsChange") $aGUIPallete[$idSliderGSpread] = GUICtrlCreateSlider(120, 168, 97, 33, $TBS_ENABLESELRANGE) GUICtrlSetLimit(-1, 24, 2) ;~ GUICtrlSetOnEvent(-1, "_GUIPallete_SettingsChange") $aGUIPallete[$idSliderBPosition] = GUICtrlCreateSlider(232, 132, 97, 33, $TBS_ENABLESELRANGE) GUICtrlSetLimit(-1, 20, -20) ;~ GUICtrlSetOnEvent(-1, "_GUIPallete_SettingsChange") GUICtrlSetData(-1, 9) $aGUIPallete[$idSliderBValue] = GUICtrlCreateSlider(272, 56, 33, 73, BitOR($TBS_VERT, $TBS_ENABLESELRANGE)) GUICtrlSetLimit(-1, 128, 0) ;~ GUICtrlSetOnEvent(-1, "_GUIPallete_SettingsChange") $aGUIPallete[$idSliderBSpread] = GUICtrlCreateSlider(232, 168, 97, 33, $TBS_ENABLESELRANGE) GUICtrlSetLimit(-1, 24, 2) GUICtrlSetData(-1, 11) ;~ GUICtrlSetOnEvent(-1, "_GUIPallete_SettingsChange") GUICtrlCreateLabel("RED", 46, 200, 30, 20) GUICtrlCreateLabel("GREEN", 150, 200, 38, 20) GUICtrlCreateLabel("BLUE", 268, 200, 30, 20) $aGUIPallete[$idBtnResetPallete] = GUICtrlCreateButton("Reset", 136, 236, 67, 17) GUICtrlSetOnEvent(-1, "_GUIPallete_Reset") GUISetAccelerators($aAccelKeys) Global Const $hDCPallete = _WinAPI_GetDC($aGUIPallete[$hGUIPallete]) Global Const $hHBitmapPallete = _WinAPI_CreateCompatibleBitmap($hDCPallete, 320, 40) Global Const $hDC_backbufferPallete = _WinAPI_CreateCompatibleDC($hDCPallete) Global Const $DC_objPallete = _WinAPI_SelectObject($hDC_backbufferPallete, $hHBitmapPallete) Global Const $hBackbufferPallete = _GDIPlus_GraphicsCreateFromHDC($hDC_backbufferPallete) Global $hBrushPallete = _GDIPlus_BrushCreateSolid(0xFF000000) ;~ _GDIPlus_GraphicsSetSmoothingMode($hBackbuffer, $GDIP_SMOOTHINGMODE_HIGHQUALITY) ;Sets the graphics object rendering quality (antialiasing) _GUIPallete_Update() _GUIPallete_Reset() #EndRegion - Pallete Mixer GUI #Region - Plasma Editor GUI Global $aGUIPlasmaEditor[1] = ["id|hWnd"] Global Enum $hGUIPlasmaEditor = 1, $idCmbPlasmaSelector, $idCmbPlasmaDisplay, $idBtnPlasmaAdd, $idBtnPlasmaDel, $idCmbPlasmaShape, $idSliderPlasmaSpread, $idCmbPlasmaSpread, $idSliderPlasmaRotation, $idCmbPlasmaRotation, $idSliderPlasmaPosition, $idCmbPlasmaPosition, $iGUIPlasmaEditorLast ReDim $aGUIPlasmaEditor[$iGUIPlasmaEditorLast] $aGUIPlasmaEditor[$hGUIPlasmaEditor] = GUICreate("Plasma Editor", 419, 323, -1, -1) GUISetOnEvent($GUI_EVENT_CLOSE, "_GUIPlasmaEditor_Hide") GUICtrlCreateLabel("Display", 16, 8, 95, 17) GUICtrlSetFont(-1, 8, 800, 0, "MS Sans Serif") $aGUIPlasmaEditor[$idCmbPlasmaDisplay] = GUICtrlCreateCombo("", 16, 24, 121, 25, BitOR($CBS_DROPDOWN, $CBS_AUTOHSCROLL)) GUICtrlSetData(-1, "All Combined|Selected Plasma", "All Combined") GUICtrlSetOnEvent(-1, "_GUIPlasmaEditor_PlasmaDisplay") GUICtrlCreateLabel("Selected Plasma", 24, 96, 120, 17) GUICtrlSetFont(-1, 8, 800, 0, "MS Sans Serif") $aGUIPlasmaEditor[$idBtnPlasmaAdd] = GUICtrlCreateButton("Add Plasma", 160, 16, 113, 33) GUICtrlSetOnEvent(-1, "_GUIPlasmaEditor_PlasmaAddRem") GUICtrlSetState(-1, $GUI_DISABLE) $aGUIPlasmaEditor[$idBtnPlasmaDel] = GUICtrlCreateButton("Remove Plasma", 296, 16, 113, 33) GUICtrlSetOnEvent(-1, "_GUIPlasmaEditor_PlasmaAddRem") GUICtrlSetState(-1, $GUI_DISABLE) GUICtrlCreateGroup("Plasma Controls", 8, 64, 401, 249) GUICtrlSetFont(-1, 8, 800, 0, "MS Sans Serif") $aGUIPlasmaEditor[$idCmbPlasmaSelector] = GUICtrlCreateCombo("", 24, 112, 121, 25, BitOR($CBS_DROPDOWN, $CBS_AUTOHSCROLL)) GUICtrlSetData(-1, "Plasma #1|Plasma #2|Plasma #3|Plasma #4", "Plasma #1") GUICtrlSetOnEvent(-1, "_GUIPlasmaEditor_PlasmaSelect") GUICtrlCreateLabel("Shape", 174, 96, 35, 17) $aGUIPlasmaEditor[$idCmbPlasmaShape] = GUICtrlCreateCombo("", 174, 112, 113, 25, BitOR($CBS_DROPDOWN, $CBS_AUTOHSCROLL)) GUICtrlSetData(-1, "Horizontal|Vertical|Diagonal|Circular", "Horizontal") GUICtrlSetOnEvent(-1, "_GUIPlasmaEditor_PlasmaSetShape") GUICtrlCreateLabel("Spread", 24, 145, 38, 17) $aGUIPlasmaEditor[$idSliderPlasmaSpread] = GUICtrlCreateSlider(16, 160, 257, 25, $TBS_FIXEDLENGTH) GUICtrlSetLimit(-1, 255, 5) $aGUIPlasmaEditor[$idCmbPlasmaSpread] = GUICtrlCreateCombo("", 280, 160, 113, 25, BitOR($CBS_DROPDOWN, $CBS_AUTOHSCROLL)) GUICtrlSetData(-1, "Static|Oscillate", "Static") GUICtrlSetOnEvent(-1, "_GUIPlasmaEditor_PlasmaSetSpread") GUICtrlCreateLabel("Rotation", 24, 201, 44, 17) GUICtrlSetState(-1, $GUI_DISABLE) $aGUIPlasmaEditor[$idSliderPlasmaRotation] = GUICtrlCreateSlider(16, 216, 257, 25, $TBS_FIXEDLENGTH) GUICtrlSetState(-1, $GUI_DISABLE) $aGUIPlasmaEditor[$idCmbPlasmaRotation] = GUICtrlCreateCombo("", 280, 216, 113, 25, BitOR($CBS_DROPDOWN, $CBS_AUTOHSCROLL)) GUICtrlSetData(-1, "Static|Oscillate", "Static") GUICtrlSetOnEvent(-1, "_GUIPlasmaEditor_PlasmaSetRotation") GUICtrlSetState(-1, $GUI_DISABLE) GUICtrlCreateLabel("Position", 24, 257, 41, 17) GUICtrlSetState(-1, $GUI_DISABLE) $aGUIPlasmaEditor[$idSliderPlasmaPosition] = GUICtrlCreateSlider(16, 272, 257, 25, $TBS_FIXEDLENGTH) GUICtrlSetLimit(-1, 127, -127) GUICtrlSetState(-1, $GUI_DISABLE) $aGUIPlasmaEditor[$idCmbPlasmaPosition] = GUICtrlCreateCombo("", 280, 272, 113, 25, BitOR($CBS_DROPDOWN, $CBS_AUTOHSCROLL)) GUICtrlSetData(-1, "Static|Oscillate", "Static") GUICtrlSetOnEvent(-1, "_GUIPlasmaEditor_PlasmaSetPosition") GUICtrlSetState(-1, $GUI_DISABLE) GUICtrlCreateGroup("", -99, -99, 1, 1) _GUIPlasmaEditor_PlasmaSettingsLoad($iSelectPlasma) ;_GUIPlasmaEditor_PlasmaControlsLock() GUISetAccelerators($aAccelKeys) #EndRegion - Plasma Editor GUI #Region - Initialization and Main Loop GUIRegisterMsg($WM_GETMINMAXINFO, "_WM_GETMINMAXINFO") GUIRegisterMsg($WM_NOTIFY, "_WM_NOTIFY") GUISetState(@SW_SHOW, $aGUI[$hGUI]) While 1 If $bIsPlaying And Not $bIsDrawing Then _DrawScreen(_RenderPlasma()) Sleep(10) WEnd #EndRegion - Initialization and Main Loop #Region - Main GUI Functions Func _DrawScreen($aPixels) ;If Function called while Drawing Return 0 If $bIsDrawing Then Return 0 ;Set Drawing Status Indictaor $bIsDrawing = True ;Create Timer for Drawing Performance/Duration Local $hTimer = TimerInit() ;Erase Bitmap Graphic _GDIPlus_GraphicsClear($hBackbuffer, 0xFFFFFFFF) ;Capture Client Window Size $aWinClientSize = WinGetClientSize($aGUI[$hGUI]) ;Setup Variables Local $iPixelIndex = 0 Local $iCol = $iCols Local $iRow = $iRows Local $iWidth = $aWinClientSize[0] / $iCol Local $iHeight = $aWinClientSize[1] / $iRow ;Draw Pixel Grid (Top-Left to Bottom Right) For $iY = 0 To $iRow - 1 For $iX = 0 To $iCol - 1 Local $dARGB = $aPixels[$iPixelIndex] ;Set Brush Color _GDIPlus_BrushSetSolidColor($hBrush, $dARGB) ;Draw "Pixel" _GDIPlus_GraphicsFillRect($hBackbuffer, $iX * $iWidth, $iY * $iHeight, $iWidth, $iHeight, $hBrush) ;Increment Pixel Counter $iPixelIndex += 1 If $iPixelIndex = UBound($aPixels) Then $iPixelIndex = 0 Next Next ;Draw Bitmap to Screen _WinAPI_BitBlt($hDC, 0, 0, $aWinClientSize[0], $aWinClientSize[1], $hDC_backbuffer, 0, 0, $SRCCOPY) ;blit drawn bitmap to GUI ;FPS Counter $hTimer = TimerDiff($hTimer) ;~ ConsoleWrite("Whole Process time: " & Round($hTimer / 1000, 3) & @CRLF) If $bIsPlaying Then If TimerDiff($hTimerFPS) >= 998 Then Local $iFPS = Round(1000 / $hTimer, 2) WinSetTitle($aGUI[$hGUI], "", $sTitle & " (" & $iFPS & " FPS)") $hTimerFPS = TimerInit() EndIf Else ;Show FPS in Window Title WinSetTitle($aGUI[$hGUI], "", $sTitle) EndIf $bIsDrawing = False EndFunc ;==>_DrawScreen Func _Exit() ; Clean up resources _GUIPallete_Exit() GUIDelete($aGUIPallete[$hGUIPallete]) GUIDelete($aGUIPlasmaEditor[$hGUIPlasmaEditor]) GUIDelete($aGUI[$hGUI]) _GDIPlus_BrushDispose($hBrush) _GDIPlus_GraphicsDispose($hBackbuffer) _WinAPI_SelectObject($hDC, $DC_obj) _WinAPI_DeleteObject($hHBitmap) _WinAPI_ReleaseDC($hGUI, $hDC) _GDIPlus_Shutdown() DllClose($hDLL) Exit EndFunc ;==>_Exit Func _PlayToggle() ;Toggle Play State If Not $bIsPlaying Then ;Start Playing $bIsPlaying = True $hTimerFPS = TimerInit() GUICtrlSetData($aGUI[$idMnuFilePlay], "&Pause") Else ;Stop Playing $bIsPlaying = False GUICtrlSetData($aGUI[$idMnuFilePlay], "&Play") EndIf EndFunc ;==>_PlayToggle Func _RenderPlasma() ;Setup Variables Local $aWorkPallete = $aPallete Local $iRow = $iRows Local $iCol = $iCols Local $iGridSize = $iRow * $iCol Local $aPixels[$iGridSize] Local $iIndex = 0 Local $iPlasma = 0 Local $iPlasmas Local $iDisplayPlasmaNumber = $iDisplayPlasma Local $iSine, $iSpread, $iPosition ;Loop Through Pixel Grid and Calculate Plasma(s) For $iY = 0 To $iRow - 1 For $iX = 0 To $iCol - 1 $iPlasmas = 0 If Not $iDisplayPlasmaNumber Then For $iZ = 0 To UBound($aPlasmas) - 1 $iSine = $aPlasmas[$iZ][0] ;Spread Motions If $aPlasmas[$iZ][4] Then $aPlasmas[$iZ][4] += ($aPlasmas[$iZ][1] * 0.00001125) $iSpread = -7*Sin($aPlasmas[$iZ][4])+9 Else $iSpread = $aPlasmas[$iZ][1] EndIf $iPosition = $aPlasmas[$iZ][2] $iPlasma = Execute("128.0 + (128.0 * Sin(" & $aPlasmaShapes[$iSine] & " / " & $iSpread & "))") $iPlasmas += $iPlasma Next Else $iSine = $aPlasmas[$iDisplayPlasmaNumber - 1][0] ;Spread Motions If $aPlasmas[$iDisplayPlasmaNumber - 1][4] Then $aPlasmas[$iDisplayPlasmaNumber - 1][4] += ($aPlasmas[$iDisplayPlasmaNumber - 1][1] * 0.005) $iSpread = Sin($aPlasmas[$iDisplayPlasmaNumber - 1][4])/2 Else $iSpread = $aPlasmas[$iDisplayPlasmaNumber - 1][1] EndIf $iPosition = $aPlasmas[$iDisplayPlasmaNumber - 1][2] ;$iPlasmas = Execute("128.0 + (128.0 * Sin(" & $aPlasmaShapes[$aPlasmas[$iDisplayPlasmaNumber - 1][0]] & " / " & $aPlasmas[$iDisplayPlasmaNumber - 1][1] & ") - " & $aPlasmas[$iDisplayPlasmaNumber - 1][2] & ")") $iPlasmas = Execute("128.0 + (128.0 * Sin(" & $aPlasmaShapes[$iSine] & " / " & $iSpread & "))") EndIf $iPlasma = Int($iPlasmas) ;Account for Pallete Shift $iPlasma += $iPalleteShift ;Wrap Pixel Pallete Color If $iPlasma >= 256 Then Do $iPlasma -= 256 Until $iPlasma < 256 EndIf If $iPlasma <= -1 Then Do $iPlasma += 256 Until $iPlasma > -1 EndIf ;Set Pixel Color value from Pallete $aPixels[$iIndex] = $aWorkPallete[$iPlasma] ;Increment Pixel Index Counter $iIndex += 1 If $iIndex = $iGridSize Then $iIndex = 0 Next Next ;Pallete Shift Logic If $bPalleteShift Then $iPalleteShift += $iPalletShiftDirection If $iPalleteShift >= 256 Then $iPalleteShift = 0 If $iPalleteShift <= -1 Then $iPalleteShift = 255 EndIf Return $aPixels EndFunc ;==>_RenderPlasma Func _WM_GETMINMAXINFO($hwnd, $Msg, $wParam, $lParam) ;Only Control Size of Main GUI If $hwnd <> $aGUI[$hGUI] Then Return Default $tagMaxinfo = DllStructCreate("int;int;int;int;int;int;int;int;int;int", $lParam) DllStructSetData($tagMaxinfo, 7, $iWinMinWidth) ; min X DllStructSetData($tagMaxinfo, 8, $iWinMinHeight) ; min Y Return 0 EndFunc ;==>_WM_GETMINMAXINFO Func _WM_NOTIFY($hwnd, $iMsg, $wParam, $lParam) #forceref $hWnd, $iMsg, $wParam Local $hWndFrom, $iIDFrom, $iCode, $tNMHDR $tNMHDR = DllStructCreate($tagNMHDR, $lParam) $hWndFrom = HWnd(DllStructGetData($tNMHDR, "hWndFrom")) $iIDFrom = DllStructGetData($tNMHDR, "IDFrom") $iCode = DllStructGetData($tNMHDR, "Code") ;Local $tInfo If Not _IsPressed("01", $hDLL) Then Return Default Switch $iIDFrom Case $aGUIPallete[$idSliderRPosition] Switch $iCode Case $NM_CUSTOMDRAW _GUIPallete_ColorSet(0, -1, GUICtrlRead($iIDFrom)) EndSwitch Return 0 Case $aGUIPallete[$idSliderRValue] Switch $iCode Case $NM_CUSTOMDRAW _GUIPallete_ColorSet(0, GUICtrlRead($iIDFrom)) EndSwitch Return 0 Case $aGUIPallete[$idSliderRSpread] Switch $iCode Case $NM_CUSTOMDRAW _GUIPallete_ColorSet(0, -1, "", GUICtrlRead($iIDFrom)) EndSwitch Return 0 Case $aGUIPallete[$idSliderGPosition] Switch $iCode Case $NM_CUSTOMDRAW _GUIPallete_ColorSet(1, -1, GUICtrlRead($iIDFrom)) EndSwitch Return 0 Case $aGUIPallete[$idSliderGValue] Switch $iCode Case $NM_CUSTOMDRAW _GUIPallete_ColorSet(1, GUICtrlRead($iIDFrom)) EndSwitch Return 0 Case $aGUIPallete[$idSliderGSpread] Switch $iCode Case $NM_CUSTOMDRAW _GUIPallete_ColorSet(1, -1, "", GUICtrlRead($iIDFrom)) EndSwitch Return 0 Case $aGUIPallete[$idSliderBPosition] Switch $iCode Case $NM_CUSTOMDRAW _GUIPallete_ColorSet(2, -1, GUICtrlRead($iIDFrom)) EndSwitch Return 0 Case $aGUIPallete[$idSliderBValue] Switch $iCode Case $NM_CUSTOMDRAW _GUIPallete_ColorSet(2, GUICtrlRead($iIDFrom)) EndSwitch Return 0 Case $aGUIPallete[$idSliderBSpread] Switch $iCode Case $NM_CUSTOMDRAW _GUIPallete_ColorSet(2, -1, "", GUICtrlRead($iIDFrom)) EndSwitch Return 0 Case $aGUIPlasmaEditor[$idSliderPlasmaSpread] Switch $iCode Case $NM_CUSTOMDRAW $aPlasmas[$iSelectPlasma][1] = 0.2 * GUICtrlRead($iIDFrom) EndSwitch Return 0 Case $aGUIPlasmaEditor[$idSliderPlasmaRotation] Switch $iCode Case $NM_CUSTOMDRAW EndSwitch Return 0 Case $aGUIPlasmaEditor[$idSliderPlasmaPosition] Switch $iCode Case $NM_CUSTOMDRAW $aPlasmas[$iSelectPlasma - 1][2] = GUICtrlRead($iIDFrom) EndSwitch Return 0 EndSwitch Return 0 EndFunc ;==>_WM_NOTIFY Func _Zoom() Local $bPlaying = $bIsPlaying If $bPlaying Then $bIsPlaying = False Local $iCtrlID = @GUI_CtrlId Switch $iCtrlID Case $aGUI[$idMnuOptionsZoomOut] $iCols += 4 $iRows += 4 If $iCols >= 4 * 20 Then $iCols = 4 * 20 If $iRows >= 4 * 20 Then $iRows = 4 * 20 Case $aGUI[$idMnuOptionsZoomIn] $iCols -= 2 $iRows -= 2 If $iCols <= 4 Then $iCols = 4 If $iRows <= 4 Then $iRows = 4 EndSwitch If $bPlaying Then $bIsPlaying = $bPlaying EndFunc ;==>_Zoom #EndRegion - Main GUI Functions #Region - Pallete Mixer GUI Functions Func _GUIPallete_ColorSet($iColor, $iValue = -1, $iPosition = "", $iSpread = "") If $iValue >= 0 Then $aPalleteSettings[$iColor][2] = (128.0 - $iValue) If $iPosition Then $aPalleteSettings[$iColor][0] = (0.25 * $iPosition) If $iSpread Then $aPalleteSettings[$iColor][1] = ($iSpread ^ 2) Return _GUIPallete_Update() EndFunc ;==>_GUIPallete_ColorSet Func _GUIPallete_Draw() ;Draw Color Pallete in Palette Mixer GUI _GDIPlus_GraphicsClear($hBackbufferPallete, 0xFF000000) Local $iX = 0 For $iColor = 1 To 256 Local $dARGB = $aPallete[$iColor - 1] ;Set Brush Color _GDIPlus_BrushSetSolidColor($hBrushPallete, $dARGB) ;Draw Color Bar to Bitmap _GDIPlus_GraphicsFillRect($hBackbufferPallete, $iX, 0, 320 / 256, 40, $hBrushPallete) $iX += (320 / 256) Next ;Write Bitmap to Screen Return _WinAPI_BitBlt($hDCPallete, 8, 8, 320, 40, $hDC_backbufferPallete, 0, 0, $SRCCOPY) ;blit drawn bitmap to GUI EndFunc ;==>_GUIPallete_Draw Func _GUIPallete_Exit() ; Clean up resources GUIDelete() _GDIPlus_BrushDispose($hBrushPallete) _GDIPlus_GraphicsDispose($hBackbufferPallete) _WinAPI_SelectObject($hDCPallete, $DC_objPallete) _WinAPI_DeleteObject($hHBitmapPallete) _WinAPI_ReleaseDC($aGUIPallete[$hGUIPallete], $hDCPallete) Return 1 EndFunc ;==>_GUIPallete_Exit Func _GUIPallete_Hide() Return GUISetState(@SW_HIDE, $aGUIPallete[$hGUIPallete]) EndFunc ;==>_GUIPallete_Hide Func _GUIPallete_Reset() $aPalleteSettings = $aPalleteDefaults GUICtrlSetData($aGUIPallete[$idSliderRPosition], $aPalleteSettings[0][0] / 0.25) GUICtrlSetData($aGUIPallete[$idSliderRValue], 128 - $aPalleteSettings[0][2]) GUICtrlSetData($aGUIPallete[$idSliderRSpread], Sqrt($aPalleteSettings[0][1])) GUICtrlSetData($aGUIPallete[$idSliderGPosition], $aPalleteSettings[1][0] / 0.25) GUICtrlSetData($aGUIPallete[$idSliderGValue], 128 - $aPalleteSettings[1][2]) GUICtrlSetData($aGUIPallete[$idSliderGSpread], Sqrt($aPalleteSettings[1][1])) GUICtrlSetData($aGUIPallete[$idSliderBPosition], $aPalleteSettings[2][0] / 0.25) GUICtrlSetData($aGUIPallete[$idSliderBValue], 128 - $aPalleteSettings[2][2]) GUICtrlSetData($aGUIPallete[$idSliderBSpread], Sqrt($aPalleteSettings[2][1])) Return _GUIPallete_Update() EndFunc ;==>_GUIPallete_Reset Func _GUIPallete_ShiftToggle() ;Toggle Pallete Shift Local $iCtrlState = GUICtrlRead(@GUI_CtrlId) If BitAND($iCtrlState, $GUI_CHECKED) Then ;Disable PalleteShift $bPalleteShift = False GUICtrlSetState(@GUI_CtrlId, $GUI_UNCHECKED) Else ;Enable PalleteShift $bPalleteShift = True GUICtrlSetState(@GUI_CtrlId, $GUI_CHECKED) EndIf EndFunc ;==>_GUIPallete_ShiftToggle Func _GUIPallete_Show() GUISetState(@SW_SHOW, $aGUIPallete[$hGUIPallete]) _GUIPallete_Draw() EndFunc ;==>_GUIPallete_Show Func _GUIPallete_Update() ;Re-Calculate Work Color Pallete For $iStep = 0 To 255 Local $iR = Int($aPalleteSettings[0][2] + ($aPalleteSettings[0][2] * Sin((3.1415 * $iStep / $aPalleteSettings[0][1]) - $aPalleteSettings[0][0]))) Local $iG = Int($aPalleteSettings[1][2] + ($aPalleteSettings[1][2] * Sin((3.1415 * $iStep / $aPalleteSettings[1][1]) - $aPalleteSettings[1][0]))) Local $iB = Int($aPalleteSettings[2][2] + ($aPalleteSettings[2][2] * Sin((3.1415 * $iStep / $aPalleteSettings[2][1]) - $aPalleteSettings[2][0]))) $aPallete[$iStep] = "0xFF" & Hex($iR, 2) & Hex($iG, 2) & Hex($iB, 2) Next Return _GUIPallete_Draw() EndFunc ;==>_GUIPallete_Update #EndRegion - Pallete Mixer GUI Functions #Region - Plasma Editor GUI Functions Func _GUIPlasmaEditor_Hide() GUISetState(@SW_HIDE, $aGUIPlasmaEditor[$hGUIPlasmaEditor]) EndFunc ;==>_GUIPlasmaEditor_Hide Func _GUIPlasmaEditor_PlasmaAddRem() EndFunc ;==>_GUIPlasmaEditor_PlasmaAddRem Func _GUIPlasmaEditor_PlasmaDisplay() Local $sSelection = GUICtrlRead($aGUIPlasmaEditor[$idCmbPlasmaDisplay]) If $sSelection = "All Combined" Then $iDisplayPlasma = 0 Else $iDisplayPlasma = _GUICtrlComboBox_GetCurSel($aGUIPlasmaEditor[$idCmbPlasmaSelector])+1 EndIf Return $iDisplayPlasma EndFunc ;==>_GUIPlasmaEditor_PlasmaDisplay Func _GUIPlasmaEditor_PlasmaSelect() Local $sSelection = GUICtrlRead($aGUIPlasmaEditor[$idCmbPlasmaSelector]) $iSelectPlasma = _GUICtrlComboBox_GetCurSel($aGUIPlasmaEditor[$idCmbPlasmaSelector]) _GUIPlasmaEditor_PlasmaDisplay() Return _GUIPlasmaEditor_PlasmaSettingsLoad($iSelectPlasma) EndFunc ;==>_GUIPlasmaEditor_PlasmaSelect Func _GUIPlasmaEditor_PlasmaSetPosition() EndFunc ;==>_GUIPlasmaEditor_PlasmaSetPosition Func _GUIPlasmaEditor_PlasmaSetRotation() EndFunc ;==>_GUIPlasmaEditor_PlasmaSetRotation Func _GUIPlasmaEditor_PlasmaSetShape() $aPlasmas[$iSelectPlasma][0] = _GUICtrlComboBox_GetCurSel($aGUIPlasmaEditor[$idCmbPlasmaShape]) EndFunc ;==>_GUIPlasmaEditor_PlasmaSetShape Func _GUIPlasmaEditor_PlasmaSetSpread() $aPlasmas[$iSelectPlasma][4] = _GUICtrlComboBox_GetCurSel($aGUIPlasmaEditor[$idCmbPlasmaSpread]) EndFunc ;==>_GUIPlasmaEditor_PlasmaSetSpread Func _GUIPlasmaEditor_PlasmaSettingsLoad(ByRef $iPlasma) GUICtrlSetData($aGUIPlasmaEditor[$idSliderPlasmaSpread],$aPlasmas[$iPlasma][1]/0.2) _GUICtrlComboBox_SetCurSel($aGUIPlasmaEditor[$idCmbPlasmaShape],$aPlasmas[$iPlasma][0]) If $aPlasmas[$iPlasma][4] Then _GUICtrlComboBox_SetCurSel($aGUIPlasmaEditor[$idCmbPlasmaSpread],1) Else _GUICtrlComboBox_SetCurSel($aGUIPlasmaEditor[$idCmbPlasmaSpread],0) EndIf Return 1 EndFunc ;==>_GUIPlasmaEditor_PlasmaSettingsLoad Func _GUIPlasmaEditor_Show() GUISetState(@SW_SHOW, $aGUIPlasmaEditor[$hGUIPlasmaEditor]) EndFunc ;==>_GUIPlasmaEditor_Show #EndRegion - Plasma Editor GUI Functions #Region - Obsolete ;~ Func _GUIPallete_SettingsChange() ;~ Local $iCtrlID = @GUI_CtrlId ;~ Switch $iCtrlID ;~ Case $aGUIPallete[$idSliderRPosition] ;~ Return _GUIPallete_ColorSet(0, -1, GUICtrlRead($iCtrlID)) ;~ Case $aGUIPallete[$idSliderRValue] ;~ Return _GUIPallete_ColorSet(0, GUICtrlRead($iCtrlID)) ;~ Case $aGUIPallete[$idSliderRSpread] ;~ Return _GUIPallete_ColorSet(0, -1, "", GUICtrlRead($iCtrlID)) ;~ Case $aGUIPallete[$idSliderGPosition] ;~ Return _GUIPallete_ColorSet(1, -1, GUICtrlRead($iCtrlID)) ;~ Case $aGUIPallete[$idSliderGValue] ;~ Return _GUIPallete_ColorSet(1, GUICtrlRead($iCtrlID)) ;~ Case $aGUIPallete[$idSliderGSpread] ;~ Return _GUIPallete_ColorSet(1, -1, "", GUICtrlRead($iCtrlID)) ;~ Case $aGUIPallete[$idSliderBPosition] ;~ Return _GUIPallete_ColorSet(2, -1, GUICtrlRead($iCtrlID)) ;~ Case $aGUIPallete[$idSliderBValue] ;~ Return _GUIPallete_ColorSet(2, GUICtrlRead($iCtrlID)) ;~ Case $aGUIPallete[$idSliderBSpread] ;~ Return _GUIPallete_ColorSet(2, -1, "", GUICtrlRead($iCtrlID)) ;~ EndSwitch ;~ Return 0 ;~ EndFunc ;==>_GUIPallete_SettingsChange ;~ Func _GUIPlasmaEditor_PlasmaControlsLock() ;~ Return _GUIPlasmaEditor_PlasmaControlsSetState($GUI_DISABLE) ;~ EndFunc ;==>_GUIPlasmaEditor_PlasmaControlsLock ;~ Func _GUIPlasmaEditor_PlasmaControlsUnLock() ;~ Return _GUIPlasmaEditor_PlasmaControlsSetState($GUI_ENABLE) ;~ EndFunc ;==>_GUIPlasmaEditor_PlasmaControlsUnLock ;~ Func _GUIPlasmaEditor_PlasmaControlsSetState($iState) ;~ If ($iState <> $GUI_ENABLE) And ($iState <> $GUI_DISABLE) Then Return SetError(1, 0, 0) ;~ GUICtrlSetState($aGUIPlasmaEditor[$idBtnPlasmaDel], $iState) ;~ GUICtrlSetState($aGUIPlasmaEditor[$idCmbPlasmaShape], $iState) ;~ GUICtrlSetState($aGUIPlasmaEditor[$idCmbPlasmaSpread], $iState) ;~ GUICtrlSetState($aGUIPlasmaEditor[$idCmbPlasmaRotation], $iState) ;~ GUICtrlSetState($aGUIPlasmaEditor[$idCmbPlasmaPosition], $iState) ;~ GUICtrlSetState($aGUIPlasmaEditor[$idSliderPlasmaSpread], $iState) ;~ GUICtrlSetState($aGUIPlasmaEditor[$idSliderPlasmaRotation], $iState) ;~ GUICtrlSetState($aGUIPlasmaEditor[$idSliderPlasmaPosition], $iState) ;~ Return 1 ;~ EndFunc ;==>_GUIPlasmaEditor_PlasmaControlsSetState #EndRegion - Obsolete edit: Minor bug fix
    • UEZ
      Some Graphical Examples using GDI+ Vol. I
      By UEZ
      Here some useless graphical examples using GDI+, made for fun (my 1st GDI+ codes ):
       
       
      !Some examples may run slowly on WinXP machines (workaround in this thread)!
      Some examples using Hex() function need adjustment when running on AutoIt version 3.3.8.0+ otherwise colors are flashing (fixed versions in AiO package below)!!!
       
       
       
      #01 Flying Pearl Necklaces:

       
      Source code here (577 downloads previously)! Flying Pearl Necklaces.au3
       
       
      #02 Flying Squares:

       
      Source code here (265 downloads previously)! Flying Squares.au3
       
       
      #03 Rotating Squares:

       
      Source code here! Rotating_Squares.au3
       
       
      #04 Plasma & Plasma Variant:

       
      Source codes here!
      Plasma: Plasma.au3
      Plasma Variant: Plasma Variante.au3
       
       
      #05 L-System Fractals:

       
      Source code here (382 downloads previously)! L-System Fractals.7z
       
       
      #06 Sinus Scroller:

       
      Source code here (218 downloads previously)! Sinus Scroller.au3
       
       
      #07 Visualization: Analog Meter: download here (including source, needed files and compiled exe):

       
      Source code + needed files here (473 downloads previously)! Visualizer_Analog Meter.7z
      More GDI+ visualizations here by monoceres
      or by Eukalyptus Audio Visualization Collection (German site)
       
       
      #08 Particle Catapult:

       
      Source code here (70 downloads previously)! Particle_Catapult.au3
       
       
      #09 Rotating Cube:

       
      Source code here (79 downloads previously)! Rotating_Cube.au3
       
       
      #10 Simple Ball Collision Simulation:

       
      Source code here (35 downloads previously)! Simple_Ball_Collision_Simulation.au3
      (it is not finished yet! look from time to time into this thread for an update! Nice tutorial here)
       
       
      #11 Particle Explosions:

       
      Source code here: Explosions__from_AutoIteroids_.au3
       
       
      #12 Rotating Letters:

       
      Source codes here: Rotating Letters.au3
      Transparent version (87 downloads previously): Rotating Letters Transparent.au3
       
       
      #13 Rotating Cube 2:

       
      Source code here (53 downloads previously): Rotating Cube 2.au3
       
       
      #14 Rotating Cube 2 with Textures:

       
      Source code here (68 downloads previously): Rotating Cube 2 + Textures.7z
       
       
      #15 Rotating Cube 2 with some examples from above on each surface:

       
      Source code here (55 downloads previously): Rotating Cube 2 + animated surfaces.7z
       
       
      #16 Rotating Cube 2 simple:

       
      Source code here: Rotating Cube 2 - Simple.au3
       
      Or with background pic or
      Rotating Cube 2 simple + Background
       
       
      #17 Tramp of Particles:

       
      Source code here: Tramp of Particles.au3
       
       
      #18 Twister:

       
      Source code here: Twister.au3
      WinAPI version is 2.5x faster (look in AiO archive)!
       
       
      #19 Star Burst:

       
      Source code here: Star Burst.au3
       
       
      #20 Warp Starfield:

       
      Source code here: Warp Starfield.au3
       
       
      #21 Plasma 2:

       
      Source code here: Plasma 2.au3
       
       
      #22 Isometric Level-3 Cube:

       
      Source code here: Isometric Level-3 Cube.au3
       
       
      #23 Zoomer:

       
      Source code here (7 downloads previously): Zoomer.au3
      GDIP.au3 needed for Zoomer!
       
       
      #24 Suspended Cloth Simulation:

       
      Source code here: Suspended Cloth Simulation.au3
       
       
      #25 Visualizer: Oscilloscope Farbrausch:

       
      Source code here (30 downloads previously): Visualizer Oscilloscope Farbrausch.au3
      To run Visualizer Oscilloscope Farbrausch.au3 properly you need following files: Bass.au3, BassExt.au3, Bass.dll and BassExt.dll. These files can be found in AiO package or on German AutoIt site!
       
       
       
      #26 Im- Exploding Particle Logo:

       
      Source code here: Im- Exploding Particle Logo.7z
       
       
      #27 Pixel Text Effect:

       
      Source code here (12 downloads previously): Pixel Text Effect.7z
      or with ♬chip sound♫ aka demo style (download from German AutoIt site or from AiO archive).
      #27 works best on Vista+ machines!
       
       
      #28 Star Wars Scroller:

       
      Source code here: Star Wars Scroller.au3
      For a complete Star Wars Intro have a look to eukalyptus' Star-Wars Intro (see below!)
       
       
       
      #29 Rotated Letters Simple:

       
      Source code here: Rotated Letters Simple.au3
       
       
      #30 Ballet of Letters:

       
      Source code here: Ballet of Letters.au3
       
       
      #31 Perfect Illusion:

       
      Source code here:
      Perfect Illusion Variant 1.au3
      Perfect Illusion Variant 2.au3
      Perfect Illusion Variant 3.au3
       
       
       
      Mesmerizing Squares Screensaver (previous downloads approx. 100): Mesmerizing_Squares_Screensaver.au3 (compiled version here):

       
      Don't stare too long on it or you will be mesmerized
       
       
       
      One more: Rotating triangle + vertical scroller + music (modification of monoceres' code):

       
       
       
       
      Magic Lines Screesaver (110 downloads previously): Magic Lines Screensaver.7z

       
       
      Another screensaver - 3D Star Scrolling Screensaver (83 downloads previously): GDI+ 3D Star Scrolling Screensaver.au3
       
      !Some examples may run slowly on WinXP machines (workaround in this thread)!
      Some examples using Hex() function need adjustment when running on AutoIt version 3.3.8.0+ otherwise colors are flashing (fixed versions in AiO package below)!!!
       
      AiO download link ☞ AiO1 or AiO2 ☜ (all examples above compiled + source codes packed with 7-Zip)
       
       
      Have a look also to the game I made using GDI+:
       
      Link: AUTOITEROIDS v1.018 Build 2011-06-09 (Final) (a clone of the game Asteroids made by Atari 1979)
       

       
       
       
       
       
      I hope you like it!
       
      Any kind of comment is welcome!!!
       
       
      My examples are all done with AutoIt v3.3.0.0 on Vista x32!
       
       
      Kudos to: monoceres, smashly, malkey, Eukalyptus and Authenticity!
       
       
      Check out  Some Graphical Examples using GDI+ Vol. II build 2016-01-25
       
      More examples made by other members in this thread (thanks you very much!):
       
      Spinning Flying Pearl Necklaces by smashly:
       
      Spinning Flying Squares by smashly and ProgAndy
       
      LMP Visualization by youknowwho4eva:

       
      SineWorm by monoceres:

       
      Enterprise Warp by youknowwho4eva:

       
      Confused ASCII by monoceres:

       
      Lissajous Curve by monoceres:

       
      Butterfly Curve by monoceres:

       
      ParticleCollisionFun2 by crashdemons:

       
      Extreme nice physic engine by moritz1243 (German site):

       
      Lingering Line by MvGulik:

       
      Scroller Sine Blobs by Lakes:

       
      Cube surface and 3D axis and by Lakes:

       
       
      by eukalyptus:

       
      by eukalyptus:

       
      Two more examples by eukalyptus: and

       
       
      FEEL FREE TO POST YOUR GDI+ EXAMPLES HERE,TOO!!!
       
       
       
      Have fun and regards,
       
      UEZ ✌
       
       
       
      PS: more modified examples also here in this topic
       
       
      History of my useless scripts above:
       
       
       
       
    • UEZ
      Some Graphical Examples using GDI+ Vol. II build 2016-01-25
      By UEZ
      Some Graphical Examples using GDI+ Vol. II build 2016-01-25
       
      This is the continuation of "Some Graphical Examples using GDI+ Vol. I" with currently 27 examples in "snippet style".
       
      For downloads and screenshots just visit the download section.
       
      All examples should properly run on Win7+ operating systems / tested on AutoIt v3.3.14.2!
       
      More examples will follow from time to time.
       
      Thanks to Eukalyptus!
       
      Please report any issues / feel free to post any comment.
       
      Have fun.
    • UEZ
      Some Graphical Examples using GDI+ Vol. II
      By UEZ
      Some Graphical Examples using GDI+ Vol. II
       
      This is the continuation of "Some Graphical Examples using GDI+ Vol. I".
       
      Have fun.
    • UEZ
      GDI+ Snowfall
      By UEZ
      Simple snowfall using GDI+ & ASM.
      Thanks to Eukalyptus for the ASM codes. 
       
      If the script runs too slow reduce the amount of flakes in line 48.
       
      For more information please visit the forum thread.
       
      Happy snowing.