starcraft Posted July 2, 2003 Posted July 2, 2003 ok i feel dumb but i went to mutants site and read all three tutorials and build the base for the games. but... what now how do i build onto that? how do i create a game off those settings? o and i have some terms in the non-3d drawing tutorial that are underlined in blue. Quote
*Experts* mutant Posted July 2, 2003 *Experts* Posted July 2, 2003 What do you mean underlined in blue? You get errors? If thats the case then what are the errors? Tell me what they are so I can fix it, im bad at proofreading (a proof of that is all the typos I left in the tutorials that I had to fix later :) ) Well, to build from that really depends on what you want to do. If 3D then I suggest you look for some meshes, and if 2D for some spirtes so you can learn to load meshes and stuff like that, or learn some basic lets say graphics movement for some character in a 2D game. I will be adding more tutorials in very near future, so I hope they will be some help :) Quote
*Experts* Nerseus Posted July 2, 2003 *Experts* Posted July 2, 2003 Blue is usually warnings (in C# it is, I would think it's true for VS in general). Check your task list to see a description or hover over a blue line to read it. It's probably variables declared but not used, or unreachable code, or something similar. As for coding a game... do you have anything in mind? It's generally a good idea to know what you want to code before starting to build anything. But maybe your intuition will lead you to writing the best game ever! :p -Nerseus Quote "I want to stand as close to the edge as I can without going over. Out on the edge you see all the kinds of things you can't see from the center." - Kurt Vonnegut
starcraft Posted July 2, 2003 Author Posted July 2, 2003 ok i'll enter the EXACT thing its telling me is wrong: "Type 'gameform()' is not defined" in "Dim frmGame As New GameForm()" "Type'GraphicsClass.Me.Show()'is not defined" in "Dim gamegraphics As GraphicsClass.Me.Show()" "Declaration Expected" in "gamegraphics = New GraphicsClass(Me)" "Type 'gamegoes' is not defined" in "If gamegoes = False Then" "Sub 'Dispose' shadows an overloadable member declared in the base class 'form'. If you want to overload the base method, this mothod must be declared 'overload'" in "Public Sub Dispose()" "Type 'gamegoes' is not defined" in "gamegoes = False" those are the errors i get in the non 3d tutorial code. i may have miss typed/ understood/ or just screwed up some how but those are what i get. I would like to start small in the sense of making games. i would like to make a 2 in 1 Chese/ checker game, and i would like to show the peices sliding from spot to spot. How would i approch this? Ps. i dont think i will create the best game any time so, do keep yourself waiting :p pss. is there a way i could show the peices attack eachother? like a checker hop ontop of antoher to take it, a chese peice knocking another peice over. nothing fancy, just wondering. and i wont to do 2 d unless u guys think i would be better in 3d Quote
*Experts* mutant Posted July 2, 2003 *Experts* Posted July 2, 2003 (edited) Typos, typos :rolleyes: Ok, well go one by one "Type 'gameform()' is not defined" in "Dim frmGame As New GameForm()" It should be the other way around :) Dim GameForm as new frmGame "Type'GraphicsClass.Me.Show()'is not defined" in "Dim gamegraphics As GraphicsClass.Me.Show()" You got that wrong but but this is a how its supposed to look: Dim gamegraphics As GraphicsClass "Declaration Expected" in "gamegraphics = New GraphicsClass(Me)" This will be fixed by the previous one. "Type 'gamegoes' is not defined" in "If gamegoes = False Then" I didnt make it clear enough to declare that variable, just declare it on the top of your code. "Sub 'Dispose' shadows an overloadable member declared in the base class 'form'. If you want to overload the base method, this mothod must be declared 'overload'" in "Public Sub Dispose()" Here you probably misread it becuase this is supposed to go into the GraphicsClass class, not in the form, it says it there in the text. :) "Type 'gamegoes' is not defined" in "gamegoes = False" Same as the one excatly like this above :) Edited July 2, 2003 by mutant Quote
starcraft Posted July 3, 2003 Author Posted July 3, 2003 i dont know i did all that and i have even more errors, i'll just stick woth 3d it would be to hard to do 2d cause i have to many misakes and i already have the 3d ready to go. How would i build onto the 3d tutorial to create a Chese/ Checker 2 in one game?. cuase i get the gist of the code, but i dont know how i would plug into it. :mad: I'm kind of walking in the dark here cause all the work i've done with vb has been form making :-\ so i dont know the first thing about game making, as i said i looked at the code and understand the main points, though i dont know it in detail. would the next step be to set the 'rules'? i read some where that the first thing u wont to do is build the base for the game, though he didn't talk about all the system drawing and things. he said to put the 'rules' in a modual, i think its spelled wrong. Is this the next step? is so how do i create the rules? Quote
*Experts* mutant Posted July 3, 2003 *Experts* Posted July 3, 2003 Other people can get it to compile and work, hmm... Ok, by rules I think that person meant that you should write down what you want your game to do excatly, set the rules of your game. Thats a good approach to it :) Quote
starcraft Posted July 4, 2003 Author Posted July 4, 2003 ok how would i set up something that determinds weather is accecable by a peice? knight does the 3 by 1, the pon (? spell check ;) ) up 1 exept on first move, things like that? Quote
*Experts* mutant Posted July 5, 2003 *Experts* Posted July 5, 2003 You could make a structure for each square, and have some value in it like, Suqare(1).Occupied = False. And then you would determine where the figure can move and then look into the occupied value of a square. This is just an example of some things you could do. Quote
starcraft Posted July 6, 2003 Author Posted July 6, 2003 ok i'll try that and play around. what would i use to like Square(1)? a label? Quote
starcraft Posted July 7, 2003 Author Posted July 7, 2003 i have the board drawn, but i mean how do i make x45-y45 through x90-y90 square 2 or something like that how do i tell it that there is a "square" that can be occupied? Quote
*Experts* mutant Posted July 15, 2003 *Experts* Posted July 15, 2003 (edited) Originally posted by starcraft ok i'll try that and play around. what would i use to like Square(1)? a label? You mean what do you draw squares with? If thats the question then use GDI+ or DirectDraw. Here is the example of what I said before: Structure Field Dim Occupied As Boolean 'if is occupied Dim LetterPosition As Char 'what letter corresponds to it on the board Dim NumberPosition As Integer 'what number corresponds to it on the board End Structure Dim Square(63) As Field You could make an array of structures, each holding info such as if the square is occupied and things like that. You would also include in that structure X and Y coordinates that would mark where the square is drawn. Then when painting you would get the X and Y values and draw it. Then when you place a figure on the board you would determine what square is the target and check the Occupied value for the structure that contains that square. Do you have any code done yet? Edited July 15, 2003 by Nerseus Quote
starcraft Posted July 15, 2003 Author Posted July 15, 2003 yeah i have the code here, just the basic structure, but here it is: Public Class Form1 Inherits System.Windows.Forms.Form #Region " Windows Form Designer generated code " Public Sub New() MyBase.New() 'This call is required by the Windows Form Designer. InitializeComponent() 'Add any initialization after the InitializeComponent() call End Sub 'Form overrides dispose to clean up the component list. Protected Overloads Overrides Sub Dispose(ByVal disposing As Boolean) If disposing Then If Not (components Is Nothing) Then components.Dispose() End If End If MyBase.Dispose(disposing) End Sub 'Required by the Windows Form Designer Private components As System.ComponentModel.IContainer 'NOTE: The following procedure is required by the Windows Form Designer 'It can be modified using the Windows Form Designer. 'Do not modify it using the code editor. Friend WithEvents MainMenu1 As System.Windows.Forms.MainMenu Friend WithEvents MenuItem1 As System.Windows.Forms.MenuItem Friend WithEvents MenuItem2 As System.Windows.Forms.MenuItem Friend WithEvents MenuItem3 As System.Windows.Forms.MenuItem <System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent() Me.MainMenu1 = New System.Windows.Forms.MainMenu() Me.MenuItem1 = New System.Windows.Forms.MenuItem() Me.MenuItem2 = New System.Windows.Forms.MenuItem() Me.MenuItem3 = New System.Windows.Forms.MenuItem() ' 'MainMenu1 ' Me.MainMenu1.MenuItems.AddRange(New System.Windows.Forms.MenuItem() {Me.MenuItem1}) ' 'MenuItem1 ' Me.MenuItem1.Index = 0 Me.MenuItem1.MenuItems.AddRange(New System.Windows.Forms.MenuItem() {Me.MenuItem2, Me.MenuItem3}) Me.MenuItem1.Text = "File" ' 'MenuItem2 ' Me.MenuItem2.Index = 0 Me.MenuItem2.Text = "New Game" ' 'MenuItem3 ' Me.MenuItem3.Index = 1 Me.MenuItem3.Text = "Exit" ' 'Form1 ' Me.AutoScaleBaseSize = New System.Drawing.Size(5, 13) Me.BackColor = System.Drawing.Color.White Me.ClientSize = New System.Drawing.Size(400, 401) Me.Menu = Me.MainMenu1 Me.Name = "Form1" Me.Text = "Form1" End Sub #End Region Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load SetStyle(ControlStyles.DoubleBuffer, True) 'to reduce flicker if there will be any End Sub Private Sub MenuItem3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MenuItem3.Click End End Sub Private Sub MenuItem2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MenuItem2.Click End Sub Private Sub Form1_Paint(ByVal sender As Object, ByVal e As System.Windows.Forms.PaintEventArgs) Handles MyBase.Paint Dim X As Integer Dim y As Integer For X = 0 To 360 Step 90 For y = 0 To 360 Step 90 e.Graphics.FillRectangle(New SolidBrush(Color.Black), X, y, 45, 45) Next Next For X = 45 To 315 Step 90 For y = 0 To 360 Step 90 e.Graphics.FillRectangle(New SolidBrush(Color.White), X, y, 45, 45) Next Next For X = 45 To 315 Step 90 For y = 45 To 315 Step 90 e.Graphics.FillRectangle(New SolidBrush(Color.Black), X, y, 45, 45) Next Next For X = 0 To 360 Step 90 For y = 45 To 315 Step 90 e.Graphics.FillRectangle(New SolidBrush(Color.White), X, y, 45, 45) Next Next End Sub End Class thats what i got so far, and what i have there works, but like were trying to explain above, which i understand what u were trying to explain but i dont know how to use arrays and the things you would talking about, but it draws that squars things like that but i dont know how to move from here. :( Quote
*Experts* mutant Posted July 15, 2003 *Experts* Posted July 15, 2003 What dont you understand about arrays or strucutres? Quote
*Experts* mutant Posted July 17, 2003 *Experts* Posted July 17, 2003 But what dont you understand about array and strucutres? The whole concept of them or just some parts of them? :) Quote
starcraft Posted July 17, 2003 Author Posted July 17, 2003 i dont know squat..... i have only heard of them.. :( Quote
*Gurus* divil Posted July 18, 2003 *Gurus* Posted July 18, 2003 Buy a programming book, and read it. Quote MVP, Visual Developer - .NET Now you see why evil will always triumph - because good is dumb. My free .NET Windows Forms Controls and Articles
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.