473,396 Members | 2,010 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,396 software developers and data experts.

How to save a game status in a file????

36
Hello frnds! I hve written a game in java & it is completed except saving & loading, ca anybody tell me how can i save a game status in a file ?????
Apr 24 '08 #1
5 7345
BigDaddyLH
1,216 Expert 1GB
Hello frnds! I hve written a game in java & it is completed except saving & loading, ca anybody tell me how can i save a game status in a file ?????
How about a tutorial? http://java.sun.com/docs/books/tutor.../io/index.html

It's also not clear how much data you need to save, but the Preferences API may be appropriate:

http://java.sun.com/j2se/1.4.2/docs/...eferences.html
Apr 24 '08 #2
JosAH
11,448 Expert 8TB
... or encapsulate all the data of the game status in a single class, say GameStatus
and make that class Serializable; you can save or load such an object in one single
read using the serialization mechanism and set the status of your game again.

kind regards,

Jos
Apr 25 '08 #3
r035198x
13,262 8TB
... or encapsulate all the data of the game status in a single class, say GameStatus
and make that class Serializable; you can save or load such an object in one single
read using the serialization mechanism and set the status of your game again.

kind regards,

Jos
... and there is also an article on serialization in the howTos section if you decide to go that route.
Apr 25 '08 #4
pankajs
36
where i can find this article on serialization???
can u give a link to it?????
Apr 26 '08 #5
JosAH
11,448 Expert 8TB
where i can find this article on serialization???
can u give a link to it?????
Can't you click on the 'Howtos' link above, select the Java articles and find the
article in the small list?

kind regards,

Jos
Apr 26 '08 #6

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

Similar topics

2
by: Duy Nguyen | last post by:
how can I save an image file to database?
2
by: buran | last post by:
Dear ASP.NET Programmers, I am saving the tables of a dataset into an XML file. I want to save the XML file into the database, then retireve it as a dataset. I use the following code: ...
3
by: rodchar | last post by:
hey all, i was wondering once i save my xml file to a folder what would be my options to make sure that file is encrypted? i guess what would be some different ways to handle this is what, i (a...
3
by: needin4mation | last post by:
Hi, I have access 97. I can upgrade if I have to (but that will cost more money :)). If I want to read a row, parse that row, and then save the values to an HTML file, will VBA do that? Say I...
11
by: Thomas Magma | last post by:
I have a simple JavaScript application that will generate some text type data for the end user. Is it possible to have a button that will allow them to save this information to a text file? ...
0
by: Hexman | last post by:
Hello All, Its a bit more complicated than the subject line implies. A website that I use for information allows me to click on a link and their .PDF displays in IE's browser window.. Since...
0
by: =?Utf-8?B?S29vcyBC?= | last post by:
I used FTW to collect Files & Settings from old computer. Flash drive used as medium. Found to my horror that USMT.unc contains .dat file only. How can I put togehter or simulate status file?...
1
by: MichaelMelaku | last post by:
I am trying to save a txt file onto the client local drive (c:\Temp.txt) which will contain only xy coordinates generated by my web app. This txt file is to be consumed by another desktop app...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
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
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.