IonicWind Software

Aurora Compiler => GUI => Topic started by: Rock Ridge Farm (Larry) on May 14, 2006, 06:55:57 PM

Title: An Aurora game - help needed
Post by: Rock Ridge Farm (Larry) on May 14, 2006, 06:55:57 PM
I have written the core of a game - now I  need to add the fancy screen stuff.
I am lost here.
I want a window screen that has the following structure:
================================================
!                                                                        ! Scrolling                    !
!                                                                        ! Text I/O                   !
!                                                                        ! Area                         !
!                                                                        !                                !
!                                                                        !                                !
!                                                                        !                               !
!                                                                        !                               !
!                                                                        !                               !
! 2d Display Area                                                  !                               !
!                                                                        !                               !
!                                                                        !                               !
!                                                                        !                               !
!                                                                        !                               !
!                                                                        !                               !
!                                                                        !                               !
!                                                                        !==============!
!                                                                        ! Text Display              !
!                                                                        ! Area                        !
!                                                                        !                                !
!                                                                        !                                !
!                                                                        !                                !
!                                                                        !                                !
================================================

Anyone care to help?
Title: Re: An Aurora game - help needed
Post by: Parker on May 14, 2006, 07:48:10 PM
I'm no good with graphics, which is why I don't do games. But yeah, I see what you mean. I don't really have the time to come up with a demo, and I've never used Aurora's 2D classes, but here's the idea.

In a game you're redrawing everything all the time. So it's not like you have to worry about "Oh no, how do I scroll this?" You need to have a bunch of lines of text (an array is a good method for storing lines), then based on the scroll bar's position (you'll have to render it yourself, except if I remember correctly you can use windows controls on a 2D screen), you'll draw however many lines you can fit. There's probably a GetTextSize method in the window class (I haven't used them much, only console stuff :-\) that you can calculate the height with. With an array it's easy, because at scrollbar position 0, you draw lines[0] through however many you can put there. At position 1, you draw lines[1] through lines[n], etc.

Input, again, you can use a windows text box, so you don't have to make your own. But if you do end up creating your own controls, I can help you as long as you ask after 2 weeks, I'm not free until then.

Text display area, pretty much the same as the scrolling area, just render as many lines as you can.

2D display area, just do what you normally do. Render sprites, background, etc.
Title: Re: An Aurora game - help needed
Post by: Ionic Wind Support Team on May 14, 2006, 07:54:14 PM
Depends on whether your building a windows mode or full screen mode.

If it is a windowed mode 2D application then you can combine both 2D and GUI elements to gether in a parent window.  Create a parent window, the 2D window with no caption blonging to the parent, an edit control can serve as the text display area.  You can use a rich edit control for the text i/o area if you want things like colored text for each player.

For a full screen application your stuck building your own controls from scratch and dividing up the screen area as needed.  DX full screen and the GUI don't play together well.  Which makes sense since your looking at a memory buffer on the video card and Windows is for the most part out of the picture when rendering.

Title: Re: An Aurora game - help needed
Post by: Rock Ridge Farm (Larry) on May 15, 2006, 07:47:18 AM
I think this is a bit more simple minded than you may think.
It is kind of a RPG. You input a decision and actions occur in the 2D area.
The 2D area is a 'scope' like display that can be zoomed in a range of 1-10.
It will display the current status of a fleet of ships and is updated based on paramater changes
entered in the I/O window. It can be set to an automatic update till an event or just stepped as commands
are entered. It will reflect the status of up to 400 elements at a given time.
This is a game I wrote 20+ years ago using curses on a Unix Box.
It started out as a simulation of the Battle of Midway.
(Interesting note - The US never wins. Had 2 major accidental issues occured the US  would not have won that battle. A radio failure on a scout plane and a catapult launch failure on a ship.).
Over the years I modified and updated it and turned it into a space game called SB Vega.
I also modified it to at least give the good guys a chance.
I need to replace the curses part with a window interface.
Title: Re: An Aurora game - help needed
Post by: Rock Ridge Farm (Larry) on May 15, 2006, 10:12:43 AM
It is the 'How do make a window'  type question.
I have spent all of my life in the Unix world - I do not know krap about windows or how to code them.
I am looking for a kick start on building the screen. Guess I am too old to have the explorer nature anymore.
Title: Re: An Aurora game - help needed
Post by: Zen on May 16, 2006, 09:32:17 AM
Larry. This is something i had for an idea for CCL. Only at the time i started it there was no 2D. As i am a bit busy at the moment there is not much i can do but i am planning on making a set of 2D GUI classes for controls and interfaces so to speak. The main reason i want to do this is because i wanted to do it for IBasic but never had time.

It will be great if users can add controls and windows with minimize and maximize capabilities within the 2D. I dont mean actual windows ones but custom designed ones.

Lewis
Title: Re: An Aurora game - help needed
Post by: Rock Ridge Farm (Larry) on June 01, 2006, 12:00:58 PM
Still busy - I am quitely waiting.
Title: Re: An Aurora game - help needed
Post by: Parker on June 01, 2006, 08:45:21 PM
As a developer, I think you know what's taking up most of Lewis' time ;)
Title: Re: An Aurora game - help needed
Post by: Rock Ridge Farm (Larry) on August 04, 2006, 05:47:45 AM
Zumwalt or Kryton9 - with all the stuff you have been doing - would one of you consider helping here?
I am still basically at 0.
Have not had much time - let work and farm stuff get in the way.
Title: Re: An Aurora game - help needed
Post by: J B Wood (Zumwalt) on August 04, 2006, 06:40:23 AM
Just saw this, been busy in the 3d world.
I'll take a look over this tonight and some of the 2d examples to see if I can assist you.
Rules on 2d are different that 3d, but only because of the lacking axis.
Title: Re: An Aurora game - help needed
Post by: kryton9 on August 04, 2006, 10:59:35 AM
Larry, I thought I would get into 2d this weekend, so I hope to be able to help you soon. Right now don't know, but I am sure it will be fun trying to get it going.
Title: Re: An Aurora game - help needed
Post by: kryton9 on August 04, 2006, 12:51:25 PM
Just to get this thing going here is something I put together today.

Not sure if separate windows is ok, the only way I could do it easily


// Based off of the breakout example
// for the 2d screen stuff

#typedef UINT unsigned int;
DECLARE IMPORT,timeGetTime(),UINT;


//Global variables
int width;
int height;
int border_size;
int num_lines;
int topspace;
int bottomspace;
unsigned int border_color;
int fps;
int exit_game;
int mElapsed,mTimer,lastY;
double mAdjust;
C2DScreen *pScreen;

global sub main()
{
Setup();
//Scroll text screen
CWindow w1,w2;
w1.Create(width+4,0,300,height*.6,AWS_AUTODRAW | AWS_VISIBLE,0,"",0);
w1.WriteText(5,20,"This will be the scrollable text");

//text screen
w2.Create(width+4,height*.6,300,height*.4,AWS_AUTODRAW | AWS_VISIBLE,0,"",0);
w2.WriteText(5,20,"This will be the text screen");

//2D screen create
pScreen = new(C2DScreen,1);
pScreen->CreateWindowed(0,0,width+4,height,AWS_VISIBLE|AWS_POPUP|AWS_CAPTION,0,"2D Multi Screen Test - ESC to exit",0);
pScreen->SetStretchedFlip(FALSE);
sz = pScreen->GetClientRect();
width = sz.right;
height = sz.bottom;
pScreen->SetFocus();
C2DSurface *back = pScreen->GetBack();

//turn off the cursor
pScreen->SetCursor(CS_CUSTOM,0);// if you want the cursor in the 2d screen, comment out this line
//Set our font and text colors
pScreen->SetFont("Ariel",12,600);
pScreen->FrontPen(RGB(192,192,255));
pScreen->DrawMode(TRANSPARENT);


mTimer = timeGetTime();
point tx;
DO
{
back->Fill(0);
ShowStatus();
DrawBorder();

//show game over graphics
tx = pScreen->GetTextSize("A line of text to see what can be placed where.");
pScreen->WriteText( width/2 - tx.x/2,height/2 - tx.y/2, "A line of text to see what can be placed where.");
//ESC to exit at any time

IF( GetKeyState(0x1B)) exit_game = TRUE;


//target 75 frames per second for ball movement.
mElapsed = timeGetTime() - mTimer;
mTimer = timeGetTime();
mAdjust = mElapsed / 13.3333;
fps = pScreen->Flip(1);
//mAdjust = 1

} UNTIL exit_game = TRUE;
//clean up and end
pScreen->CloseScreen();
delete pScreen;
return 0;
}

SUB Setup
{
//Our initial settings
width = 640;
height = 480;
border_size = 7;
num_lines = 10;
topspace = 40 + border_size;
bottomspace = border_size;
border_color = RGB(192,192,255);
fps = 0;
exit_game = FALSE;
}

SUB DrawBorder()
{
C2Dsurface *back = pScreen->GetBack();
back->DrawFilledRect( 0,0,width,border_size,border_color);// top
back->DrawFilledRect( 0,height-border_size,width,border_size,border_color);// bottom
back->DrawFilledRect( 0,0,border_size,height,border_color);// left
back->DrawFilledRect( width-border_size,0,border_size,height,border_color);// right
RETURN;
}

SUB ShowStatus()
{
pScreen->WriteText( border_size+10,border_size+10,"This is the 2D screen area");
pScreen->WriteText( border_size+10,45,"FPS: "+str$(fps));
RETURN;
}
Title: Re: An Aurora game - help needed
Post by: kryton9 on August 04, 2006, 01:23:59 PM
Ok, this one is probably more what you wanted :)

Escape key to exit the program.
// Windows Program
// Second Version
// Based off of the breakout example
// for the 2d screen stuff

#typedef UINT unsigned int;
DECLARE IMPORT,timeGetTime(),UINT;


//Global variables
int width;
int height;
int border_size;
int num_lines;
int topspace;
int bottomspace;
unsigned int border_color;
int fps;
int exit_game;
int mElapsed,mTimer,lastY;
double mAdjust;
C2DScreen *pScreen;

global sub main()
{
Setup();
//Scroll text screen
CWindow w1,w2;
w1.Create(width+4,0,300,height*.6,AWS_AUTODRAW | AWS_VISIBLE | AWS_POPUP | AWS_VSCROLL ,0,"",0);
w1.setwindowcolor(rgb(Rand(255),Rand(255),Rand(255)));
w1.DrawMode(TRANSPARENT);
w1.WriteText(5,20,"This will be the scrollable text");

//text screen
w2.Create(width+4,height*.6,300,height*.4,AWS_AUTODRAW | AWS_VISIBLE | AWS_POPUP ,0,"",0);
w2.setwindowcolor(rgb(Rand(255),Rand(255),Rand(255)));
w2.DrawMode(TRANSPARENT);
w2.WriteText(5,20,"This will be the text screen");

//2D screen create
pScreen = new(C2DScreen,1);
pScreen->CreateWindowed(0,0,width+4,height,AWS_VISIBLE|AWS_POPUP,0,"2D Multi Screen Test - ESC to exit",0);
pScreen->SetStretchedFlip(FALSE);
sz = pScreen->GetClientRect();
width = sz.right;
height = sz.bottom;
pScreen->SetFocus();
C2DSurface *back = pScreen->GetBack();

//turn off the cursor
pScreen->SetCursor(CS_CUSTOM,0);// if you want the cursor in the 2d screen, comment out this line
//Set our font and text colors
pScreen->SetFont("Ariel",12,600);
pScreen->FrontPen(RGB(192,192,255));
pScreen->DrawMode(TRANSPARENT);


mTimer = timeGetTime();
point tx;
DO
{
back->Fill(0);
ShowStatus();
DrawBorder();

//show game over graphics
tx = pScreen->GetTextSize("The mouse is hidden on this screen, but not on the others.");
pScreen->WriteText( width/2 - tx.x/2,height/2 - tx.y/2, "The mouse is hidden on this screen, but not on the others.");
//ESC to exit at any time

IF( GetKeyState(0x1B)) exit_game = TRUE;


//target 75 frames per second for ball movement.
mElapsed = timeGetTime() - mTimer;
mTimer = timeGetTime();
mAdjust = mElapsed / 13.3333;
fps = pScreen->Flip(1);
//mAdjust = 1

} UNTIL exit_game = TRUE;
//clean up and end
pScreen->CloseScreen();
delete pScreen;
return 0;
}

SUB Setup
{
//Our initial settings
width = 640;
height = 480;
border_size = 7;
num_lines = 10;
topspace = 40 + border_size;
bottomspace = border_size;
border_color = RGB(192,192,255);
fps = 0;
exit_game = FALSE;
}

SUB DrawBorder()
{
C2Dsurface *back = pScreen->GetBack();
back->DrawFilledRect( 0,0,width,border_size,border_color);// top
back->DrawFilledRect( 0,height-border_size,width,border_size,border_color);// bottom
back->DrawFilledRect( 0,0,border_size,height,border_color);// left
back->DrawFilledRect( width-border_size,0,border_size,height,border_color);// right
RETURN;
}

SUB ShowStatus()
{
pScreen->WriteText( border_size+10,border_size+10,"This is the 2D screen area");
pScreen->WriteText( border_size+10,45,"FPS: "+str$(fps));
RETURN;
}
Title: Re: An Aurora game - help needed
Post by: kryton9 on August 04, 2006, 01:43:29 PM
Sometimes with the random colors you couldn't see the test so small change there
and now working on getting the scrolling working. It isn't at the moment, not sure why.

//Windows Program
// Fourth Version
// Based off of the breakout example
// for the 2d screen stuff

#typedef UINT unsigned int;
DECLARE IMPORT,timeGetTime(),UINT;


//Global variables
int width;
int height;
int border_size;
int num_lines;
int topspace;
int bottomspace;
unsigned int border_color;
int fps;
int exit_game;
int mElapsed,mTimer,lastY;
double mAdjust;
C2DScreen *pScreen;


global sub main()
{
Setup();
//Scroll text screen
CWindow w1,w2;
w1.Create(width+4,0,200,height*.6,AWS_AUTODRAW | AWS_VISIBLE | AWS_POPUP | AWS_VSCROLL ,0,"",0);
w1.setwindowcolor(rgb(100,Rand(255),Rand(255)));
w1.DrawMode(TRANSPARENT);
w1.WriteText(5,20,"This will be the scrollable text");
for(x=0;x<100;x++)
{
w1.WriteText(5,80+(x*12),"see if this window will scroll"+NumToStr(x));
}
//text screen
w2.Create(width+4,height*.6,200,height*.4,AWS_AUTODRAW | AWS_VISIBLE | AWS_POPUP ,0,"",0);
w2.setwindowcolor(rgb(100,Rand(255),Rand(255)));
w2.DrawMode(TRANSPARENT);
w2.WriteText(5,20,"This will be the text screen");

//2D screen create
pScreen = new(C2DScreen,1);
pScreen->CreateWindowed(0,0,width+4,height,AWS_VISIBLE|AWS_POPUP,0,"2D Multi Screen Test - ESC to exit",0);
pScreen->SetStretchedFlip(FALSE);
sz = pScreen->GetClientRect();
width = sz.right;
height = sz.bottom;
pScreen->SetFocus();
C2DSurface *back = pScreen->GetBack();

//turn off the cursor
pScreen->SetCursor(CS_CUSTOM,0);// if you want the cursor in the 2d screen, comment out this line
//Set our font and text colors
pScreen->SetFont("Ariel",12,600);
pScreen->FrontPen(RGB(192,192,255));
pScreen->DrawMode(TRANSPARENT);


mTimer = timeGetTime();
point tx;
DO
{
back->Fill(0);
ShowStatus();
DrawBorder();

//show game over graphics
tx = pScreen->GetTextSize("The mouse is hidden");
pScreen->WriteText( width/2 - tx.x/2,height/2 - tx.y/2, "The mouse is hidden");
tx = pScreen->GetTextSize("on this screen, but");
pScreen->WriteText( width/2 - tx.x/2,height/2 - tx.y/2+20, "on this screen, but");
tx = pScreen->GetTextSize("not on the others.");
pScreen->WriteText( width/2 - tx.x/2,height/2 - tx.y/2+40, "not on the others.");
//ESC to exit at any time

IF( GetKeyState(0x1B)) exit_game = TRUE;


//target 75 frames per second for ball movement.
mElapsed = timeGetTime() - mTimer;
mTimer = timeGetTime();
mAdjust = mElapsed / 13.3333;
fps = pScreen->Flip(1);
//mAdjust = 1

} UNTIL exit_game = TRUE;
//clean up and end
pScreen->CloseScreen();
delete pScreen;
return 0;
}

SUB Setup
{
//Our initial settings
width = 440;
height = 480;
border_size = 7;
num_lines = 10;
topspace = 40 + border_size;
bottomspace = border_size;
border_color = RGB(192,192,255);
fps = 0;
exit_game = FALSE;
}

SUB DrawBorder()
{
C2Dsurface *back = pScreen->GetBack();
back->DrawFilledRect( 0,0,width,border_size,border_color);// top
back->DrawFilledRect( 0,height-border_size,width,border_size,border_color);// bottom
back->DrawFilledRect( 0,0,border_size,height,border_color);// left
back->DrawFilledRect( width-border_size,0,border_size,height,border_color);// right
RETURN;
}

SUB ShowStatus()
{
pScreen->WriteText( border_size+10,border_size+10,"This is the 2D screen area");
pScreen->WriteText( border_size+10,45,"FPS: "+str$(fps));
RETURN;
}

Title: Re: An Aurora game - help needed
Post by: Rock Ridge Farm (Larry) on August 05, 2006, 08:07:35 PM
Played with it a bit today - will let you know how much trouble I get into.
Thanks for the help - I am sure I will need much more.
Title: Re: An Aurora game - help needed
Post by: kryton9 on August 05, 2006, 08:15:49 PM
I think you will need to make your own class with a dialog to handle the scrolling text with input, I just didn't want to make the code overly complicated with all of that stuff, and besides not sure if I could do it anyways :)

I will work on it tonight just for fun, hope to see the start of your game soon. Will be glad to help if I can :)
Title: Re: An Aurora game - help needed
Post by: Rock Ridge Farm (Larry) on August 05, 2006, 08:20:28 PM
I have the game working in char mode on my linux box - now to re-code in Aurora.
Slightly less than 2000 lines of code to convert.
Title: Re: An Aurora game - help needed
Post by: kryton9 on August 05, 2006, 08:36:07 PM
If you figure out a routine to check the users video setting so that the program can pick the maximum that it could run in let me know.

That would be very useful :)  Good luck on the conversion. That will be a big job for sure, but have fun.
Title: Almost there
Post by: kryton9 on August 06, 2006, 12:31:43 AM
I made good progress on getting the type of screen working.

Can't get settext to work from ccontrol with the richedit and also the setcolor command.
You can use the control and I get no errors with what i wrote, so not sure what is happening.

I want to be able to change the richedit background to match the window's color it is in and also to put
some text into it. I commented where the lines are with <<<<<<<<<<<

// Windows Program
// Fifth Version
// Based off of the breakout example
// for the 2d screen stuff

#typedef UINT unsigned int;
DECLARE IMPORT,timeGetTime(),UINT;
class MyWindow : CWindow
{
declare MyWindow();
declare _MyWindow();
declare virtual OnClose(),int;
declare virtual OnControl(int nID, int nNotifyCode, unsigned int hControl),int;
declare virtual OnCreate(),int;
CRichEdit rEdit;
}

//Global variables
int width;
int height;
int border_size;
int num_lines;
int topspace;
int bottomspace;
unsigned int border_color;
int fps;
int exit_game;
int mElapsed,mTimer,lastY;
double mAdjust;
MyWindow *pw1;
CWindow *pw2;
C2DScreen *pScreen;

global sub main()
{
Setup();
//Scroll text screen
pw1=new(MyWindow,1);
pw1->Create(width+4,0,200,height*.6,AWS_AUTODRAW | AWS_VISIBLE | AWS_POPUP ,0,"",0);
w1Txt();
//text screen
pw2=new(CWindow,1);
pw2->Create(width+4,height*.6,200,height*.4,AWS_AUTODRAW | AWS_VISIBLE | AWS_POPUP ,0,"",0);
w2Txt();
//2D screen create
pScreen = new(C2DScreen,1);
pScreen->CreateWindowed(0,0,width+4,height,AWS_VISIBLE|AWS_POPUP,0,"2D Multi Screen Test - ESC to exit",0);
pScreen->SetStretchedFlip(FALSE);
sz = pScreen->GetClientRect();
width = sz.right;
height = sz.bottom;
pScreen->SetFocus();
C2DSurface *back = pScreen->GetBack();

//turn off the cursor
pScreen->SetCursor(CS_CUSTOM,0);// if you want the cursor in the 2d screen, comment out this line
//Set our font and text colors
pScreen->SetFont("Ariel",12,600);
pScreen->FrontPen(RGB(192,192,255));
pScreen->DrawMode(TRANSPARENT);

mTimer = timeGetTime();
point tx;
DO
{
back->Fill(0);
ShowStatus();
DrawBorder();

//show game over graphics
tx = pScreen->GetTextSize("The mouse is hidden");
pScreen->WriteText( width/2 - tx.x/2,height/2 - tx.y/2, "The mouse is hidden");
tx = pScreen->GetTextSize("on this screen, but");
pScreen->WriteText( width/2 - tx.x/2,height/2 - tx.y/2+20, "on this screen, but");
tx = pScreen->GetTextSize("not on the others.");
pScreen->WriteText( width/2 - tx.x/2,height/2 - tx.y/2+40, "not on the others.");
//ESC to exit at any time
IF( GetKeyState(0x1B)) exit_game = TRUE;

//target 75 frames per second for ball movement.
mElapsed = timeGetTime() - mTimer;
mTimer = timeGetTime();
mAdjust = mElapsed / 13.3333;
fps = pScreen->Flip(1);
} UNTIL exit_game = TRUE;
//clean up and end
pScreen->CloseScreen();
delete pw1;delete pw2;delete pScreen;
return 0;
}

SUB Setup
{
//Our initial settings
width = 440;
height = 480;
border_size = 7;
num_lines = 10;
topspace = 40 + border_size;
bottomspace = border_size;
border_color = RGB(192,192,255);
fps = 0;
exit_game = FALSE;
}

SUB DrawBorder()
{
C2Dsurface *back = pScreen->GetBack();
back->DrawFilledRect( 0,0,width,border_size,border_color);// top
back->DrawFilledRect( 0,height-border_size,width,border_size,border_color);// bottom
back->DrawFilledRect( 0,0,border_size,height,border_color);// left
back->DrawFilledRect( width-border_size,0,border_size,height,border_color);// right
RETURN;
}

SUB ShowStatus()
{
pScreen->WriteText( border_size+10,border_size+10,"This is the 2D screen area");
pScreen->WriteText( border_size+10,45,"FPS: "+str$(fps));
RETURN;
}

SUB w1Txt()
{
w1g = Rand(255);w1b = Rand(255);
pw1->setwindowcolor(rgb(100,w1g,w1b));
pw1->rEdit.SetDefaultColor(w1g);// ? not working <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
pw1->rEdit.SetColor(0,w1g);// ? not working <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
pw1->DrawMode(TRANSPARENT);
pw1->WriteText(5,20,"scrollable text/input");
pw1->WriteText(5,50,"rgb: r: 100ÂÃ,  ÂÃ,  g: "+NumToStr(w1g)+"ÂÃ,  ÂÃ,  b: "+NumToStr(w1b));
for(x=0;x<100;x++)
{
pw1->rEdit.SetText("test line # "+NumToStr(x));// ? not working <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
}
}
SUB w2Txt()
{
w2g = Rand(255);w2b = Rand(255);
pw2->setwindowcolor(rgb(100,w2g,w2b));
pw2->DrawMode(TRANSPARENT);
pw2->WriteText(5,20,"text screen");
pw2->WriteText(5,50,"rgb: r: 100ÂÃ,  ÂÃ,  g: "+NumToStr(w2g)+"ÂÃ,  ÂÃ,  b: "+NumToStr(w2b));
}

//MyWindow Implementation
MyWindow::MyWindow(){ }
MyWindow::_MyWindow(){ }
MyWindow::OnClose(),int { Destroy(); return 0; }
MyWindow::OnControl(int nID, int nNotifyCode, unsigned int hControl),int
{
select nID
{
case 1: //The OK button
if(nNotifyCode = 0)
w1Txt();
//MessageBox(this,"OK Pressed","Info");
case 2: //The Exit button
if(nNotifyCode = 0)
w2Txt();
case 3: //The Exit button
if(nNotifyCode = 0)
w1Txt();w2Txt();
case 4: //The Exit button
if(nNotifyCode = 0)
w2Txt();
}
return 0;
}

MyWindow::OnCreate(),int
{
AddControl(CTBUTTON,"This Color",0,270,80,20,0x5000000B,0x0,1);
AddControl(CTBUTTON,"Color Below",80,270,90,20,0x5000000B,0x0,2);
AddControl(CTBUTTON,"Bth",170,270,30,20,0x5000000B,0x0,3);
AddControl(CTRICHEDIT,"",10,135,180,125,0x50B000C4,0x200,4);
return 0;
}

Title: Re: An Aurora game - help needed
Post by: Ionic Wind Support Team on August 06, 2006, 01:18:24 AM
Thats because you have two rich edit controls.  You have a member variable CRichEdit rEdit; which isn't doing anything for you since you never create it.  And your adding one with AddControl, which is the one your seeing on screen.

Study up a bit more on controls, see weatherman.src, etc.   If you want to access the rich edit control your adding with AddControl then use the GetControl method.  Or use the member variable and call the Create.  Just don't use both ;)  I would just save a pointer to the control created with AddControl.

...in the MyWindow definition
CRichEdit *m_prEdit;

...in OnCreate
AddControl(CTRICHEDIT,"",10,135,180,125,0x50B000C4,0x200,4);
m_prEdit = GetControl(4);

Then you can access it like so:

pw1->m_prEdit->SetDefaultColor(w1g);







Title: Re: An Aurora game - help needed
Post by: kryton9 on August 06, 2006, 03:17:59 AM
Wow, I am glad I asked as I spent a good amount of time trying to figure out what was wrong and did searches for settext etc. After reading your answer, I would never have guessed that I had created 2 of them. Thanks can't wait to try it out :)

edit: Ok back a little later. Got it sort of going. I still couldn't change the background of the rich edit control. I tried setcolor as you used in weatherman, but no luck with the rich edit.
Using setdefaultcolor is probably better in terms of making it easy to read, but it would be nice
to know how change the background color. Really sleepy, need to get to bed.

// Windows Program
// Fifth Version
// Based off of the breakout example
// for the 2d screen stuff

#typedef UINT unsigned int;
DECLARE IMPORT,timeGetTime(),UINT;
class MyWindow : CWindow
{
declare MyWindow();
declare _MyWindow();
declare virtual OnClose(),int;
declare virtual OnControl(int nID, int nNotifyCode, unsigned int hControl),int;
declare virtual OnCreate(),int;
CRichEdit *prEdit;
}

//Global variables
int width;
int height;
int border_size;
int num_lines;
int topspace;
int bottomspace;
unsigned int border_color;
int fps;
int exit_game;
int mElapsed,mTimer,lastY;
double mAdjust;
MyWindow *pw1;
CWindow *pw2;
C2DScreen *pScreen;

global sub main()
{
Setup();
//Scroll text screen
pw1=new(MyWindow,1);
pw1->Create(width+4,0,200,height*.6,AWS_AUTODRAW | AWS_VISIBLE | AWS_POPUP ,0,"",0);
w1Txt();
//text screen
pw2=new(CWindow,1);
pw2->Create(width+4,height*.6,200,height*.4,AWS_AUTODRAW | AWS_VISIBLE | AWS_POPUP ,0,"",0);
w2Txt();
//2D screen create
pScreen = new(C2DScreen,1);
pScreen->CreateWindowed(0,0,width+4,height,AWS_VISIBLE|AWS_POPUP,0,"2D Multi Screen Test - ESC to exit",0);
pScreen->SetStretchedFlip(FALSE);
sz = pScreen->GetClientRect();
width = sz.right;
height = sz.bottom;
pScreen->SetFocus();
C2DSurface *back = pScreen->GetBack();

//turn off the cursor
pScreen->SetCursor(CS_CUSTOM,0);// if you want the cursor in the 2d screen, comment out this line
//Set our font and text colors
pScreen->SetFont("Ariel",12,600);
pScreen->FrontPen(RGB(192,192,255));
pScreen->DrawMode(TRANSPARENT);

mTimer = timeGetTime();
point tx;
DO
{
back->Fill(0);
ShowStatus();
DrawBorder();

//show game over graphics
tx = pScreen->GetTextSize("The mouse is hidden");
pScreen->WriteText( width/2 - tx.x/2,height/2 - tx.y/2, "The mouse is hidden");
tx = pScreen->GetTextSize("on this screen, but");
pScreen->WriteText( width/2 - tx.x/2,height/2 - tx.y/2+20, "on this screen, but");
tx = pScreen->GetTextSize("not on the others.");
pScreen->WriteText( width/2 - tx.x/2,height/2 - tx.y/2+40, "not on the others.");
//ESC to exit at any time
IF( GetKeyState(0x1B)) exit_game = TRUE;

//target 75 frames per second for ball movement.
mElapsed = timeGetTime() - mTimer;
mTimer = timeGetTime();
mAdjust = mElapsed / 13.3333;
fps = pScreen->Flip(1);
} UNTIL exit_game = TRUE;
//clean up and end
pScreen->CloseScreen();
delete pw1;delete pw2;delete pScreen;
return 0;
}

SUB Setup
{
//Our initial settings
width = 440;
height = 480;
border_size = 7;
num_lines = 10;
topspace = 40 + border_size;
bottomspace = border_size;
border_color = RGB(192,192,255);
fps = 0;
exit_game = FALSE;
}

SUB DrawBorder()
{
C2Dsurface *back = pScreen->GetBack();
back->DrawFilledRect( 0,0,width,border_size,border_color);// top
back->DrawFilledRect( 0,height-border_size,width,border_size,border_color);// bottom
back->DrawFilledRect( 0,0,border_size,height,border_color);// left
back->DrawFilledRect( width-border_size,0,border_size,height,border_color);// right
RETURN;
}

SUB ShowStatus()
{
pScreen->WriteText( border_size+10,border_size+10,"This is the 2D screen area");
pScreen->WriteText( border_size+10,45,"FPS: "+str$(fps));
RETURN;
}

SUB w1Txt()
{
string s$;
w1g = Rand(255);w1b = Rand(255);
pw1->setwindowcolor(rgb(100,w1g,w1b));
pw1->prEdit->SetDefaultColor(rgb(100,w1g,w1b));
pw1->prEdit->SetMargins(10,10);
pw1->DrawMode(TRANSPARENT);
pw1->WriteText(5,20,"scrollable text/input");
pw1->WriteText(5,50,"rgb: r: 100    g: "+NumToStr(w1g)+"    b: "+NumToStr(w1b));
for(x=0;x<11;x++)
{
s$ = s$+"test line # "+NumToStr(x)+Chr$(13);
}
pw1->prEdit->SetText(s$);
}
SUB w2Txt()
{
w2g = Rand(255);w2b = Rand(255);
pw2->setwindowcolor(rgb(100,w2g,w2b));
pw2->DrawMode(TRANSPARENT);
pw2->WriteText(5,20,"text screen");
pw2->WriteText(5,50,"rgb: r: 100    g: "+NumToStr(w2g)+"    b: "+NumToStr(w2b));
}

//MyWindow Implementation
MyWindow::MyWindow(){ }
MyWindow::_MyWindow(){ }
MyWindow::OnClose(),int { Destroy(); return 0; }
MyWindow::OnControl(int nID, int nNotifyCode, unsigned int hControl),int
{
select nID
{
case 1: //The OK button
if(nNotifyCode = 0)
w1Txt();
//MessageBox(this,"OK Pressed","Info");
case 2: //The Exit button
if(nNotifyCode = 0)
w2Txt();
case 3: //The Exit button
if(nNotifyCode = 0)
w1Txt();w2Txt();
case 4: //The Exit button
if(nNotifyCode = 0)
w2Txt();
}
return 0;
}

MyWindow::OnCreate(),int
{
AddControl(CTBUTTON,"This Color",0,270,80,20,0x5000000B,0x0,1);
AddControl(CTBUTTON,"Color Below",80,270,90,20,0x5000000B,0x0,2);
AddControl(CTBUTTON,"Bth",170,270,30,20,0x5000000B,0x0,3);
AddControl(CTRICHEDIT,"",10,135,180,125,0x50B000C4,0x200,4);
prEdit = GetControl(4);
return 0;
}
Title: Re: An Aurora game - help needed
Post by: Ionic Wind Support Team on August 06, 2006, 08:20:19 AM
Rich Edit controls don't follow the same coloring scheme as other windows controls.  Instead it has its own message you need to send it.

#define EM_SETBKGNDCOLOR 0x400 + 67
DECLARE IMPORT,SendMessageA(uint hwnd,uint uMsg,uint wParam,uint lParam),uint;
...
SendMessageA(m_prEdit->m_hWnd,EM_SETBKGNDCOLOR,0, color);

The default background color follows the system color set in display properties.  If you wish to reset the control to again use the window background color then it is:

SendMessageA(m_prEdit->m_hWnd,EM_SETBKGNDCOLOR, true , 0);
Title: Re: An Aurora game - help needed
Post by: kryton9 on August 06, 2006, 11:24:02 AM
Again thanks, never in a million years would I have ever figured that one out either.
I still don't understand it, but will put it in, maybe then I can back trace and figure it out.

Thanks
Title: Re: An Aurora game - help needed
Post by: Ionic Wind Support Team on August 06, 2006, 11:57:50 AM
Microsoft probably explains it better. 

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/devnotes/winprog/wm_ctlcolor_.asp

So in early windows there was one unified way to set a controls color.  Then starting with Windows 95 there were individual messages depedning on the control type.  These messages are sent to the parent window.  Aurora handles processing the individual messages by reflecting them back to the control so the control handles it's own colors.

However the common controls such as RichEdit, ListView, TrackBar, etc. don't follow the old ways and instead have their own messages that you send to the control.  No real standard way of doing it.  Now I could have the CRichEdit class send the message when you use SetColor.  But then have to have a way to reset it back to using the control panel settings.  So it just got left out for the moment.

ListView is more problematic since there really isn't a background color.  See the example 'listview2.src' to see what I mean.

Paul.

Title: Re: An Aurora game - help needed
Post by: kryton9 on August 06, 2006, 12:26:42 PM
Paul, you are amazing how you are doing what you are doing. I was researching all the languages out there and the latest directx and the fact that you are pulling this off is just mind blowing.
You look at the microsoft site and read up on their .net versions and non .net versions and how some directx 9 will work with some versions and not others. What microsoft will be supporting and not, it is a mess.

The same with other languages, I know at game creators, they dropped the the version of microsoft c++ they had targeted their sdk to another version after the users on the forums I guess cried out.

You look at websites that have tutorials on directx programming and it is a mess, you need almost the exact version that the user is developing in setup the same way to make them run. So the whole idea of c and c++ being standard seem really messed up.

Aurora really is the only thing out there other than buckling down and going with the latest microsoft versions. They should just make you head of development at Microsoft and maybe the programming world would become sane again.



Title: Re: An Aurora game - help needed
Post by: Ionic Wind Support Team on August 06, 2006, 12:33:29 PM
DirectX9 really is a mess.  They changed some COM interfaces in mid stream which meade some tutorials on the net useless.  I decided on the least common denominator that works with all current DX9 releases.  And by using the DLL linked with a static version of D3DX9 library it eliminated the COM interface differences.

C and C++ are standardized, the toolkits and extensions are not.  Microsoft has a lot of subtle differences when compared to the ANSI specs.  To be fair, however, you can force any MS compiler to be ANSI complient with a switch.

I was laughing at a post on another forum that was claiming Linux didn't have any standards.  They should try DX programming ;)
Title: Re: An Aurora game - help needed
Post by: kryton9 on August 06, 2006, 12:52:05 PM
Is there a place to get info on what is in the D3DX9 dll so we can get an idea of what features we might be seeing in your engine? So we can start using them on our own till you finish the engine.

Also will there be an option to select opengl or directx on windows as your development preference for the engine? I see that sort of choice in games and in modeling applications, but of course using the those api's compared to letting you program in them is probably a whole another matter :)

Here is the final version:
// Windows Program
// Final Version
// Based off of the breakout example
// for the 2d screen stuff

#typedef UINT unsigned int;
DECLARE IMPORT,timeGetTime(),UINT;

// used for changing the background color of the rich edit control
#define EM_SETBKGNDCOLOR 0x400 + 67
DECLARE IMPORT,SendMessageA(uint hwnd,uint uMsg,uint wParam,uint lParam),uint;

class MyWindow : CWindow
{
declare MyWindow();
declare _MyWindow();
declare virtual OnClose(),int;
declare virtual OnControl(int nID, int nNotifyCode, unsigned int hControl),int;
declare virtual OnCreate(),int;
CRichEdit *prEdit;
}

//Global variables
int width,w1g,w2g,w1b,w2b;
int height;
int border_size;
int num_lines;
int topspace;
int bottomspace;
unsigned int border_color;
int fps;
int exit_game;
int mElapsed,mTimer,lastY;
double mAdjust;
MyWindow *pw1;
CWindow *pw2;
C2DScreen *pScreen;

global sub main()
{
Setup();
//Scroll text screen
pw1=new(MyWindow,1);
pw1->Create(width+4,0,200,height*.6,AWS_AUTODRAW | AWS_VISIBLE | AWS_POPUP ,0,"",0);
w1Txt();
//text screen
pw2=new(CWindow,1);
pw2->Create(width+4,height*.6,200,height*.4,AWS_AUTODRAW | AWS_VISIBLE | AWS_POPUP ,0,"",0);
w2Txt();
//2D screen create
pScreen = new(C2DScreen,1);
pScreen->CreateWindowed(0,0,width+4,height,AWS_VISIBLE|AWS_POPUP,0,"2D Multi Screen Test - ESC to exit",0);
pScreen->SetStretchedFlip(FALSE);
sz = pScreen->GetClientRect();
width = sz.right;
height = sz.bottom;
pScreen->SetFocus();
C2DSurface *back = pScreen->GetBack();

//turn off the cursor
pScreen->SetCursor(CS_CUSTOM,0);// if you want the cursor in the 2d screen, comment out this line
//Set our font and text colors
pScreen->SetFont("Ariel",12,600);
pScreen->FrontPen(RGB(192,192,255));
pScreen->DrawMode(TRANSPARENT);

mTimer = timeGetTime();
point tx;
DO
{
back->Fill(0);
ShowStatus();
DrawBorder();

//show game over graphics
tx = pScreen->GetTextSize("The mouse is hidden");
pScreen->WriteText( width/2 - tx.x/2,height/2 - tx.y/2, "The mouse is hidden");
tx = pScreen->GetTextSize("on this screen, but");
pScreen->WriteText( width/2 - tx.x/2,height/2 - tx.y/2+20, "on this screen, but");
tx = pScreen->GetTextSize("not on the others.");
pScreen->WriteText( width/2 - tx.x/2,height/2 - tx.y/2+40, "not on the others.");
tx=pScreen->GetTextSize("Mouse x: "+NumToStr(pScreen->MouseX())+"    Mouse y: "+NumToStr(pScreen->MouseY()));
pScreen->WriteText( width/2 - tx.x/2,height/2 - tx.y/2-40,"Mouse x: "+NumToStr(pScreen->MouseX())+"    Mouse y: "+NumToStr(pScreen->MouseY()));
//ESC to exit at any time
IF( GetKeyState(0x1B)) exit_game = TRUE;

//target 75 frames per second for ball movement.
mElapsed = timeGetTime() - mTimer;
mTimer = timeGetTime();
mAdjust = mElapsed / 13.3333;
fps = pScreen->Flip(1);
} UNTIL exit_game = TRUE;
//clean up and end
pScreen->CloseScreen();
delete pw1;delete pw2;delete pScreen;
return 0;
}

SUB Setup
{
//Our initial settings
width = 440;
height = 480;
border_size = 7;
num_lines = 10;
topspace = 40 + border_size;
bottomspace = border_size;
border_color = RGB(192,192,255);
fps = 0;
exit_game = FALSE;
w1g=0;w2g=0;
}

SUB DrawBorder()
{
C2Dsurface *back = pScreen->GetBack();
back->DrawFilledRect( 0,0,width,border_size,border_color);// top
back->DrawFilledRect( 0,height-border_size,width,border_size,border_color);// bottom
back->DrawFilledRect( 0,0,border_size,height,border_color);// left
back->DrawFilledRect( width-border_size,0,border_size,height,border_color);// right
RETURN;
}

SUB ShowStatus()
{
pScreen->WriteText( border_size+10,border_size+10,"This is the 2D screen area");
pScreen->WriteText( border_size+10,45,"FPS: "+str$(fps));
RETURN;
}

SUB w1Txt()
{
string s$ = "";
if (w1g =0 and w2g =0){w1g=160;w1b=120;w2g=115;w2b=105;}else {w1g = Rand(255);w1b = Rand(255);}
pw1->setwindowcolor(rgb(100,w1g,w1b));
SendMessageA(pw1->prEdit->m_hWnd,EM_SETBKGNDCOLOR,0, rgb(100,w1g,w1b));
//SendMessageA(pw1->prEdit->m_hWnd,EM_SETBKGNDCOLOR, true , 0);   // set back to windows default color
pw1->prEdit->SetDefaultColor(rgb(0,0,0));
pw1->prEdit->SetMargins(10,10);
pw1->DrawMode(TRANSPARENT);
pw1->WriteText(5,20,"scrollable text/input");
pw1->WriteText(5,50,"rgb: r: 100    g: "+NumToStr(w1g)+"    b: "+NumToStr(w1b));
for(x=0;x<11;x++)
{
s$ = s$+"test line # "+NumToStr(x)+Chr$(13);
}
pw1->prEdit->SetText(s$);
}
SUB w2Txt()
{
if (w2g!=115 and w2b!=105){ w2g = Rand(255);w2b = Rand(255);}
pw2->setwindowcolor(rgb(100,w2g,w2b));
pw2->DrawMode(TRANSPARENT);
pw2->WriteText(5,20,"text screen");
pw2->WriteText(5,50,"rgb: r: 100    g: "+NumToStr(w2g)+"    b: "+NumToStr(w2b));
}

//MyWindow Implementation
MyWindow::MyWindow(){ }
MyWindow::_MyWindow(){ }
MyWindow::OnClose(),int { Destroy(); return 0; }
MyWindow::OnControl(int nID, int nNotifyCode, unsigned int hControl),int
{
select nID
{
case 1: //This Color button
if(nNotifyCode = 0)
w1Txt();

case 2: //Color Below button
if(nNotifyCode = 0)
w2g=0;w2b=0;
w2Txt();
case 3: //Both button
if(nNotifyCode = 0)
w2g=0;w2b=0;
w1Txt();w2Txt();
case 4: //Rich Edit Control
if(nNotifyCode = 0)
w2Txt();
}
return 0;
}

MyWindow::OnCreate(),int
{
AddControl(CTBUTTON,"ThisColor",0,270,78,20,0x5000000B,0x0,1);
AddControl(CTBUTTON,"ColorBelow",78,270,88,20,0x5000000B,0x0,2);
AddControl(CTBUTTON,"Both",166,270,34,20,0x5000000B,0x0,3);
AddControl(CTRICHEDIT,"",10,135,180,125,0x50B000C4,0x200,4);
prEdit = GetControl(4);
return 0;
}
Title: Re: An Aurora game - help needed
Post by: Rock Ridge Farm (Larry) on August 06, 2006, 01:23:10 PM
I like it - just one question - is there a way to put a windows wrapper around the whole thing?
Title: Re: An Aurora game - help needed
Post by: kryton9 on August 06, 2006, 01:39:18 PM
You mean make it all classes and OOP instead of my mix of minimal classes and procedural spaghetti ?ÂÃ,  ÂÃ,  :)

If so, I am in like a no man's land. I am seeing the beauty of classes and OOP, but am not there in feeling natural with it and thinking that way. I guess I always just jump in and start coding never really planning, and that comes from being an architecture major. I used to plan and plan before I put anything on paper and then my profs would get mad at me. They would say we can't read your mind, so I just got in the habit of just jumping in and designing as I went. I then transferred those habits to programming and it was fine back in the day.ÂÃ,  But with OOP, to really make it sweet and effective as Paul is doing with his classes for Aurora, I am a long way away from being there.

edited: I will try it though as it will be a good excercise and maybe help in making that transition.

edited again: I printed out the source code, can't even remember the last time I printed out code from a printer to look at, anyways, I think I can really simplify the program dramatically, if some ideas work.
will post again soon

edited again: My idea didn't work, the idea was to just make one screen as a class. So I just tried to throw a rich edit onto the 2d screen, but you get this flicker, which makes sense as it is for doing quick flips of the screen buffers. I guess I could cut out the third window and make it part of the second window, so there would be 2 classes, will keep testing out ideas:)
Title: Re: An Aurora game - help needed
Post by: Ionic Wind Support Team on August 06, 2006, 02:52:42 PM
Quote
Is there a place to get info on what is in the D3DX9 dll

There is no such thing as a 'd3dx9.dll'

Title: Re: An Aurora game - help needed
Post by: kryton9 on August 06, 2006, 03:03:23 PM
The dll that is used with Aurora for the directx stuff, that allows Aurora to use directx ?
Title: Re: An Aurora game - help needed
Post by: Ionic Wind Support Team on August 06, 2006, 03:17:59 PM
dx3d9r.dll is the engine itself, which was written by me.   The 'r' stands for 'release' btw.  My private debug version is dx3d9d.dll

There is nothing there that isn't already available in the classes.   All 120 functions are supported by the 3D classes in Rev 7.  Rev 8 has 138 functions at the time of this post.

Title: Re: An Aurora game - help needed
Post by: kryton9 on August 06, 2006, 04:00:02 PM
Not unusual for me, I misunderstood. I thought there was a dll that as a developer you had to access to that would allow you to use directx9 without being .net compliant compiler. I never understood you were writing something from scratch. So does that mean that eventually there will be all the routines in the engine we could want? Do you have a list of what commands you plan on having at completion, even if they are not developed yet?

Thanks for your efforts. Now that I sort of see the light of OOP and Aurora, I don't want to go back to regular old style programming as in darkbasic pro and want to go all oop with aurora.

I started a game in dbpro, it will be a massive game, but made out of series of games that make up the whole. There will be different worlds, lots of stuff in space, lots of stuff on ground. It will be a relaxing game at times where you can just enjoy the scenery and look for certain things, then barter those for equipment etc. And then of course venture into space and even a fantasy type universe where anything can happen. I want this to be a project I work on the rest of my life and just keep adding to it. So I need a nice solid foundation to build on that can offer me the stuff I need to present my ideas.

I play games a lot and really enjoy the eye candy more than the actual game play in most of them. With the new nvidia card, unreal 2004 looks so different as does serious sam 2 compared to the ATI card. The same for Battlefield 2 and I haven't even reinstalled half life2 yet. I had bought it for the gateway, and the early levels ran ok, but it bogged down and so I just stopped playing wanting to appreciate its master artwork and game play. I am probably going to wait to play it still till I get my new video card, the same with Battle Field 2.

Anyways the point is playing those, I want to do things maybe not cutting edge but at least not too far back from those games as time goes on. So that is why I am so questioning about directx and what will be so impatiently.

Thanks for understanding and shedding any light on if all of this will be possible with Aurora and the engines you plan on developing.

Title: Re: An Aurora game - help needed
Post by: Ionic Wind Support Team on August 06, 2006, 04:37:20 PM
Plans...hmmm.

I tend to work on one thing at a time in the engine.  Today was 3D sprites.  Next I might figure out some sort of particle system.  Other than that it is what the users request and what I have time for.

DirectX has always been a COM interface and you can access directly from Aurora with the right include files (see Sapero's win includes).  It is the D3DX9 utility library from the SDK that is difficult to access, and that contains the code for shaders, skinned X meshes, etc. 
Title: Re: An Aurora game - help needed
Post by: kryton9 on August 06, 2006, 05:04:02 PM
Paul, I wish I had your knowledge, but till I get close I will keep hammering away to dig what I can from you :)

By 3d sprites, do you mean billboarding and also the base for a particle system? I am drooling in anticipation.

I won't bombard you with a list till I see how you implement what you are doing and till I can get a graps of how to use what is there.
As Zumwalt is showing a lot can be done already that at the surface I never realized. And I still have no idea how your cube map example is working. So there are lots of mysteries already to work out. In the meantime I am going to get into the 2d as I sort of started on it.ÂÃ,  Already alot to play with and with your great ability to put out updates and new releases there will be plenty of more cool goodies to play with.

Ok, now another confusion to me. I saw Sapero's windows include files and also Parker and Zen's All common includes or classes, forgot the name at the moment. I didn't know if they were already a part of Aurora and if not how we know where to put and use them now? I tried once and messed up my Aurora files.
Title: Re: An Aurora game - help needed
Post by: Rock Ridge Farm (Larry) on August 12, 2006, 03:09:55 PM
OK - got the main screen working - now my next issue.
I need to know how to create 2d sprites.
I am using the following ascii representations (this is from the ascii version of the game):

char shapes[5][8][5][6] = {
"  ^  ",
" /+\\ ",
" |+I ",
" |+I ",
" \\_/ ",

"   -/",
" /++|",
"/++//",
"|+// ",
" -   ",

"     ",
"/--\\ ",
"|+++>",
"\\--/ ",
"     ",

" -   ",
"|++\\ ",
"\\\\++\\",
" \\\\+|",
"   -\\",

" /-\\ ",
" I+| ",
" I+| ",
" \\+/ ",
"  v  ",

"   - ",
" //+|",
"//++/",
"|++/ ",
"/-   ",

"     ",
" /--\\",
"<+++|",
" \\--/",
"     ",

"\\-   ",
"|+\\\\ ",
"\\++\\\\",
" \\++|",
"   - ",

"  ^  ",
"  |  ",
" ||| ",
"|||||",
"\\|||/",

"    /",
"  // ",
"//// ",
"///  ",
"\\//  ",

"     ",
"/--  ",
"---->",
"\\--  ",
"     ",

"/\\\\  ",
"\\\\\\  ",
"\\\\\\\\ ",
"  \\\\ ",
"    \\",

"/|||\\",
"|||||",
" ||| ",
"  |  ",
"  v  ",

"  //\\",
"  ///",
" ////",
" //  ",
"/    ",

"     ",
"  --\\",
"<----",
"  --/",
"     ",

"\\    ",
" \\\\  ",
" \\\\\\\\",
"  \\\\\\",
"  \\\\/",

"  ^  ",
"  |  ",
"  |  ",
" ||| ",
"  |  ",

"     ",
"   / ",
"  /  ",
"//   ",
"//   ",

"     ",
" -   ",
"---->",
" -   ",
"     ",

"\\\\   ",
"\\\\   ",
"  \\  ",
"   \\ ",
"     ",

"  |  ",
" ||| ",
"  |  ",
"  |  ",
"  v  ",

"   //",
"   //",
"  /  ",
" /   ",
"     ",

"     ",
"   - ",
"<----",
"   - ",
"     ",

"     ",
" \\   ",
"  \\  ",
"   \\\\",
"   \\\\",

"     ",
"  ^  ",
"  |  ",
"  |  ",
"     ",

"     ",
"   ' ",
"  /  ",
" /   ",
"     ",

"     ",
"     ",
" --> ",
"     ",
"     ",

"     ",
" \\   ",
"  \\  ",
"   ' ",
"     ",

"     ",
"  |  ",
"  |  ",
"  v  ",
"     ",

"     ",
"   / ",
"  /  ",
" '   ",
"     ",

"     ",
"     ",
" <-- ",
"     ",
"     ",

"     ",
" '   ",
"  \\  ",
"   \\ ",
"     ",

" xxxx",
"x\\-/x",
"x|o|x",
"x/-\\x",
"xxxxx",

" xxxx",
"x\\-/x",
"x|o|x",
"x/-\\x",
"xxxxx",

" xxxx",
"x\\-/x",
"x|o|x",
"x/-\\x",
"xxxxx",

" xxxx",
"x\\-/x",
"x|o|x",
"x/-\\x",
"xxxxx",

" xxxx",
"x\\-/x",
"x|o|x",
"x/-\\x",
"xxxxx",

" xxxx",
"x\\-/x",
"x|o|x",
"x/-\\x",
"xxxxx",

" xxxx",
"x\\-/x",
"x|o|x",
"x/-\\x",
"xxxxx",

" xxxx",
"x\\-/x",
"x|o|x",
"x/-\\x",
"xxxxx",

};
Title: Re: An Aurora game - help needed
Post by: kryton9 on August 12, 2006, 04:00:43 PM
Larry do you want to keep the ascii look? Or do you want actual graphics to represent those? And if so, is there a graphical list that you referred to make your ascii equivalents. With that info I can help.
Title: Re: An Aurora game - help needed
Post by: Rock Ridge Farm (Larry) on August 12, 2006, 04:36:38 PM
This is a game I wrote 20+ years ago - ascii was all there was.
I would like up-to-date fancy sprites. They must be scalable from the size of a . to the size represented above.
Title: Re: An Aurora game - help needed
Post by: kryton9 on August 12, 2006, 05:13:45 PM
Is there a page or website that would have the symbols you wanted. I can see some are arrows, but the other ones, I am not sure what they are. Is there a graphical non-ascii version of what you are after I can look at and also know which colors to use etc.
Title: Re: An Aurora game - help needed
Post by: Rock Ridge Farm (Larry) on August 12, 2006, 06:35:01 PM
They are various ships from large ones to small ones.
There are 8 representations per ship by direction of travel - N, NW, W, SW, S, SE, E, NE.
The ship classes are:
   Mother Ship
   Battlestar
   Star Cruiser
   Light Cruiser

Title: Re: An Aurora game - help needed
Post by: kryton9 on August 13, 2006, 12:27:29 PM
Sorry I didn't get back to you sooner Larry.
With sprites you should be able to scale and rotate them, just checked the classes for 2D sprites and I see a setAngleD and setScaleFactor commands, so that will make it easier.

I will make a very simple sprites for you to get the discussion moving further within a couple of days.
Title: Re: An Aurora game - help needed
Post by: kryton9 on August 13, 2006, 04:59:36 PM
Ok this is just a very simple start, because I am not sure what all is needed. I made just simple sprites for the 4 ship classes and also there is a yellow triangle indicating direction. Using the sprite commands you can rotate them to the directions you would like. I made 2 sets, red team and blue team. Hope it gives you something to play with as you develop your program.

These are no eye candy, so don't expect anything cool, I posted one of the bmp's so you can see nothing fancyÂÃ,  :)


Title: Re: An Aurora game - help needed
Post by: Rock Ridge Farm (Larry) on August 14, 2006, 06:29:04 AM
Thanks - I hope to have time to play today - work has been a bear the last couple of weeks -
Auditors.
My goal is to have the main program up and running by the end of the week then start
converting the game logic.
Title: Re: An Aurora game - help needed
Post by: kryton9 on August 14, 2006, 09:35:18 AM
Take your time and enjoy coding, will be glad to test it as it comes along.