Programming Forums
User Name Password Register
 

RSS Feed
FORUM INDEX | TODAY'S POSTS | UNANSWERED THREADS | ADVANCED SEARCH

Reply
 
Thread Tools Display Modes
Old May 23rd, 2006, 6:13 PM   #11
lectricpharaoh
Caffeinated Neural Net
 
lectricpharaoh's Avatar
 
Join Date: Jun 2005
Location: Dry west coast of Canada
Posts: 1,005
Rep Power: 5 lectricpharaoh will become famous soon enough
Okay, things you need to know to write a game include general program logic and basic I/O (you need input from the user, after all). You also need to learn how to validate that input, so that your program doesn't puke on its shoes when the user does something 'wrong' (which users do quite often).

Other things that you will likely need to learn are:


  • File handling- otherwise, you cannot save/load games, high scores, etc, or dynamically load graphics at runtime- in other words, all the graphics would need to be embedded in the .EXE, which is generally an inflexible approach)
  • Graphics- depending on the type of game; text adventures, for example, don't need graphics, but the vast majority of games today make heavy use of them. Also, how you handle graphics varies from system to system, and even on one system, there are various ways to do it.
  • Sound- most games also rely heavily on digital sound effects and music. Like graphics programming, sound programming is highly dependant on the target platform.
  • Data structures- things like linked lists, binary search trees, and the like. These are important in most games programming, just as they are in regular applications or systems programming, but in games, there is an emphasis on choosing the fastest algorithms, so even if you don't learn to write your own, you at least need to learn how to pick the most appropriate ones to use.
So, as you can see, there's lots to learn, especially for games programming. Besides, as to your original question, maybe if you offered a little more information (what kind of game, etc), it would help.
__________________
And once again, Probability proves itself willing to sneak into a back alley and service Drama as would a copper-piece harlot.
- Vaarsuvius, Order of the Stick
lectricpharaoh is offline   Reply With Quote
Old May 23rd, 2006, 8:24 PM   #12
Eric the Red
Hobbyist Programmer
 
Eric the Red's Avatar
 
Join Date: Feb 2006
Posts: 214
Rep Power: 0 Eric the Red is an unknown quantity at this point
Please try learning this somewhere else first. Use this more as a guideline. If you just copy and paste this.. you won't learn a thing. Thus, the harder stuff will seem impossible.

Opening a file

   intNewFile = FreeFile
    
   cdl1.Filter = "Text files (*.bat)|*.bat"
   cdl1.ShowOpen
    
   If cdl1.FileName <> "" Then
       Open cdl1.FileName For Input As #intNewFile
       txtFile.Text = ""
        Do While Not EOF(intNewFile)
            Line Input #intNewFile, strTextLine
           txtFile.Text = txtFile.Text + strTextLine & vbCrLf
            blnFile = True
        Loop
        Close #intNewFile
    End If
strFileName = cdl1.FileName
timerCheckFile.Enabled = True
strStats = txtFile.Text


//********

saving a file

intNewFile = FreeFile
    
      ' cdl1.Filter = "Text file (*.txt)|*.txt"
    cdl1.InitDir = "H:\ICS3M"
    cdl1.Filter = "Text file (*.bat)|*.bat"
    cdl1.Flags = cdlOFNOverwritePrompt
    cdl1.ShowSave
    
    If cdl1.FileName <> "" Then
        Open cdl1.FileName For Output As #intNewFile
        Print #intNewFile, txtFile.Text
        Close #intNewFile
    End If
    
    strFileName = cdl1.FileName
__________________
Death smiles at us all. All a man can do is smile back.
Eric the Red is offline   Reply With Quote
Old May 24th, 2006, 2:09 AM   #13
msk420
Programmer
 
msk420's Avatar
 
Join Date: May 2006
Posts: 85
Rep Power: 3 msk420 is on a distinguished road
Quote:
Originally Posted by Donnie
im really dissapointed to tell you this but (i dont know how to handle files)
It's kind of sad that you come here and ask us for code for a game that your coding. How do you feel about that? I think that you should actually learn how to program before you come to the forums again, or you could check out the tutorials and then you can post about things. But please do not bother us with useless posts, and then tell us that you dont know how to handle files in VB. I am a C++ programmer but I saw this thread and it took me back to my VB days and I'm sorry but you need to learn more.
__________________
Code Forums
msk420 is offline   Reply With Quote
Old May 24th, 2006, 12:04 PM   #14
Donnie
Newbie
 
Donnie's Avatar
 
Join Date: May 2006
Posts: 10
Rep Power: 0 Donnie is on a distinguished road
not really that but the opening code i had screwed up majorley but do u really think thats non hackable to newbies?? or peeople who cant program???
Donnie is offline   Reply With Quote
Old May 24th, 2006, 1:37 PM   #15
niteice
Programmer
 
niteice's Avatar
 
Join Date: Aug 2005
Posts: 98
Rep Power: 4 niteice is on a distinguished road
Send a message via AIM to niteice
Um, what? "non hackable to newbies" is a very broad definition. Since you're storing the data in text files, I'll assume it's plain text since you're storing the data that will be in the list box. So, if you want security, that's not what you do.
niteice is offline   Reply With Quote
Old May 24th, 2006, 7:28 PM   #16
Eric the Red
Hobbyist Programmer
 
Eric the Red's Avatar
 
Join Date: Feb 2006
Posts: 214
Rep Power: 0 Eric the Red is an unknown quantity at this point
It's been a while since I've used VB 6. However, the code I posted uses a common dialogue box. If you want to save to a file without a common dialogue box, then just do some research.
__________________
Death smiles at us all. All a man can do is smile back.
Eric the Red is offline   Reply With Quote
Reply

Bookmarks

« Previous Thread in Forum | Next Thread in Forum »

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump




DaniWeb IT Discussion Community
All times are GMT -5. The time now is 4:19 AM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC