Yeah you should watch out for Plenderj ;).Quote:
Posted by NoteMe
....BAD BAD moderator....
Printable View
Yeah you should watch out for Plenderj ;).Quote:
Posted by NoteMe
....BAD BAD moderator....
Yeah. it deserves a place in the demo section....;) Then you can look it up again after some years, and see how much better you are too...thats always fun..:D
Quote:
Originally posted by Electroman
Yeah you should watch out for Plenderj ;).
Ohhh..I forgot he is a mod too..:D
hey hust a thought how do u recon i could incoperate a scoring system into it i was just thinking there nothing keeping track of ur victory i was thinking highest scroes od times finshed in etc how woul that work?
You just have to deside for your self how you want it to score. But the most importen ting is that you need to know how to make files in VB. Do a search on the forum.
Then when you know that. After a person has died, make him write in his name and then save that togheter with his score.
ØØ
but how do i get it do list it by the highest first and lowest last and could i get another time thats counting up and it takes that final time and puts it into a lable on a seperate form and bing up the time in that or is that crazy man thinking?
or get the final resdult on the counter thats there and say they have done it with these many seconds left on another form umm?
No problem.
Fir the timer. You need no extra timer. You can just add a line in the timer event, that raises a variable with 1 every time.
Since you are having so many forms, it's probably best to save that variable in a module. SInce then it is public for all the forms.
ABout the sorting. Yeah it is possible. Just need a bit of logic. It's big computer clases that discus how to do this. But I managed it a long time before I started to program at school. So do you. You just have to find a format for the file to be saved, so you are 100% sure, how they are saved, and then can read the list and get the diffrent names saved, and the diffrent times saved in arrays. Then it's the logic you need to write down on a paper to know how to sort it.
- Take the first one out. Find the biggest one, and then put it there.
- Put the one you picked up in the now empty space.
- Then pick up the second one, find the biggest of the rest of the entries, and do the same, on and on again...
Yup that is possible too. Just increase the value that you have stored in the module, and then show it after they have finished the game in a text box like you do every day..Quote:
Originally posted by Llewells
or get the final resdult on the counter thats there and say they have done it with these many seconds left on another form umm?
what does those ims do and that option part? whats the data type of them and there range of valuesVB Code:
[B]Option Explicit Dim map(15, 9) As Long Dim X As Long Dim Y As Long[/B] Private Sub cmdExit_Click() End End Sub Private Sub cmdMenu_Click() Load frmLevel frmLevel.Show frmMaze1.Hide End Sub Private Sub Form_KeyUp(KeyCode As Integer, Shift As Integer) If KeyCode = 39 Then If map(X + 1, Y) = 1 Then X = X + 1 picSnail.Left = picSnail.Left + Picture1.Width End If ElseIf KeyCode = 37 Then If map(X - 1, Y) = 1 Then X = X - 1 picSnail.Left = picSnail.Left - Picture1.Width End If If map(X - 1, Y) = 2 Then X = X - 1 picSnail.Left = picSnail.Left - Picture1.Width Load frmWon Timer1.Enabled = False frmWon.Show End If ElseIf KeyCode = 38 Then If map(X, Y - 1) = 1 Then Y = Y - 1 picSnail.Top = picSnail.Top - Picture1.Height End If ElseIf KeyCode = 40 Then If map(X, Y + 1) = 1 Then Y = Y + 1 picSnail.Top = picSnail.Top + Picture1.Height End If End If End Sub Private Sub Form_Load() Timer1.Enabled = True X = 14 Y = 1 map(0, 0) = 0 map(1, 0) = 0 map(2, 0) = 0 map(3, 0) = 0 map(4, 0) = 0 map(5, 0) = 0 map(6, 0) = 0 map(7, 0) = 0 map(8, 0) = 0 map(9, 0) = 0 map(10, 0) = 0 map(11, 0) = 0 map(12, 0) = 0 map(13, 0) = 0 map(14, 0) = 0 map(0, 1) = 2 map(1, 1) = 1 map(2, 1) = 1 map(3, 1) = 0 map(4, 1) = 1 map(5, 1) = 1 map(6, 1) = 1 map(7, 1) = 1 map(8, 1) = 1 map(9, 1) = 1 map(10, 1) = 1 map(11, 1) = 1 map(12, 1) = 1 map(13, 1) = 1 map(14, 1) = 1 map(0, 2) = 0 map(1, 2) = 0 map(2, 2) = 1 map(3, 2) = 0 map(4, 2) = 1 map(5, 2) = 0 map(6, 2) = 0 map(7, 2) = 0 map(8, 2) = 1 map(9, 2) = 0 map(10, 2) = 0 map(11, 2) = 1 map(12, 2) = 0 map(13, 2) = 0 map(14, 2) = 0 map(0, 3) = 0 map(1, 3) = 1 map(2, 3) = 1 map(3, 3) = 0 map(4, 3) = 0 map(5, 3) = 1 map(6, 3) = 1 map(7, 3) = 0 map(8, 3) = 1 map(9, 3) = 0 map(10, 3) = 1 map(11, 3) = 1 map(12, 3) = 0 map(13, 3) = 0 map(14, 3) = 0 map(0, 4) = 0 map(1, 4) = 0 map(2, 4) = 1 map(3, 4) = 1 map(4, 4) = 0 map(5, 4) = 1 map(6, 4) = 0 map(7, 4) = 0 map(8, 4) = 1 map(9, 4) = 0 map(10, 4) = 0 map(11, 4) = 0 map(12, 4) = 1 map(13, 4) = 1 map(14, 4) = 0 map(0, 5) = 0 map(1, 5) = 0 map(2, 5) = 0 map(3, 5) = 1 map(4, 5) = 1 map(5, 5) = 1 map(6, 5) = 1 map(7, 5) = 1 map(8, 5) = 1 map(9, 5) = 1 map(10, 5) = 1 map(11, 5) = 0 map(12, 5) = 1 map(13, 5) = 0 map(14, 5) = 0 map(0, 6) = 0 map(1, 6) = 1 map(2, 6) = 1 map(3, 6) = 1 map(4, 6) = 0 map(5, 6) = 1 map(6, 6) = 0 map(7, 6) = 1 map(8, 6) = 0 map(9, 6) = 0 map(10, 6) = 1 map(11, 6) = 0 map(12, 6) = 1 map(13, 6) = 0 map(14, 6) = 0 map(0, 7) = 0 map(1, 7) = 1 map(2, 7) = 0 map(3, 7) = 1 map(4, 7) = 0 map(5, 7) = 1 map(6, 7) = 0 map(7, 7) = 1 map(8, 7) = 1 map(9, 7) = 1 map(10, 7) = 1 map(11, 7) = 1 map(12, 7) = 1 map(13, 7) = 0 map(14, 7) = 0 map(0, 8) = 0 map(1, 8) = 0 map(2, 8) = 0 map(3, 8) = 0 map(4, 8) = 0 map(5, 8) = 0 map(6, 8) = 0 map(7, 8) = 0 map(8, 8) = 0 map(9, 8) = 0 map(10, 8) = 0 map(11, 8) = 0 map(12, 8) = 0 map(13, 8) = 0 map(14, 8) = 0 End Sub Private Sub Timer1_Timer() lblTime.Caption = Val(lblTime.Caption) - 1 If (Val(lblTime.Caption) = 0) Then Timer1.Enabled = False Load frmLost frmLost.Show End If End Sub
VB Code:
Dim map(15, 9) As Long Dim X As Long Dim Y As Long
Al of them are Long. If you have MSDN is says there the range of them.
But this time I can tell you...
Long are stored as signed 32-bit (4-byte) numbers ranging in value from -2,147,483,648 to 2,147,483,647
unfortunatly i dont have a MSDN :( unless i do and im a proper n00b :lol:
But you have internet...;)
msdn.microsoft.com
;)
true true ;)