Sodabread 88 Posting Whiz in Training

The answers, as always, is: it depends. Databases are often times best with online/browser based games, but Flash, I believe, can write save files to the computer on which it's being played. I don't work with Flash, so I'm not 100%.

In single-player, offline games a save file would probably be the best, as you don't really want to install a database instance for your game. I can't say I'd be ok with someone installing SQL on my machine just to save a game. Although, you can do a persistent/occasional network connection (which puts it in the online game category) in order to write the data to a database on your end.

Figure out what you want your game to be and how the player should be able to play it and you'll most likely have your answer.

neartoyou commented: Good analysis +0
Sodabread 88 Posting Whiz in Training

I'm working with SDL & C++ at the moment, so I'll take a look at the video & pastebin when I get home tonight as I can't get to it at work. I had a similar issue when I first started, so maybe I'll notice something that fixed it for me.

Sodabread 88 Posting Whiz in Training

If you don't want to start as low level as DX or OGL, and you want to make a 2D game which is rather portable, I would say SDL is the way to go if you want to use C/C++/C#. It's super easy to pick up and use and can be used as a base for 3D OpenGL stuff later on, if you so choose.

There are lots of viable alternatives out there, I just happen to be really into SDL at the moment.

Sodabread 88 Posting Whiz in Training

I can't really answer question #1 as I've never built an animation system, nor have I really exported anything to run in an existing system, but I'll do my best for the other two.

For AI, every certain number of frames or a timeslice of every frame (or every frame without a timeslice, whatever), you'll want to manage your AI's thought process. Make decisions on what they want to do based on whatever number of influences. Then every frame, make sure you're updating what they're actually doing, whether it be moving, or updating the progress of a building they're creating, or attacking, etc... This can be done on a separate thread, just make sure everything they're doing is based on time and not frames.

For a game engine, that's a seriously loaded question. A game engine will encompass everything from timekeeping to rendering to math operations to a whole bunch of stuff. Take a look on Amazon for the sample of 3D Game Engine Architecture by Eberly. That will give you a basic rundown of what subsystems you'll encounter when rolling your own engine.

I'm not familiar with Blender's engine, so I can't really go into detail about that, but Unity is a very popular engine with a very slick toolset. There's gobs of tutorials out there for that. I'm assuming Blender works somewhat on the same lines as Unity.

If you're looking for a basic 3D engine without all the bells & whistles of Blender, …

Sodabread 88 Posting Whiz in Training

Check this page out to see if it helps you any: here. You should be able to drag your "guy" movie clip onto a newly created movie clip, then drag that one from the library onto your stage. Hope that helps.

Sodabread 88 Posting Whiz in Training
Sodabread 88 Posting Whiz in Training

I'm wondering if your app just pauses waiting for input once it continues to move on. Comment out your cin.get lines in the switch and just put one in after you accept your input. See how that works.

Sodabread 88 Posting Whiz in Training

You'll have to learn Actionscript then =) There's gobs of tutorials out there on how to write games using Flash, you'll just have to start learning it or hire someone else to do it for you.

There is the standalone Flash player that can be obtained from Adobe. It lets you run flash w/out the browser. I can't guarantee its backwards compatibility, though.

Sodabread 88 Posting Whiz in Training

Num is never going to equal 0 once you start adding to it. I'd say set another variable to int.Parse(Console.ReadLine()) then add it to num after checking if it's 0.

for (int i = 1; i <= 10; i++)
{                
   Console.Write("Enter the number:");               
   int x = int.Parse(Console.ReadLine());                 
   if (x == 0)                    
      break;
   num += x;           
   counter++;            
}
Sodabread 88 Posting Whiz in Training

There's lots of resources out there on how to write the different parts of the application that you need to use, being if statements, while loops, and user input.

Try your best and come back with specific questions.

Sodabread 88 Posting Whiz in Training

one recommendation i would make.. you have several lines of beep(900,100). i would advise creating two int's that will hold these values. for example:

//instead of 
beep(900,200);

//try
int frequency = 900;
int duration  = 200;

beep(frequency, duration);

that way after you got your program up and running.. and you want to tweak its performance, all you have to do is change the value of two variables instead of editing hundreds of lines of code.

Even better, use 3 ints: freq, short_beep & long_beep. Morse code only has 2 lengths and a frequency of the beep, so this covers you for the whole shebang.

Sodabread 88 Posting Whiz in Training

One issue I see right away is line 17, where you're setting each index of v to type before switching on type and since type itself is never actually initialized, I can see why it wouldn't work properly.

I assume that you want to do type = v on that line instead of the other way around. That way, type will actually contain something useful.

Sodabread 88 Posting Whiz in Training

3D Studio Max is that application, but it's $3600, I think, for a single license. There's another application that can do it, based on that linked thread, but it requires a valid 3DS license on your machine.

Your only other option seems to be using a combination of MilkShape & gmax.

Sodabread 88 Posting Whiz in Training

If you have 3DS Max, you can export it as a .obj from there. If not, check here for some more detail: gamedev.net

Sodabread 88 Posting Whiz in Training

If you want to do console games, you don't really need anything more than the compiler.

If you want to use C/C++ and have actual graphics, check out the SDL or SFML libraries. They make it real easy to get some basic graphics and game stuff up and running. If you want something a bit deeper, look into OpenGL or DirectX (if you're on Windows), but they will take more work to get something up and running.

If you want to learn yet another language, you can follow Slyvr's advice, but if you want to stick with C/C++, you're best off using one of the previously mentioned libs.

It all depends on how complex of a game you want to make.

Sodabread 88 Posting Whiz in Training

Your main function doesn't know that the setup function exists because it's declared/defined below it. You'll have to use what's called a function prototype. Simply, it's the function header placed above the main func with a semicolon at the end.

void setup(team one, team two, team three, team four, team five, team six, team seven, team eight);

int main()
{
   ...
}

It's also good practice to use

int main()

instead of

void main()

. For one, it's the correct way to write C/C++ main functions. Also, it will help you avoid being berrated on DW everytime you post your main function here =)

Sodabread 88 Posting Whiz in Training

You would pass a structure just like you would any other type, your function just needs to be written to accept it.

struct team
{
   string name;
   int skill;
   ...
}

void SimulateMatch(team t1, team t2)
{
   ...
}
Sodabread 88 Posting Whiz in Training

For C-style file i/o, look into FILE *s and how to use them.

For using pointers with functions, write the function so it accepts a pointer and pass a pointer one of a few ways:

void stuff(int *x)
{
   *x = 4;
}
int main()
{
   int x;
   int *y;

   stuff(&x);
   stuff(y);
}
Sodabread 88 Posting Whiz in Training

It's cool. It always just seems that non-native english speakers get almost every other word right except 'please'.

Best of luck and welcome to DaniWeb =)

Sodabread 88 Posting Whiz in Training

1. The x variable doesn't exist in the change function. The function should accept an int reference if you want to change it in the func, then pass x in.

void change(int &x);
int main()
{
   int x = 4,y;
   ...
   change(x);
   ...
   return 0;
}
void change(int &x)
{
   x = x + 4;
}

2. YOU write C programs to do all that stuff, come back with actual questions and we'll do what we can to help.

Also, for future reference, post the errors you're getting with your code. The more you do to tell us what your issue is, the more likely we are to help you. Oh, and "plz" isn't a word.

Sodabread 88 Posting Whiz in Training

If you're looking to get into the non-indie professional game development industry, you'll want to learn C/C++, as that's the most widely used language set for large scale games.

If you're looking at getting into the indie games industry after school, you'll want to learn C/C++, C#, Python, Flash or another from a multitude of other languages/platforms.

If you're going for the former, check out Microsoft Visual C++ Express as your IDE/compiler. Read some tutorials on the IDE and the language and try out some basic programs to get you started.

Depending on where you go to college, your comp sci program may base you in Java, so take that into account as well. If you're going for a dedicated game development program at college such as Full Sail, Guildhall, or Digipen, you'll most likely use C++.

Other than that, come back and ask some specifics and we'll answer the best we can.

Welcome to DaniWeb =)

Sodabread 88 Posting Whiz in Training

Look up the .NET framework's MD5 framework. Documentation is here and you can search for plenty more besidse. Good luck.

Sodabread 88 Posting Whiz in Training

Have you written anything yet? If so, post it here and we'll help you where you have specific problems. If not, write something and come back with specific questions on where you're having trouble.

Sodabread 88 Posting Whiz in Training

It can be saved as an exe, and there's also a web player build format, but I'm not too familiar with what that actually is.

Sodabread 88 Posting Whiz in Training

Yes, you can import other models into Unity.

I agree with Roswell too. There's a lot of tools out there to help you achieve what you want to do, I just speak about the ones I specifically know of.

Sodabread 88 Posting Whiz in Training

It all depends on how much work you want to do and/or how much time you want to spend learning something else.

If you want something up and running super quick, I think Unity would be your best bet, but Torque can still get the job done. Unity has a full on 3D editor which will allow you to build your house layout in the editor, and compile that as your application, then just walk through it. I haven't used it much, but I believe that's how it could work for a simple application like you have.

Ogre3D is purely graphics (and comes with OIS, which is used for input), which will work, but you'll need to build your house layout in another application (such as Blender or Milkshape) and load it into your application. You can find plugins for popular 3D applications which will allow you to export your objects directly to the .mesh format, which is what's used in Ogre.

As far as what you're looking to do, I think Unity or Torque would honestly be your best bet to get something up and running super quick. Check them both out & decide what you like best.

Hope that helps.

faroukmuhammad commented: Awesome explanation +2
Sodabread 88 Posting Whiz in Training

Well, you need to create an OS specific window regardless, and that's OS level functionality. Some libs will take care of that for you, such as SDL or SFML, but if you want to do it from scratch, you'll have to manually create it somehow.

Check out nehe.gamedev.org and look at tutorial #1, which is how to setup OpenGL. You can use the code found there and modify it to work with main(). I'm sure there's a plethora of tutorials out there to show how to create a Windows window w/out WinMain.

The benefit of using WinMain is that it's already done for you when you create a win32 project and there's little you really have to understand about using it, besides changing the message loop, but setting that up is described in the tutorial on nehe.

Sodabread 88 Posting Whiz in Training

They don't need to "get into the protocol", whatever that means. All they need to do is pull the right strings to get the host to shut the site off. Not much can be done to defend against that.

Chances are, happygeek is correct and the EDL just sucks at the internet.

happygeek commented: correct :) +0
Sodabread 88 Posting Whiz in Training

OpenGL doesn't care as long as there's an application window to draw to, but I don't think the console is considered such. I could be wrong, though.

OpenGL itself isn't used to make windows, per se, as it just takes over a window that already exists. What do you consider the console look?

Sodabread 88 Posting Whiz in Training

Whoops. My bad on missing the actual question. To my knowledge and to the extent that I've worked with OGL, there's no difference at all. OpenGL only cares to have a window to draw to. Some game projects I worked on used main, where some used WinMain and I don't recall anyone ever complaining they couldn't do one thing or another because of the decision to use main or WinMain.

Hope that helps more than my last post =)

Sodabread 88 Posting Whiz in Training

1. Pick the best RFP by number of requirements met, then by lowest cost if there are multiples with the same number of requirements met.

2. Use strcat and see if the result of each combination is equal to that (strcmp) of any other word in your dictionary.

7. This one's a bit trickier with a few possible solutions, but think about using one or more for loops, strncmp and perhaps strncpy, depending on how you want to do it.

Check here: http://www.cplusplus.com/reference/clibrary/cstring/strncmp/ for some decent c string documentation.

Sodabread 88 Posting Whiz in Training

Generally speaking, I believe main is used when the application is compiled using the console subsystem and WinMain is used when compiled using the Windows subsystem.

I suggest searching for "WinMain vs. Main". That should pull up some results for you.

Sodabread 88 Posting Whiz in Training

For an easy library to get up and running, check out Ogre3D for graphics.

If you're looking to do even less work, you can check out Torque & Unity, as they're fully featured game engines, so you can just add your geometry (walls, floors, ceilings, etc..) and build and run.

Sodabread 88 Posting Whiz in Training

No need to apologize =)

Sodabread 88 Posting Whiz in Training

Try to figure it out for yourself. Come back with specific questions.

Sodabread 88 Posting Whiz in Training

The shape you're looking for is a trapezoid.

Poking around a bit on stackoverflow, I came upon this thread which seems to answer your question with a "No, not in 2D". http://stackoverflow.com/questions/2484071/how-do-i-compete-the-transformation-matrix-needed-to-transform-a-rectangle-into-a

If this doesn't answer your question, you should be able to find something about it on Google.

Sodabread 88 Posting Whiz in Training

My best guess would be that it made it easier to keep the pieces separate for keeping animations specific to a section of the body. This way a model can run in 4 directions, shoot/punch (gauntlet, FTW!) and pop a static head on top.

I don't think they had facial/head animations, but keeping the head static would, perhaps, reduce file size as there are no animations applied, rather than keeping head data in the model files.

I'm not 100% on that last part, but I think it makes sense.

Sodabread 88 Posting Whiz in Training

The freedom issue is a gray area, in my opinion. Many consider the i[deviceName] to be the cream of the crop as far as hand held smart devices go. In order to buy into that echelon of devices, one must be willing to give up certain freedoms. For those who hold this point of view, buying a BlackBerry, Android or other smart device are then sacrificing what they believe to be a lower quality product for the ability to do what they want with the device.

So, people who buy the devices will still buy the iSomething for the quality they want, but still long for more freedom after the fact.

Just my 2 pence.

Sodabread 88 Posting Whiz in Training

Because buttons cause postback and a postback is essentially a page refresh.

Sodabread 88 Posting Whiz in Training

As far as the export button, you'll have to select a format from the dropdown left of export, upon which the export text will become clickable.

Sodabread 88 Posting Whiz in Training

So you got everything figured out and working properly now?

Sodabread 88 Posting Whiz in Training

Very nice. I'm especially liking your characters in the first post =)

Sodabread 88 Posting Whiz in Training

You're close with grade = A, but since grade is a char, A needs to be a char, so you'll need to wrap it in single quotes.

If I may make a suggestion.. I think you might need to learn from a different source if you haven't learned yet how to initialize a variable but you've learned cin & if statements. Just doesn't make sense to me.

Sodabread 88 Posting Whiz in Training

You never actually set the grade variable to anything, so you're printing a variable with 'nothing' in it. I say 'nothing' because an uninitialized variable is full of garbage, not exactly nothing.

Sodabread 88 Posting Whiz in Training

1. Everything on one line after a // is commented out, including semicolons.
2. I'm assuming your "score and grade" text should be a comment. Make it one.
3. Your if/else statements aren't semicoloned properly.
4. Keep reading whatever you're learning C++ from. No offense, but it seems you don't yet have a firm grasp on syntax and how to form proper C++ statements.

Sodabread 88 Posting Whiz in Training

Remove the ; from int main();

You're going to have more semicolon problems throughout your code. (See if else statements)

Sodabread 88 Posting Whiz in Training

I'm trying to load dbghelp.dll in order to add stack walking to my error logger, but I'm getting null returned on LoadLibrary. I've opened up dbghelp in Dependency Walker, and it's giving me an error that it can't find ieshims.dll, but it's located where it should be in the IE folder. I'm using VS2008 Express.

Error logger init function (obviously not done):

void CErrorLog::Initialize()
{
	HINSTANCE hDLL;
	LPFNDLLFUNC1 dllFuncPtr;
	DWORD param1;
	unsigned int param2, retVal;
	
	hDLL = LoadLibrary((LPCWSTR)"dbghelp.dll");

	if(!hDLL)
	{
		HRESULT hr = HRESULT_FROM_WIN32(GetLastError());
		FreeLibrary(hDLL);
	}

	outFile.open("log.txt");
}

Any ideas as to what I can do to get this fixed? Thanks in advance.

Sodabread 88 Posting Whiz in Training

N/m. Ddanbe got to it first and explained it better =)

Sodabread 88 Posting Whiz in Training

You're incrementing 'i' before you print it out, so it's grabbing the width value of the next, uninitialized block.

blocks.Position[i] = new Vector2(width, height);
Console.WriteLine("Block#"+i+" Width: "+blocks.Position[i].X+" Height: "+height);
i++;
Sodabread 88 Posting Whiz in Training

WriteLine automatically adds a newline character. Write, on the other hand, does not.

Console.Write("");
Console.ReadLine();