|
Web services will be too slow for real-time video games, but could be OK for something like a chess or checkers game.
See Here[^] for a networked version of asteroids tutorial
MVVM # - I did it My Way
___________________________________________
Man, you're a god. - walterhevedeich 26/05/2011
.\\axxx
(That's an 'M')
|
|
|
|
|
Thanks Max
The game will have max 4 palyers so webservices are good choice to use for communicating between players?
|
|
|
|
|
Without knowing what type of game it is I can't comment
MVVM # - I did it My Way
___________________________________________
Man, you're a god. - walterhevedeich 26/05/2011
.\\axxx
(That's an 'M')
|
|
|
|
|
The game will have very simple graphic interface so all what the game will process that are few data rows and keeping updated some statuses which are stored in SQL Tables.
|
|
|
|
|
Connections via Web sockets would offer a more real time environment,
|
|
|
|
|
Thanks a lot Abhinav S I will check this too before i start developing project
|
|
|
|
|
Yes, you are right. Deploying web socket will increase your web communication speed.
|
|
|
|
|
Real time no, slow (the kind of thing that you get as browser games) yes as it means you don't need any custom central server, just a HTTP server set up with the service endpoint.
|
|
|
|
|
My Project is Windows Application C#
i Use in Connection String
connStr = String.Format(@"Data Source = {0}\{1};Mode = Read Only;Temp Path={2};",
System.IO.Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly().GetName().CodeBase),
sdfName,
System.IO.Path.GetTempPath());
My Project is Windows Application C#
i Use in Connection String
connStr = String.Format(@"Data Source = {0}\{1};Mode = Read Only;Temp Path={2};",
System.IO.Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly().GetName().CodeBase),
sdfName,
System.IO.Path.GetTempPath());
But Write in dvd Application Not Working
Error is :
The file name is not valid. Check the file name for the database
please help how project runing in cd-rom with sdf file (project is autorun)
|
|
|
|
|
If you break out that code and look at what it generates, it's fairly obvious what the problem is likely to be:
Assembly a = System.Reflection.Assembly.GetExecutingAssembly();
AssemblyName nm = a.GetName();
string s = nm.CodeBase;
string p = System.IO.Path.GetDirectoryName(s);
AssemblyName.CodeBase returns a value of the form:
file:///D:/Folder/Application.EXE Which GetDirectoryName truncates to:
file:///D:/Folder
The chances are that the SqlCeConnection class does not like that. Try:
System.IO.Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly().Location) instead.
|
|
|
|
|
hi
the code not Working
Error
Format of the initialization string does not conform to specification starting at index 0.
|
|
|
|
|
So check the generated string and copy and paste it in here so I can see what it is.
|
|
|
|
|
Kindly Check Screenshots first
http://i.stack.imgur.com/VcKux.png[^]
http://i.stack.imgur.com/jSPwD.png[^]
Hi All,
I want to have a single project which holds the DataSchema files like EDMX files.
The problem which i am facing is if i create a reference of the PRJDataSchema Project project and try to query the EmployeeEntity i get a "type used in a using statment must be implicitly convertible to 'System.IDisposable'"
How can i resolve this problem.
If i create a class file in PRJDataSchema , like i have created a Test.cs file then i get no problem.
I want to fix the problem in screenshot 1.
any help would be appreciated.
Exploring the Unexplored.
|
|
|
|
|
Issue solved by manually adding reference of "System.Data.Entity" to PRJDataAccess and then add it as using System.Data.Entity to the EmployeeDAL.cs.
Stupid me.
Exploring the Unexplored.
|
|
|
|
|
Have an upvote for posting your own answer.
The admission of stupidity is something we all have to make at some time.
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
I can't tell you the number of times the answer to a vexing problem has come to me the instant I clicked on the submit button!
I don't speak Idiot - please talk slowly and clearly
"I have sexdaily. I mean dyslexia. Fcuk!"
Driven to the arms of Heineken by the wife
|
|
|
|
|
True
Exploring the Unexplored.
|
|
|
|
|
how to add autocad tool box items to my wpf application?
|
|
|
|
|
|
Hi,
Imam using this to close the connection but I feel after many entries that the system will be slow and it will take a very long to run the process.. so is this enough:
if (sql_reader != null) sql_reader.Close();
if (sql_connection != null) { if (sql_connection.State == ConnectionState.Open) sql_connection.Close(); }
Technology News @ www.JassimRahma.com
|
|
|
|
|
That'll close the reader and the connection, but will not dispose of it - leaving that to the GC. Ideally, they'd be wrapped in a using-block.
Jassim Rahma wrote: I feel after many entries You're not opening/closing the connection in a loop, are you?
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|
|
You're not opening/closing the connection in a loop, are you?
what do you mean?
I tried this now and will observe it for sometime:
if (sql_reader != null) { sql_reader.Close(); sql_reader.Dispose(); }
if (sql_connection != null) { if (sql_connection.State == ConnectionState.Open) { sql_connection.Close(); sql_connection.Dispose(); } }
Technology News @ www.JassimRahma.com
|
|
|
|
|
Jassim Rahma wrote: what do you mean?
for (i = 1 to 5000)
{
IDatabase idb = new SqlDatabase();
idb.Open();
ICommand.ExecuteNonQuery;
idb.Close();
}
Jassim Rahma wrote: I tried this now and will observe it for sometime: Observe it? To see if it behaves?
Are you also disposing of the command?
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|
|
Summing up what was indirectly referred to in the other response.
When you close a database resource, like a reader or connection you should also call Dispose. There are different ways to do that. You should do it EXPLICITLY in your code and you should not rely on garbage collection to do it for you.
When you close a data reader it can take time. That is implied in the documentation for close. If you don't want it to take that long then don't do as much with it before you close (and dispose) it.
Jassim Rahma wrote: I feel after many entries that the system will be slow a
Your belief is probably ill founded. Resource management, when done correctly, will seldom even be measurable much less significant in an application. What is likely to be far more significant is what you actually do with the database and how you do it. So for example it takes far more time to do a database query than it does to close/dispose of the connection you used to do the query.
|
|
|
|
|
Hello to all
I have an application in LAN on a page that contains a GridView I want to disable or prevent
The edition of a line when it is already in edit mode by another user
Thank you.
|
|
|
|