Login
Username:

Password:

Remember me



Lost Password?

Register now!

Sections

Who's Online
31 user(s) are online (29 user(s) are browsing Forums)

Members: 0
Guests: 31

more...

Support us!

Headlines

 
  Register To Post  

(1) 2 »
[WIP] AmiDARK Basic OS4 - Tech Demo BASIC 2D - Stars
Quite a regular
Quite a regular


See User information
Hi all,

I'm currently working on the development of a BASIC language for Amiga OS 4... Highly inspired from both AMOS Pro and DarkBASIC..

Actually the system is only a set of functions that can be used directly in C/C++ but, even in this state, it simplify the development (it act a bit like DarkGDK do on PC computers)

Here is a small sample using Basic2D command set.

Here is the link to download the small executable :
http://amigang.odyssey-creators.com/StarScrollV1.rar

You can also see the "user" source code that uses the system in its actual state :

// create stars array.
struct StarsStruct{
  
float XPosYPos;
 };
struct StarsStruct Stars[100];

// Main function
void mainint argcchar** argv ){
  
int XLoop 0;
  for( 
XLoop 0XLoop<=99XLoop++){
    
StarsXLoop ].XPos = (float)[b][i]DBRnd640 )[/i][/b];
    
StarsXLoop ].YPos = (float)[b][i]DBRnd479 )[/i][/b];
   }
  
// Setup the engine
  
[b][i]DarkENGINE_Start()[/i][/b];
  
SetDisplayMode64048032 );  // Open engine
  
glutDisplayFuncDarkLoop );
  
glutIdleFuncDarkLoop );
  
glutMainLoop();
  [
b][i]DarkENGINE_End()[/i][/b];
 };

// Main demo loop
void DarkLoopvoid ){
  
float XSpeed 0.0;
  
int XLoop 0;
  
int SColor 0;
  [
b][i]DBCls)[/i][/b];
  
// Stars updates
  
for( XLoop 0XLoop<=99XLoop++){
    
XSpeed = (float)(XLoop+1) * 0.0025 // Speed
    
StarsXLoop ].XPos StarsXLoop ].XPos XSpeed// Movement
    // Reinsert star on right of it goes out on the left.
    
if( StarsXLoop ].XPos 0.0 ){
      
StarsXLoop ].XPos StarsXLoop ].XPos 640.0;
     }
    
// Change star color depending on speed.
    
SColor XLoop 2.5 ;
    [
b][i]DBInkDBRgbSColorSColorSColor ), )[/i][/b];
    [
b][i]DBDot( (int)StarsXLoop ].XPos, (int)StarsXLoop ].YPos )[/i][/b]; // Dot the star on screen
   
};
  [
b][i]DBSync()[/i][/b]; // Synchro
 
};


Try the demo and tell me if it work correctly on your Amiga :)

EDIT : to make appear the commands I've created in the source code (italic)

Kindest Regards,
AmiDARK.


Edited by freddix on 2009/3/12 1:45:36
All we have to decide is what to do with the time that is given to us.
Go to top
Re: [WIP] AmiDARK Basic OS4 - Tech Demo BASIC 2D - Stars
Just can't stay away
Just can't stay away


See User information
@freddix

Tested and works fine here.

Rock lobster bit me - so I'm here forever
X1000 + AmigaOS 4.1 FE
"Anyone can build a fast CPU. The trick is to build a fast system." - Seymour Cray
Go to top
Re: [WIP] AmiDARK Basic OS4 - Tech Demo BASIC 2D - Stars
Quite a regular
Quite a regular


See User information
@freddix

Works fine here, also.

Peter Swallow

Eyetech A1XE-G3 800Mhz OS4.1
Towered A1200 OS3.9
Go to top
Re: [WIP] AmiDARK Basic OS4 - Tech Demo BASIC 2D - Stars
Quite a regular
Quite a regular


See User information
Thank you both to test :)
I will soonly release another small executable with other command sets tests ...

All we have to decide is what to do with the time that is given to us.
Go to top
Re: [WIP] AmiDARK Basic OS4 - Tech Demo BASIC 2D - Stars
Just can't stay away
Just can't stay away


See User information
@freddix


Try the demo and tell me if it work correctly on your Amiga :)

Nope, black hole; black screen.
Why .rar for basic files? That's kind of obtuse.

Go to top
Re: [WIP] AmiDARK Basic OS4 - Tech Demo BASIC 2D - Stars
Just can't stay away
Just can't stay away


See User information
it worked here on Sam440

Philippe 'Elwood' FERRUCCI
Sam460ex 1.10 Ghz
http://elwoodb.free.fr
Go to top
Re: [WIP] AmiDARK Basic OS4 - Tech Demo BASIC 2D - Stars
Quite a regular
Quite a regular


See User information
@freddix

Works fine here on Sam

Go to top
Re: [WIP] AmiDARK Basic OS4 - Tech Demo BASIC 2D - Stars
Quite a regular
Quite a regular


See User information
@All:
Thank you for testing :p

@Snuffy
Which Amiga configuration do you have ? Does the program quit correctly when you try to close its window ?
I have no compression tool on my Amiga OS 4.0 so I copy files on my PC, uses WinRAR free because I know that AmigaOS4.1 can uncompress rar files ....

I've edited the original message to make appear in italic commands I've created for the future language.

@ Later ...

All we have to decide is what to do with the time that is given to us.
Go to top
Re: [WIP] AmiDARK Basic OS4 - Tech Demo BASIC 2D - Stars
Just can't stay away
Just can't stay away


See User information
@freddix

Quote:
I have no compression tool on my Amiga OS 4.0

Check lha and Cranu in os4depot.

Quote:
Which Amiga configuration do you have ?

Check my signature.

Quote:
Does the program quit correctly when you try to close its window ?

Yes.

Rock lobster bit me - so I'm here forever
X1000 + AmigaOS 4.1 FE
"Anyone can build a fast CPU. The trick is to build a fast system." - Seymour Cray
Go to top
Re: [WIP] AmiDARK Basic OS4 - Tech Demo BASIC 2D - Stars
Not too shy to talk
Not too shy to talk


See User information
@freddix

Works fine here. AmigaOne XE/G4 @ 1GHz OS4.1

Go to top
Re: [WIP] AmiDARK Basic OS4 - Tech Demo BASIC 2D - Stars
Just can't stay away
Just can't stay away


See User information
@freddix

Works ok here

Go to top
Re: [WIP] AmiDARK Basic OS4 - Tech Demo BASIC 2D - Stars
Quite a regular
Quite a regular


See User information
@All : thank you.

I will try to find why it does not work on some configurations ...

@ Later ;)

All we have to decide is what to do with the time that is given to us.
Go to top
Re: [WIP] AmiDARK Basic OS4 - Tech Demo BASIC 2D - Stars
Just can't stay away
Just can't stay away


See User information
@freddix

Which Amiga configuration do you have ? Does the program quit correctly when you try to close its window ?
I was being sarcastic! Your program was very difficult to see and not a very good example of basic coding. Your showing me C++ object code, where's the BASIC source script? Here is sample of my SDLBasic code of Dots:
http://www.flickr.com/photos/11367727@N07
It was coded on Amiga in about 15 minutes. And, it was really fun to do!

I have no compression tool on my Amiga OS 4.0 so I copy files on my PC, uses WinRAR free because I know that AmigaOS4.1 can uncompress rar files ....
Basic programs are scripts. You tranport the script not the engine. Oh wait a sec, your building an engine.Oops, sorry. Show me your basic scripts and I'll write them out in SDLBasic for you.

Go to top
Re: [WIP] AmiDARK Basic OS4 - Tech Demo BASIC 2D - Stars
Home away from home
Home away from home


See User information
@freddix

Quote:

freddix wrote:

I have no compression tool on my Amiga OS 4.0 so I copy files on my PC, uses WinRAR free because I know that AmigaOS4.1 can uncompress rar files ....


You actually have lha, which should be in your c: drawer. A good GUI for using it is Cranu.

Hans

EDIT: Just noticed that TSK already posted a link to Cranu.

Join Kea Campus' Amiga Corner and support Amiga content creation
https://keasigmadelta.com/ - see more of my work
Go to top
Re: [WIP] AmiDARK Basic OS4 - Tech Demo BASIC 2D - Stars
Quite a regular
Quite a regular


See User information
@Snuffy
Actually it's only C source code.
I create functions that are useable inside C.
The objective when all the functions will be available is to make a BASIC language from these functions.
In this sample, the commands are these :

DarkENGINE_Start()                    Initialize the engine (internal function, not available in the future basic language)
SetDisplayMode64048032 )  Open a screen to choosen resolution
DarkENGINE_End
()                      Close the enginefree all used memoryetc ... (internal function, not available in the future basic language)
DBCls)                                    Like CLS in all basic languageclear the screen.
DBInkForeColorBackColor )     Change pen and back color
DBRgb
SColorSColorSColor )   Return RGB value for RedGreenBlue components.
DBDotX)                                plot a dot on screen
DBSync
()                                      Wait sync and display all changes on screen.

Here are all commands used in this sample that will be used to create the BASIC language.

It's not gentle being sarcastic. I'm only at the beginning of my project ... I though I was enough clear in the explanation of what I'm doing ...
I never said that this sample was BASIC LANGUAGE ... I said that I develop commands that will be the main core of my future BASIC LANGUAGE ... is it enough clear for you snuffy ?

All we have to decide is what to do with the time that is given to us.
Go to top
Re: [WIP] AmiDARK Basic OS4 - Tech Demo BASIC 2D - Stars
Just popping in
Just popping in


See User information
@freddix

Works OK here (A1XE, OS4.1)

Go to top
Re: [WIP] AmiDARK Basic OS4 - Tech Demo BASIC 2D - Stars
Just popping in
Just popping in


See User information
@freddix

Works fine here too (A1 XE 1Ghz, 512 MB RAM, Radeon 9250).

Now a question : Along time ago i've made a small program with AMOS Pro which was made for knowing a the day giving any date. But because of the commands it's hard for me to use the source file with, for example, AmiBlitz3. Have you planned to make a converter AMOS Pro => AmiDark Basic ?

Thanks for your efforts.

Nic

Go to top
Re: [WIP] AmiDARK Basic OS4 - Tech Demo BASIC 2D - Stars
Quite a regular
Quite a regular


See User information
@unimon
Hi.
I do not plan to create an AmosPRO -> AmiDARK BASIC converter but,
I will probably do some wrapping functions to makes available AmosPRO commands inside AmiDARK BASIC c so, it will maybe be possible to load .ASCII version of AmosPRO source code and use it with few changes in AmiDARK BASIC

I've made changes into the actual AmiDARK Engine. The Starscroll demo is now smaller :

#include "AmiDARKEngine.c"

void DarkLoopvoid ){
  
int XLoop 0;
  
int SColor 0;
  
float XSpeed 0.0;

  for( 
XLoop 0XLoop<=(StaticAmount -1); XLoop++){
    
StarsXLoop ].XPos = (float)DERnd640 );
    
StarsXLoop ].YPos = (float)DERnd479 );
   }

  
DESetDisplayMode64048032 );
  
DESyncOff();
  
DEInkDERgb255255255 ), );

  while( !
DELoop() ){
    
DECls();
    for( 
XLoop 0XLoop<=(StaticAmount -1); XLoop++){
      
XSpeed = (float)(XLoop+1) * 0.0025 ;
      
StarsXLoop ].XPos StarsXLoop ].XPos XSpeed;
      if( 
StarsXLoop ].XPos 0.0 ){
        
StarsXLoop ].XPos StarsXLoop ].XPos 640.0;
       }
      
SColor XLoop 2.5 ;
      
DEDotEx( (int)StarsXLoop ].XPos, (int)StarsXLoop ].YPosDERgbSColorSColorSColor ) );
     }
    
DESync();
   }
 }


The engine is now totally invisible in the dev source code. There is only the include file at the top of the project ... it includes and initialize everything.

All we have to decide is what to do with the time that is given to us.
Go to top
Re: [WIP] AmiDARK Basic OS4 - Tech Demo BASIC 2D - Stars
Just popping in
Just popping in


See User information
troja... aehm works here nicely (100% CPU usuage)

Go to top
Re: [WIP] AmiDARK Basic OS4 - Tech Demo BASIC 2D - Stars
Just popping in
Just popping in


See User information
@freddix

Under normal circumstances you're supposed to have a list of "extern"-ed functions in a header file and then link with the object file rather than "#include"-ing a C source. Figuring out how to do that shouldn't be difficult however.

It's nice to see you're making progress though.

Go to top

  Register To Post
(1) 2 »

 




Currently Active Users Viewing This Thread: 1 ( 0 members and 1 Anonymous Users )




Powered by XOOPS 2.0 © 2001-2024 The XOOPS Project