### Author Topic: Hello, people.  (Read 35376 times)

• Guest
##### Re: Hello, people.
« Reply #120 on: 2011-Jan-19 »
Dont see why C++ should be needed.  Never written a paint package unfortunately, so I cant help there.

#### com_1

• Mr. Drawsprite
• Posts: 80
• no comment
##### Re: Hello, people.
« Reply #121 on: 2011-Jan-20 »
Just help me analyze this example, please.
http://www.glbasic.com/showroom.php?site=games&game=Fluids&lang=de

Gernot assembled an excellent example, but it will not run if it is copy and paste it into your project.
Is only what he has compiled.

• Guest
##### Re: Hello, people.
« Reply #122 on: 2011-Jan-20 »
Going to take some time - quite a few compiler errors there

#### Kitty Hello

• code monkey
• Prof. Inline
• Posts: 10755
• here on my island the sea says 'hello'
##### Re: Hello, people.
« Reply #123 on: 2011-Jan-20 »
The fluids example is very old code.

Add this at the top of the source:
Code: (glbasic) [Select]
`GLOBAL screenx, screenyLOCAL mx, my,b1,b2DIM dummy[0][0] // require at least 2D arrays with inline code`
You can make this work these days without INLINE, using Polyvector!

#### com_1

• Mr. Drawsprite
• Posts: 80
• no comment
##### Re: Hello, people.
« Reply #124 on: 2011-Jan-20 »
Thanks for help.

With regard to the code (source).
Copied, pasted, by pressing F5 and it worked. (finally)

A question, what do you mean ?
Quote
You can make this work these days without INLINE, using Polyvector!

If I prescribe each point as an array then the computer just hangs.
In this case, such a scheme is not suitable.

scrx = 640; scry = 480;
max = (scrx * scry); dim x[max]; dim y[max];

for d = 0 max - 1;
sepixel x[d], y[d], rgb(250, 250, 250);
next;

#### Kitty Hello

• code monkey
• Prof. Inline
• Posts: 10755
• here on my island the sea says 'hello'
##### Re: Hello, people.
« Reply #125 on: 2011-Jan-20 »
Why don't you:

-Make a DIM image%[xmax][ymax] // RGBA pixels
-Make a "Sprite" from that image MEM2SPRITE
-Draw that sprite

-> much faster than SETPIXEL.
-> Can zoom

#### com_1

• Mr. Drawsprite
• Posts: 80
• no comment
##### Re: Hello, people.
« Reply #126 on: 2011-Jan-21 »
If I understand correctly that command "MEM2SPRITE()" is a static.
And differs from the command "GRABSPRITE" can not handle real time. (dynamical texture)

I'm looking for a way to handle any object on the screen in real time.

#### Kitty Hello

• code monkey
• Prof. Inline
• Posts: 10755
• here on my island the sea says 'hello'
##### Re: Hello, people.
« Reply #127 on: 2011-Jan-21 »
You can use MEM2SPRITE on every showscreen. It's quite fast, try it. It's the only way to draw accurate pixels and so.
You could also use CREATESCREEN and draw with DRAWLINE and DRAWRECT - depends on what you need.

#### com_1

• Mr. Drawsprite
• Posts: 80
• no comment
##### Re: Hello, people.
« Reply #128 on: 2011-Mar-14 »
Someone is helping you in the creation and further development of language, or are you alone ?

• code monkey