Author Topic: Hello, people.  (Read 31887 times)

MrTAToad

  • 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.

Offline com_1

  • Mr. Drawsprite
  • **
  • Posts: 80
  • no comment
    • View Profile
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.

MrTAToad

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

Offline Kitty Hello

  • code monkey
  • Administrator
  • Prof. Inline
  • *******
  • Posts: 10713
  • here on my island the sea says 'hello'
    • View Profile
    • http://www.glbasic.com
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, screeny
LOCAL mx, my,b1,b2
DIM dummy[0][0] // require at least 2D arrays with inline code
 

You can make this work these days without INLINE, using Polyvector!

Offline com_1

  • Mr. Drawsprite
  • **
  • Posts: 80
  • no comment
    • View Profile
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;

Offline Kitty Hello

  • code monkey
  • Administrator
  • Prof. Inline
  • *******
  • Posts: 10713
  • here on my island the sea says 'hello'
    • View Profile
    • http://www.glbasic.com
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

Offline com_1

  • Mr. Drawsprite
  • **
  • Posts: 80
  • no comment
    • View Profile
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.

Offline Kitty Hello

  • code monkey
  • Administrator
  • Prof. Inline
  • *******
  • Posts: 10713
  • here on my island the sea says 'hello'
    • View Profile
    • http://www.glbasic.com
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.

Offline com_1

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

Offline Kitty Hello

  • code monkey
  • Administrator
  • Prof. Inline
  • *******
  • Posts: 10713
  • here on my island the sea says 'hello'
    • View Profile
    • http://www.glbasic.com
Re: Hello, people.
« Reply #129 on: 2011-Mar-14 »
I have great help others. Especially from Trucidare.