Jump to content

  • Log In with Google      Sign In   
  • Create Account

How to import graphics and sound into game ?


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
1 reply to this topic

#1 HuaHsin   Members   -  Reputation: 122

Like
Likes
Like

Posted 18 October 2001 - 04:16 PM

Hi! I got 2 question to ask. 1) How can I import a graphics (jpg and animation) and sound (mp3, wav or midi) into a game which is create in VC++ and VB6. 2) I know the software called MAYA and 3D Studio MAX, what I desire to do is create an animation or movie and then import into game. But I don''t know how to import? Can anyone teach me or any suggestion to import animation and sound? Hope you will help me. Thank you. KOK@HOE

Sponsor:

#2 evaclear   Members   -  Reputation: 162

Like
Likes
Like

Posted 19 October 2001 - 03:36 AM

This is quite a complex request. So it can''t be summed up in a single message board post however I can give you the steps envolved.

#1. Search the net for the file formats you wish to use. (www.wotsit.org has a pretty complete list).
#2. Now that you know what the file format looks like it''s time to move on. Next step is to Open the file using a C command like fopen(). The file is in binary format so you want to use the "rb" parameter in Fopen which stands for Read Binary.
#3. Now the file is opened, you can create a structure which represents the data. Example (if the file format says that the first element in the file format is a integer, and the second is a float) struct OpenFile { int FirstFileParameter; float SecondFileParameter; }; (usualy file formats are more complex than this)

#4. Now it''s time to read in the data to the buffer. We''ll use a C command called fread(&OpenFile, sizeof(OpenFile), 1);
Now everything that was in the file is in the OpenFile structure.

#5. Close the file, using a command like fclose();

Now everything is in memory. And from that point on it''s up to you to determine how to play it, or display it on the screen.







Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS