Shoutbox

Text files, share-able variables? - Printable Version

-Shoutbox (https://shoutbox.menthix.net)
+-- Forum: MsgHelp Archive (/forumdisplay.php?fid=58)
+--- Forum: Messenger Plus! for Live Messenger (/forumdisplay.php?fid=4)
+---- Forum: Scripting (/forumdisplay.php?fid=39)
+----- Thread: Text files, share-able variables? (/showthread.php?tid=81833)

Text files, share-able variables? by Shadowmancer on 02-22-2008 at 10:20 PM

Okay so I got this idea with my friend, we are going to attempt to make an MSN based battle game similar to the first Final Fantasy. No GFX, but all in text. It'd be the equivalent of "/me attacks and deals 14 Physical damage."

Saw nothing in the documentation pertaining to what I need so yeah.

So my questions:

Is it possible to make and edit .txt files using scripts?
[For offline variable storage and "saving" of your character.]

Are sharing variables between two contacts possible? (Without sending messages.)

If sharing variables isn't possible I'd also like to know if there's a way to send a message that won't appear to the other user but MSN will detect and read. Or it can be visible lol I just want to know if I can go anywhere with this idea or not.

=Shadowmancer


RE: Text files, share-able variables? by warmth on 02-22-2008 at 10:54 PM

quote:
Originally posted by Shadowmancer
Is it possible to make and edit .txt files using scripts?
[For offline variable storage and "saving" of your character.]

Of course my friend... but that should be so easy to trick... I think you must use some kind of encripted file...
RE: Text files, share-able variables? by Shadowmancer on 02-22-2008 at 10:58 PM

I'm very new to MSN scripting, how would I go about creating / altering the file?

Any info on sharing variables with another contact with the same script installed?

[As for encryption: I'll do that later. Not gonna spend time on encryption when I can't get off the ground in the first place o.o. If I get everything working, I'll get to work on that.]


RE: Text files, share-able variables? by Spunky on 02-23-2008 at 12:10 AM

Just look on Google for "Jscript read write txt file" and you'll get some good articles. Same goes for encryption, which you will want (and maybe even encrypt the source code too so they can't find out the key you used to encrypt and decrypt it).

As for sending variables, it could be done through a web server I guess. When you start playing you both use the same "key" or token etc so you "pair up" and data is sent between the two. That could get complicated though.

This is why my similar game got put on hold for a while.


RE: Text files, share-able variables? by Shadowmancer on 02-23-2008 at 01:16 AM

Thanks I'll look at the Jscript r/w txt.

Any thoughts on invisible messages being sent that are read by the other's client then their "combat log" updates? IE:

{This won't be seen by the players}
mystats[hp:100,mp:100,armor:240, etc..]
--------

Then the one receiving that, the script upon seeing that this message has been set would pick apart the sentence and assign the variables for the 'opponent'.

All damage calculation and such would have to be calculated by the attacker based on the sent stats.


RE: Text files, share-able variables? by CookieRevised on 02-23-2008 at 09:30 AM

It is very well possible with Plus! scripting.
But everything within the game would be extremely easly cheatable, even if you encrypt stuff.

A better choice to make such a game is actually making a real Messenger game:
Windows Live Messenger Activity SDK (and here is a thread about it on mess.be, to give you an idea). Cheating would be not that easy.


Or, another possebility is creating a kind of 'chat-bot' as the host for the game and thus which you talk to (again, cheating here would be not that easy).

;)

----

PS: The next bit might scare you away from this, but I feel you need to know before you being with something like this, before you get dissapointed and frustrated that it doesn't work (although that, by itself, might be the challenge you want):

Making an adventure game is not easy at all. It is actually way more difficult than an average action/platform/shooting or board game.

The only advantage you have being it text-based (like the good old days) is that you don't need to do the graphics. And actually, text-based games are in general also more difficult than graphical-based games, since the complexity of the AI and used lexicon is pretty high. In graphical based games you only need to define "hotspots" which the user can click on to do something. In a text-based game you need to program a whole lot more complex things dealing with language, verbs, grammar, etc. That is far from easy....

If this is the first game you ever made, I actually would suggest to pick something more easy to start with, to get into game programming. Something which you can play with two people, like a board game or something.


RE: Text files, share-able variables? by Shadowmancer on 02-23-2008 at 03:37 PM

I've got quite a good experience with computer games in both 2 and 3D written using C++ and Direct X. First game I ever made was a simple Pong game XD. I'm currently developing a 3rd person shooter with a few friends of mine, some very interesting results so far.

But enough on that,

This is strictly a PvP/1p training game. Not an adventure XD. I don't have the patience to create adventures >.>... While it is true that this will be my first messanger attempt at a game, it is essentially variable manipulation and that is all.

1: Both players ping the other of their stats. The other's stats are stored in var's.
2: First turn decided via speed or reaction var.
3: Type of attack, damage type, and base damage sent to other player.
4: Resistance to attack (armor, magic resist, etc) and damage reduc. calc's taken place. Message reports damage reduc and final damage taken.
5: Var's updated on both ends to reflect the one ended combat turn.

As for cheaters.. meh.. Worry about that later. I do like the idea of a chat-bot, however I do not know how to work with messanger well enough to make this feasible.