Jump to content

Recommended Posts

Posted (edited)

Did you notice that your avatar looks like there is some green fish on the left doing a blow job. :D

The background is merely the "Pastel Stuff" GIMP pattern with the "Rippling" animation applied.

If it looks like anything other than [whatever that stuff is], it's a coincidence.

It was meant to look semi-psychedelic in actuality.

Here's what "Rippling" "Pastel Stuff" may look like without anything covering it:

(Note: not an exact copy of what ended up being used, but it should look very similar)

Maybe I'll just stay with flames next time.

Edited by crashdemons

My Projects - WindowDarken (Darken except the active window) Yahsmosis Chat Client (Discontinued) StarShooter Game (Red alert! All hands to battlestations!) YMSG Protocol Support (Discontinued) Circular Keyboard and OSK example. (aka Iris KB) Target Screensaver Drive Toolbar Thingy Rollup Pro (Minimize-to-Titlebar & More!) 2D Launcher physics example Ascii Screenshot AutoIt3 Quine Example ("Is a Quine" is a Quine.) USB Lock (Another system keydrive - with a toast.)

Posted

The background is merely the "Pastel Stuff" GIMP pattern with the "Rippling" animation applied.

If it looks like anything other than [whatever that stuff is], it's a coincidence.

It was meant to look semi-psychedelic in actuality.

Here's what "Rippling" "Pastel Stuff" may look like without anything covering it:

(Note: not an exact copy of what ended up being used, but it should look very similar)

Maybe I'll just stay with flames next time.

I knew it!!! It is a green fish doing a blow job.

Come on... don't be blue. It was a joke. I liked your touch.

♡♡♡

.

eMyvnE

Posted

And if we allocate some memory with MemAlloc, and then we get the pointer to the first byte with MemLock? or I misunderstood what you said?

Now I don't get you. :D

What part about arrays you didn't understand?

The main problem is that we don't have a pointer to a variable (place in memory). We can acces only it's value.

♡♡♡

.

eMyvnE

Posted (edited)

Now I don't get you. :D

What part about arrays you didn't understand?

The main problem is that we don't have a pointer to a variable (place in memory). We can acces only it's value.

Yes I understand the problem, here is an example:

$a = DllStructCreate('int[2]')
$b = DllStructGetPtr($a)
MsgBox(0, '', $b)

doesnt this return a pointer to an array of int?

Edited by oMBRa
Posted

Yes I understand the problem, here is an example:

$a = DllStructCreate('int[2]')
$b = DllStructGetPtr($a)
MsgBox(0, '', $b)

doesnt this return a pointer to an array of int?

Exactly.

So, this can be written:

; STRUCTURE ARRAY
Global $tArray = DllStructCreate('int[2]')
DllStructSetData($tArray, 1, 123, 1)
DllStructSetData($tArray, 1, 46, 2)
Global $pArray = DllStructGetPtr($tArray)

MsgBox(0, "Structure", "Pointer: " & $pArray & @CRLF & _
        "First value: " & DllStructGetData($tArray, 1, 1) & @CRLF & _
        "Second value: " & DllStructGetData($tArray, 1, 2))


; NATIVE ARRAY
Global $aArray[2] = [123, 46]

MsgBox(0, "AutoIt array", "Pointer: " & "???" & @CRLF & _
        "First value: " & $aArray[0] & @CRLF & _
        "Second value: " & $aArray[1])

♡♡♡

.

eMyvnE

Posted

Yes, I understood you point, I was just wondering why we couldnt use structs array as "autoit array" givent that we can have a pointer to the elements?

Posted

Yes, I understood you point, I was just wondering why we couldnt use structs array as "autoit array" givent that we can have a pointer to the elements?

You did read my first post and run the scripts? It's all based on that, on this pic post-33569-1245928328_thumb.png

♡♡♡

.

eMyvnE

Posted

Thanks.

I did some improvements. There aro no axes visible any more for example. This is done by generating integers in range extended by factor 100 and then dividing the result by 100. So to get random float in range of -25 to 25, first I'm generating integer in range -2500 to 2500 and then dividing by 100 (in fact 100.23). This is much better randomization.

Also I added part for generating colors for every star. This means that every star is with its own color. OpenGL requires rgb format to be:

[r (0 - 1), g (0 - 1), b (0 - 1)]
(0 - 1) is range.

Every star is having this (pseudo code):

color[star] = [r0, g Random(0,8 - 1), b Random(0.8 - 1)]

That values are stored in the same structure as coordinates. This structure looked like this:

Global $tStars = DllStructCreate("float[" & 3 * $iNumStars & "])

and now is looking like this:

Global $tStars = DllStructCreate("float[" & 3 * $iNumStars & "]; float[" & 3 * $iNumStars & "]")

It's doubled in size.

That's why you will see this (for green):

"D99B" & SwapEndian(4 + 3 * $iNumStars * 4) & _        ; fstp 32real[ebx+4+3*$iNumStars*4]

It's saying: - save float to addres that is by 4 + 3 * $iNumStars * 4 forward of addres stored in ebx. Why 4 + 3 * $iNumStars * 4?

Because ebx will be the address of $tStars and the size of float is 4 bytes and there are (3 * $iNumStars) of floats in the first member of the structure and address of green is four bytes (one float) ahead (float[3] -> r, g, b -> 4bytes+4bytes+4bytes).

This is the new script:

SpaceNEW.au3

I almost forgot. You can change the speed by turning the mouse wheel forward or backward. Speed will be seen in window title.

♡♡♡

.

eMyvnE

Posted (edited)

Thanks.

I did some improvements. There aro no axes visible any more for example. This is done by generating integers in range extended by factor 100 and then dividing the result by 100. So to get random float in range of -25 to 25, first I'm generating integer in range -2500 to 2500 and then dividing by 100 (in fact 100.23). This is much better randomization.

Also I added part for generating colors for every star. This means that every star is with its own color. OpenGL requires rgb format to be:

[r (0 - 1), g (0 - 1), b (0 - 1)]
(0 - 1) is range.

Every star is having this (pseudo code):

color[star] = [r0, g Random(0,8 - 1), b Random(0.8 - 1)]

That values are stored in the same structure as coordinates. This structure looked like this:

Global $tStars = DllStructCreate("float[" & 3 * $iNumStars & "])

and now is looking like this:

Global $tStars = DllStructCreate("float[" & 3 * $iNumStars & "]; float[" & 3 * $iNumStars & "]")

It's doubled in size.

That's why you will see this (for green):

"D99B" & SwapEndian(4 + 3 * $iNumStars * 4) & _      ; fstp 32real[ebx+4+3*$iNumStars*4]

It's saying: - save float to addres that is by 4 + 3 * $iNumStars * 4 forward of addres stored in ebx. Why 4 + 3 * $iNumStars * 4?

Because ebx will be the address of $tStars and the size of float is 4 bytes and there are (3 * $iNumStars) of floats in the first member of the structure and address of green is four bytes (one float) ahead (float[3] -> r, g, b -> 4bytes+4bytes+4bytes).

This is the new script:

I almost forgot. You can change the speed by turning the mouse wheel forward or backward. Speed will be seen in window title.

If you can eliminate the flickering pixels in the middle of the screen then it would be awesome!

GREAT WORK!

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!
¯\_(ツ)_/¯  ٩(●̮̮̃•̃)۶ ٩(-̮̮̃-̃)۶ૐ

Posted (edited)

That's a huge screen weaponx.

@UEZ, strars tend to flicker? Flickering stays :D

What I could do is lets say add some resource to compiled exe (encrypted, but nothing havy*) and maybe even "about" screen and make some shit that if the user is on about screen and do for examlpe CTRL+Left Mouse I load that resource, decrypt it (it would be a sound) and play music. But make it so that no one knows about that. Just for the fun of it.

... nah, it's been done before.

edit: * - havy = heavy <- click to read what I mean

Edited by trancexx

♡♡♡

.

eMyvnE

Posted (edited)

Want to see real warp speed? ;)

Set number of stars to : 20000 and set line #93 to

DllStructSetData($tZincrement, 1, 8)

Speed :D

But its great script at all! Gratulations! Im now also working on smth in OpenGL :D

EDIT:

Whops! Its now using 20% od my CPU :P

Edited by Uriziel01
Posted

You have to consider the amount of job done. And compare the cpu usage with the original classic AutoIt script(ing).

If that code is written in any lanuage it would never be lighter on cpu (not much if any, that is).

...I would love to see some other work with OpenGL in AutoIt.

♡♡♡

.

eMyvnE

Posted (edited)

Yes I truly understand you, and I'm amazed with this what have you done without any 3rd party libraries(I mean libraries like those A. Percy's one's). Im ending of making OpenGl game with online game support (all maded in 90-95%) but I'm not creating so many vertex as you (meaby max of 3-4k vertexes on one map), and I'm sure that if I would like to make smth like You in your code, it would be MUCH slower. I see a HUGE abilities in you code, meaby you should think about some OpenGl UDF? :D p.s-I like the way you code BTW. :D p.s2-Sorry for my horrible bad english.

EDIT:

You gona see my code in couple of days, Im now testing it with few friends, and tracking all online hosting\joining bug's (maaany of bug's). I want to release it with only few of them (as few as possible), cuz im working on this project from 2-3months (with little breaks) and spended alot of time on it. p.s2-Again, sorry for my horrible bad english.

Edited by Uriziel01
Posted (edited)

Since pros seem to be finished with the ASM core here are some final touches from me:

Screen Saver:

Added:

-Support for multiple monitors.

-Dynamic Trail.

-Remember settings in reg.

-Configure screen saver (# of stars and speed)

-Window mode when running as usual application.

After successful compilation you will see new Screen Saver "Space AU3" under display properties.

spaceNEWmod.zip

Edited by dexto

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
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...