December 04, 2020, 03:25:10 am

News:

Own IWBasic 2.x ? -----> Get your free upgrade to 3.x now.........


Welcome

Started by Ionic Wind Support Team, March 11, 2006, 10:32:58 am

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Ionic Wind Support Team

This forum is for discusssion and code relating to the upcoming 2D classes in Aurora.  2D will make its debut in Alpha 3.
Ionic Wind Support Team

Barney

I would really like to see the 2D functions implemented through 3D hardware. The best example of the power of such implementation are sprite libraries for Blitz3D. Most notably Sprite Candy. Far better than anything available as pure 2D implementation. Aurora 2D functions accelerated by 3D hardware will easily be capable of creating quality shareware games for quite large audience.

Barney

pirate

Which DirectX version will it be? If DirectX7, will it be via DirectDraw or Direct3D?

Ionic Wind Support Team

I usually do 2D through DirectDraw.  Also looking into simulating 2D with 3D.
Ionic Wind Support Team

Protected

Paul, when is Alpha 3 expected? I was working on something with IBasic standard but I think I'll have to stop - it's running very slowly with all those calculations :P How much faster than IB standard can Aurora (with this library) be?

John S

March 29, 2006, 01:42:43 pm #5 Last Edit: March 29, 2006, 02:04:55 pm by John S
I'm not an expert, but isn't IBStd an interpretted language.  If so, than Aurora, being compiled will be much faster.

When I ran this small app (with 100 million cycles) it took 10 seconds ( on my 2.2 GHz AMD ) :

Code Select


/*
timer.src
Compile this program to run in a console window.
*/
global sub main()
{
string endtime, starttime = FormatTime();
float starting, ending, sine, square, number = 0;
int n = 100000000;  // 100 million

for( int x = 0; x < n; x++)
{
   number = number + 1;
   square = number * number;
   sine = sind(number);
}

endtime = FormatTime();

writeln("\n    The start time is: " + starttime + "\n");
writeln("\n      The end time is: " + endtime + "\n");

starting = StrToNum(StrRight(starttime,2)) + 60*StrToNum( StrMid(starttime,4,2) ) + 60*60*StrToNum(StrLeft(starttime,2));
ending   = StrToNum(StrRight(endtime,2)) + 60*StrToNum( StrMid(endtime,4,2) ) + 60*60*StrToNum(StrLeft(endtime,2));

writeln("\n                 After " + NumToStr(n) + " cycles\n");
writeln("\n      The end time is: " + NumToStr(ending-starting) + " seconds\n");

do{}until getkey() <> "";

return;
}



editted to add hours conversion to app just in case someone is still running an IBM XT   ;)
John Siino, Advanced Engineering Services and Software

Ionic Wind Support Team

Quote from: Protected on March 29, 2006, 12:37:06 pm
Paul, when is Alpha 3 expected? I was working on something with IBasic standard but I think I'll have to stop - it's running very slowly with all those calculations :P How much faster than IB standard can Aurora (with this library) be?


As soon as I finish it ;)

Ionic Wind Support Team

Protected

IB standard is compiled, though in a fishy way :P

I only tried with a sample, but I think it would take more than 30 minutes to run that program in IB standard  ;D (3ghz dual core)

Ionic Wind Support Team

IBasic Standard is a byte code interpreter.  Pro is a true compiler, so is Aurora.
Ionic Wind Support Team

Protected

byte code interpreter = compiled in a fishy way ;D

I COULD buy IB pro, but I'd rather buy Aurora...

Barney

I thought this part of the forum is about 2D in Aurora, not about the IBStd or Pro. Stay on topic, please.

Barney

Ionic Wind Support Team

Actually it was technically on topic.  Protected was asking about 2D speed in comparison to other languages and we were just helping him out.

I'll decide what is on topic ;)  Unless you want to volunteer to be a moderator of course  ;D
Ionic Wind Support Team

Barney

No, thank you. I already moderate two train sim forums and that's quite enough for me right now... :)

Barney

Zen

Just out of interest, apart from when you finish it, do you have a rough idea of when the 2D stuff will be ready for us to play with?

Lewis

Ionic Wind Support Team

Working on it now.  And it will be in the next update.  At least most of it.

Code Select

global sub main()
{
openconsole();
C2DScreen s;
int fps;
s.CreateFullScreen(640,480,32);
do
{
fps = s.Flip();
} until GetKeyState(0x1b);
s.CloseScreen();
print(fps);
while GetKey() = "";
return 0;
}
Ionic Wind Support Team

pirate

Are you coding it from scratch or will it be a conversion of an existing library, like CDX for an example?

Parker

I'm guessing it will be written using just DirectX, and will be much easier to write than IB's due to supported classes...

Zen

Hmmm, Paul in your example you have openconsole, i dont remember using openconsole in IBasic Pro, or was it just hidden from us all?

Lewis

Ionic Wind Support Team

Written from scratch with similar commands to my other languages.

Compiled as a Windows target so I used OpenConsole so I could print the FPS somewhere.
Ionic Wind Support Team

Parker

OPENCONSOLE's always been there in IBasic (std and pro) and Aurora.

Ionic Wind Support Team

Guess it need more explanation for those that don't know ;).  OpenConsole opens the system console window when your program is compiled as a windows target.  This lets you use the console library commands along side of a regular windows.

While developing 2D and 3D libraries I will use it as a quick way of printing debugging messages.
Ionic Wind Support Team

tide

Thanks, Paul! I'm looking forward to it. I have some simple animations running and the flicker is rather distracting.

Quote from: Ionic Wizard on April 03, 2006, 06:48:36 am
Working on it now.ÂÃ,  And it will be in the next update.ÂÃ,  At least most of it.

Code Select

global sub main()
{
openconsole();
C2DScreen s;
int fps;
s.CreateFullScreen(640,480,32);
do
{
fps = s.Flip();
} until GetKeyState(0x1b);
s.CloseScreen();
print(fps);
while GetKey() = "";
return 0;
}


Zen

Sorry, i didnt mean i never saw OPENCONSOLE in IBasic, i just meant i dont remember using it in 2D or 3D stuff.

I used openconsole all the time in IBasic as i wrote a lot of console n cgi programs etc

Lewis

Ionic Wind Support Team

Still working on the 2D classes.  Primitive drawing functions are done, you can create multiple 2D windows which Pro couldn't do.  The sprite functionality is a bit more robust with a few more properties and an automated list of sprites that can be drawn and moved together.

Also have a few sound classes that I've been working on for managing midi, waves, and sound effects. 

My lack of posts recently just means I have my head down working ;)
Ionic Wind Support Team

sapero

I'm working with C headers. >4 MB is done, 40MB left :-[