473,410 Members | 1,889 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,410 software developers and data experts.

Save Game Info and Read Info Later

Hi,
I was wanting to make a game with the ability to save the level and the score. I would also like it to be able to load that saved game. Lastly I would like it to be able to save a high score list and display it later. If you can help I need this before 5/28/07.

Thanks

Quick help is greatly appreciated!
May 24 '07 #1
3 1530
SammyB
807 Expert 512MB
Hi,
I was wanting to make a game with the ability to save the level and the score. I would also like it to be able to load that saved game. Lastly I would like it to be able to save a high score list and display it later. If you can help I need this before 5/28/07.

Thanks

Quick help is greatly appreciated!
Haven't we done this before ;)
To quote Killer from last time:
"Sounds an interesting idea. I hope it works out.

However, we generally expect people to work out what they want to do, and make some attempt at it. Then, when you have specific questions about points where you get stuck we can help with the how.

What have you achieved so far on this project?"

Is this still in VBA?
May 24 '07 #2
Haven't we done this before ;)
To quote Killer from last time:
"Sounds an interesting idea. I hope it works out.

However, we generally expect people to work out what they want to do, and make some attempt at it. Then, when you have specific questions about points where you get stuck we can help with the how.

What have you achieved so far on this project?"

Is this still in VBA?
This is now VB Express 2005.

So far I have found this code:

Expand|Select|Wrap|Line Numbers
  1. Dim TextVar As String
  2.  
  3. Sub Form_Load()
  4.  
  5. End Sub
  6.  
  7. Sub Command1_Click()
  8. TextVar = Text1.text'Saves the text string into a variable
  9. Open "AnyFileYouWant.TXT" for output as #1
  10. Write #1, TextVar'or you can save without having quotes in your file
  11. 'by replacing the word write with the word print
  12. 'but you can only save a line not a whole bunch of lines
  13. close #1
  14.  
  15. End Sub
  16.  
  17. Sub Command2_Click()
  18. Open "AnyFileYouWant.txt" for input as #1
  19. do until EOF(1)
  20. input #1, TextVar
  21. text1.text = TextVar
  22. loop
  23. close #1
  24. End Sub
  25.  
  26. Sub Text1_Change()
  27.  
  28. End Sub
I don't understand where this saves the file. Can anyone tell me? I also want to know if using this code if I can save different text boxes on different lines and only overwrite certain lines.
May 24 '07 #3
SammyB
807 Expert 512MB
You'll need to use StreamWriter's and StreamReader's in .Net. It's explained at http://support.microsoft.com/kb/304427
May 24 '07 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: O'Neal Computer Programmer | last post by:
I was reading here: http://groups.google.com/groups?q=elemental+group:comp.lang.python.*&hl=en&lr=&ie=UTF-8&group=comp.lang.python.*&selm=mailman.1044572235.32593.python-list%40python.org&rnum=3...
14
by: BlackHawke | last post by:
My Name is Nick Soutter, I am the owner of a small game company, Aepox Games (We're in the middle of a name change from "Lamar Games"), www.lamargames.net. Our first commercial game,...
138
by: theodp | last post by:
--> From http://www.techdirt.com/articles/20040406/1349225.shtml Microsoft Patents Saving The Name Of A Game Contributed by Mike on Tuesday, April 6th, 2004 @ 01:49PM from the...
40
by: Mark G. Meyers | last post by:
http://www.savetheinternet.com There is more info and A PETITION at moveon... Easy to sign and give your two cents (and to your own reps in the process)....
1
by: Irene | last post by:
Hello all! I'm creating a web site in ASP.NET (VB.NET). One of the requirements was to allow users to create orders going through several steps. A must have is to have an option to save the work...
1
tpgames
by: tpgames | last post by:
I don't understand how to write a JavaScript to save the users progress in a game, so they can go back to the game at a later time. There is two games that really need this functionality, a php...
0
by: Jeff Rush | last post by:
At PyCon this year we're going to have a multi-day game programming clinic and challenge. This is a first-time event and an experiment to find those in the Python community who enjoy playing and...
0
by: 1388-2/HB | last post by:
I have a page with a significant number of dynamically created radio buttons, checkboxes and textboxes. When a user is presented with this form and subsequently fills a bunch of stuff out, when...
19
by: foolsmart2005 | last post by:
I have written a snake game. There are 2 levels in the game(I finished 1st level). It can run in VC++ without problem but, when I run it on the dev C++ 4.9.9.2, it cannot run. I want to...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.