|
Anyone know what a game engine is and what it does?? HELP??
<marquee>Universal Project
|
|
|
|
|
Well google is your friend, but I'll have a go anways
A game engine is typically a library of code that is dedicated to handling the low level graphics functionality, and then packaging this up with nice easy to use high level function calls. They typically are 3D oriented, and allow for building a full scenegraph, managing the graph, rendering the shapes, adding textures, animating the shapes, and possibly add extra things like collision detections, a set of physics rules for objects, etc. Some engines may even include rudimentary AI that can be assigned to characters.
Basically the game engine takes care of the graphics basics so you can concentrate more on the specifics of your game rather than worrying how to display a 3D toroid.
¡El diablo está en mis pantalones! ¡Mire, mire!
Real Mentats use only 100% pure, unfooled around with Sapho Juice(tm)!
|
|
|
|
|
(as far as I understand )
a game engine is exactly what the name implies, it is what makes the game run, usually provide the basic framework for animation, level designs, weapons, game sequences, rendering, maybe some physics.
it helps you focus on the meat of the game, instead of the skeleton of the game.
google for unreal game engine or Bioware Infinity Engine
or have a look at http://www.gamasutra.com/[^] for computer game programming issues.
Maximilien Lincourt
"Never underestimate the bandwidth of a station wagon filled with backup tapes." ("Computer Networks" by Andrew S Tannenbaum )
|
|
|
|
|
hi.,
I have a MDI program with a few dialog boxes,
whenever i call the UpdateData() function within the dialog box
i get an ASSERT error,
is there any other way to update my data in the dialog box??
Ehsan Behboudi
|
|
|
|
|
Avoid using UpdateData() unless you really understand it and know that an alternative does not exist. Use control variables instead and things will be much smoother.
What is the file/line that is firing the assertion? Chances are that it is in the DoDataExchange() function of your dialog class. Have you stepped into the code to see what is happening?
|
|
|
|
|
i use UpdateData() in my other dialog box with in the same program, and it never gave me any problems,
The part/line that fires the ASSERT is within the UpdateData() code.
you mentioned that I can use control variables !!!
what is that? and how can I use that?
in my dialog, i have 5 boxes that i just need to update their numbers (double)
Ehsan Behboudi
|
|
|
|
|
Problems aren't guaranteed, but they can appear if precautions aren't taken.
http://flounder.com/updatedata.htm
double d1, d2, d3;
CString strText;
strText.Format("", d1);
m_edit1.SetWindowText(strText);
strText.Format("", d2);
m_edit2.SetWindowText(strText);
strText.Format("", d3);
m_edit3.SetWindowText(strText);
is the easiest, most straightforward, and doesn't mess with any of the other controls/variables like UpdateData() does.
|
|
|
|
|
okay,,, thanks, i read the website too
but what i don't get is,, what is m_edit1???
in my dialog i have few edit box,, and assigned a double variable to each.
i don't really get what m_edit1 is?
Ehsan Behboudi
|
|
|
|
|
It's a CEdit control variable.
|
|
|
|
|
Find out why you get the ASSERT. It usually means you're doing something wrong.
Other ways to update controls are:
- SetDlgItemText(CONTROL_ID, ...)
- SetDlgItemInt(CONTROL_ID, ...)
- GetDlgItem(CONTROL_ID)->SetWindowText(...)
- GetDlgItem(CONTROL_ID)->SendMessage(BM_SETCHECK, ...)
To retrieve the data, look for Get versions of these.
Regards,
Alvaro
Hey! It compiles! Ship it.
|
|
|
|
|
Set a breakpoint in the UpdateData instruction and "step into" the line of code that gives the assertion error. The ASSERT condition usually tells you what's wrong. I would also check the DoDataExchange method for control incompatibilities(Wrong DDX function)
|
|
|
|
|
Override the window message handler WM_INITDIALOG and initialize your variables. You can only call UpdateData() after the dialog has been initialized.
Do not call UpdateData before CDialog::OnInitDialog(), otherwise it will crash.
BOOL CMyDlg::OnInitDialog()
{
CDialog::OnInitDialog();
myText = "something";
UpdateData();
}
|
|
|
|
|
Hi. I posted an Article Request/Ideas about this subject in the "Article Request/Ideas" forum. If anyone is interested in co-writing it, please let me know!!!
|
|
|
|
|
Does anyone know how to implement the usage of this indicator? I put it in:
static UINT indicators[] =
{
ID_SEPARATOR, // status line indicator
ID_INDICATOR_CAPS,
ID_INDICATOR_NUM,
ID_INDICATOR_SCRL,
ID_INDICATOR_OVR,
};
But I have no clue where to go from there to make the little guy in the bottom right corner actually toggle on and off.
halblonious
|
|
|
|
|
You'll need to add a UI handler for it. In the appropriate message map, add the ON_UPDATE_COMMAND_UI macro (outside the “{{AFX” comments), for ID_INDICATOR_OVR (in Mainfrm.cpp):
ON_UPDATE_COMMAND_UI(ID_INDICATOR_OVR, OnUpdateOver)
void CMainFrame::OnUpdateOver(CCmdUI *pCmdUI)
{
if (some_condition)
pCmdUI->SetText("Over");
else
pCmdUI->SetText("");
}
|
|
|
|
|
|
Actually, I am a begginer in C/C++ programming as I always programmed my add-ins for Excel in VBA, but recently I´ve been impressed by the advantages of C/C++ language and I decided to program my old VBA functions in a C dll. The results are great, but I have some troubles when exporting arrays output to Excel.
The thing is that, as it´s not possible for a function to return an array in C, the only way to export a matrix or a simple array is just to either use a pointer to an array or to wrap the array in a structure. I have tried it all, but this doesn´t work and, as the code is compiled with no error in Visual C++, Iam afraid I don´t import the function correctly from Excel. I have found the following sample in some pages I have visited. It´s just a function that returns the sum of two vectors:
The c# code for the dll:
__declspec(dllexport) double *vectoradd(double *vector_x,double *vector_y,int arr_length)<br />
{ <br />
<br />
int i; <br />
double *vector_z; <br />
vector_z = (double*) calloc(arr_length,sizeof(double)); <br />
for (i=0;i<arr_length;i++) { <br />
vector_z[i] = vector_x[i] + vector_y[i];<br />
} <br />
return vector_z; <br />
}
Once the dll is created, I try to use it in Excel. First, I use id.register Excel formula to register the function and get the id( in Excel:=register.id ("C:\function.dll","vectoradd","EEEJ" ) This works fine. But, when I try to call the function ( =call(A1,B1:B3,C1:C3,3) for instance to sum both vectors B1:B3, C1:c3 ) all I get is "FALSE". What´s wrong?
If it´s possible, what code should I write in VBA to register the dll function when it returns an array output (either pointer to or structure)?
Thanks.
|
|
|
|
|
This sounds like a job for SAFEARRAY .
|
|
|
|
|
is there a way I can add Comments to the INI file . I am actually using the
GetPrivateProfile method. I want the comments to leave the operation unaltered !
|
|
|
|
|
A line that starts with a semi-colon ';' is treated as a comment and ignored by all the GetXxxProfileXxx() functions.
Brad
|
|
|
|
|
As far as I know, there's no API for adding comments. You have to do it yourself.
Regards,
Alvaro
Hey! It compiles! Ship it.
|
|
|
|
|
Hi,
Its me again, looking for more help. I'm still working on the same project as last time i was on here (sending information through the ethernet)
The app has a main window that just displays the menu bar, and 3 dialogs. My app makes a message using the 3 different dialog windows. Each one will add a value to a number that i have when a "create" button is pressed (each one has their own button).
Here is where I am having the problem. Sometimes i need to send it to the server, but some other times i need to save it to a file. So the user can make a entire file of different messages.
I am using the call
CFileDialog InputFile(TRUE, "*.txt", "Message, NULL, "*.txt", NULL); to make the window for the user to enter the name of the text file.
My question is:
1)When do i create, open, close the file that I am going to be writing to?
2)Where do i do all the "ofstream out" stuff? When i click the "create" button on the 3 dialogs that make the message?
Thanks for helping me. (I'm new to coding, i'm 15. Can you please keep the answer simple and with examples if you have time. If not just explain as you normally would)
Jimmy
Just cause I am 15, doesn't mean I'm dumb! (I'll really be 4 on Feb. 29...the year 2004)
|
|
|
|
|
The CFileDialog does not create the file, nor does it open it. All the dialog does is give you a standard interface for choosing a file. You have to create the file afterwards.
First you construct the dialog. When you call DoModal(), the dialog appears. When the user clicks open, the dialog returns IDOK. At this point your code can access the path to the file selected by the user using the GetPathName() member function.
<br />
CFileDialog InputDlg(TRUE, "*.txt", "Message.txt", NULL, "Text Files (*.txt)|*.txt", NULL); <br />
<br />
if(IDOK==InputDlg.DoModal()){<br />
CString filename = InputDlg.GetPathName();<br />
}<br />
I suggest you have a look at the documentation for CFileDialog on the MSDN. It will tell you about some other member functions you can use and also about a little error with the file filter you had in the constructor.
Lorenz Prem
Microsoft Corporation
|
|
|
|
|
Hi
I have a CTime object which has been succesfull set to the day of today.
Now i want the user to type in a number, like 10, and receives the date of 10days ago.
It's not problem making the Ctime object, neither receiving the '10' but when i substract like this:
<br />
CTimeSpan dtDiff(60,0,0);
<br />
CTime timeNow;<br />
char szMsg[256];<br />
<br />
CTime dtResult;<br />
dtResult = TimeNow - dtDiff;<br />
<br />
wsprintf(szMsg, "%02d/%02d/%04d", dtY.GetDay(), dtY.GetMonth(), dtY.GetYear());
I thought error was with TimeNow, but it gets the date correctly.
When the wsprintf does his thing the program crashes. My guess is the CTime object isn't filled (error) left blank or something? Anyone any ideas?
|
|
|
|
|
Er, is that a typo?
You appear to be calculating dtResult, but printing dtY - not defined in the snippet you've posted here.
"Welcome to Arizona! Drive Nice - We're Armed..." - Proposed Sign at CA/AZ Border
|
|
|
|
|