C# EXE and website integration?

S

Sparticus

hey all,

I have developed a flash game. I am trying to prevent cheaters from
submitting fake high scores. To do this, I record ever action they
make in the game, and when the game is over I send all these actions
and their high score to the server.

On the server side I have made a C# application that reads in the
actions they made and their high score. The C# application then loads
the flash game and recreates what they did in their game. At the end
of the recreation, if the score they claim they had matches they score
that their actions result in, I submit the score to the database. If
it doesn't match, I know they cheated (ie. edited a memory address)
and I don't submit the score to the database.

That all works great.

However, the C# appllcation is just an EXE file that reads in
parameters. I'm trying to figure out a way to integrate everything so
that when the user playing the flash game ends their game, the C# code
will immediatley get the values and determine if they were cheating.
If they were not cheating, it'll thank the user for playing and
forward them back to the game section of the website.

I'm not sure how to do this. The swf file will be embedded in an asp/
php/html page.... can I use asp/php/html to pass data to an EXE file
on the server and then read the results passed back from the EXE?

If that's not possible, any other ideas how this can be done?

Thanks so much for any help you can give!!

Ryan
 
N

Nicholas Paldino [.NET/C# MVP]

Well, on the server, you are not going to run an EXE. Rather, you would
have a web service or an ASPX page which would take the information, process
it, and return a result.

Of course, you then have the problem of having to secure the information
that is passed from the flash plugin to your website.
 
?

=?ISO-8859-1?Q?Arne_Vajh=F8j?=

Sparticus said:
I have developed a flash game. I am trying to prevent cheaters from
submitting fake high scores. To do this, I record ever action they
make in the game, and when the game is over I send all these actions
and their high score to the server.

On the server side I have made a C# application that reads in the
actions they made and their high score. The C# application then loads
the flash game and recreates what they did in their game. At the end
of the recreation, if the score they claim they had matches they score
that their actions result in, I submit the score to the database. If
it doesn't match, I know they cheated (ie. edited a memory address)
and I don't submit the score to the database.
However, the C# appllcation is just an EXE file that reads in
parameters. I'm trying to figure out a way to integrate everything so
that when the user playing the flash game ends their game, the C# code
will immediatley get the values and determine if they were cheating.
If they were not cheating, it'll thank the user for playing and
forward them back to the game section of the website.

I'm not sure how to do this. The swf file will be embedded in an asp/
php/html page.... can I use asp/php/html to pass data to an EXE file
on the server and then read the results passed back from the EXE?

If that's not possible, any other ideas how this can be done?

HTML: no way

ASP: you could (if security allows) make you C# code a COM object
and call it from ASP

PHP: you could (if security allows) have PHP run the EXE

The issue is the security.

If the server has .NET, then Nicholas's advice about a
web services hosted in ASP.NET would make things a lot
simpler.

Arne
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top