Menu

Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Show posts Menu

Messages - naltimari

#101
As CJ said, you can use the TCP/IP Plugin, in this case I recommend this page. I guess the best approach would be to write a module based on the TCP/IP Plugin.

On a second thought, the engine itself could provide simple TCP/IP commands, like the ones in the TCP/IP plugin, thus paving the way to many modules (hi-score posting/fetching, login, remote savegames, Msn-awareness, etc).

QuoteThere was a TCP/IP plugin created but I don't think it was ever properly finished.

One more reason for the 'engine' approach. The others are: CJ's support and documentation... :) And, of course, last but not least, multiplatform-ness...
#102
Quote from: Reid on Mon 29/10/2007 00:56:49
I'd like to see the AGS engine be able to use internet connectivity. For example, if the player gives the game permission to look through their hotmail contacts list by supplying the necessary email and password info, the game extracts the the contact info and puts in names of the contacts as characters in the game or in dialog responses.

This is a very specific feature, thus it should not be in the engine, but on a plugin. There are many libraries to do that, you should look up on the internet for them.

[Update] As a sidenote, you should create a new thread requesting some help with this... maybe someone has already done some research in this area... it is an interesting feature, I would definitely find it very useful.
#103
Quote from: Pumaman on Sun 07/10/2007 18:11:17
At the moment you can't access any of the game data, so part of my question is what you want to be able to access and in what way you might want to change things from a plugin.

I would vote for dialog data structures, so an import/export dialog plugin could be developed. As a matter of fact, it wouldn't hurt to have access to these structures at runtime too.  ;D
#104
Quote from: Ghost on Wed 17/10/2007 23:58:08Why taking out of an IDE what belongs there?

I'm not advocating to *remove* the dialog IDE, I just want that editing dialogues is *possible* outside the IDE. This way, there could be dialog editors, even graphical, much better than the one present in AGS.
#105
QuoteFor what reason would you just want to compile the game without using the editor? I guess now that you can externally edit the script files this could be useful, would anyone else think so?

Well, you said it very well yourself, it can be useful from now on. The separation of room scripts from the content is very welcome, in my opinion. If the dialogs also were on a separate (human-readable) file, then, it would be heaven on earth for me... :)
#106
QuoteThe benefit to making it return a DynamicSprite* instead of returning an int would be that...

Exactly. But AFAIK, AGS 2.72 functions can't return any pointers, right? From what I saw on your first post, AGS 3.0 changed that. :)
#107
I was after the same thing (render text as sprite), but this code only works in AGS 3.0 (beta). Can you point me to some code that does this for AGS 2.72?

Actually, I ended up coding something myself:

Code: ags

DynamicSprite *ds;

function TextAsSprite(String s, int color)
{
	int o = GetGameOption(OPT_ANTIALIASFONTS);
	int w = GetTextWidth(s, Game.NormalFont);
	int h = GetTextHeight(s, Game.NormalFont, w);

	SetGameOption(OPT_ANTIALIASFONTS, 0);
	RawSaveScreen();

	RawSetColorRGB(255,0,255);
	RawDrawRectangle(0, 0, w, h);
	RawSetColor(color);
	RawPrint(0, 0, s);
	ds = DynamicSprite.CreateFromBackground(0, 0, 0, w, h);

	RawRestoreScreen();
	SetGameOption(OPT_ANTIALIASFONTS, o);

	return ds.Graphic;
}


Which I can use by calling, for example,

Code: ags

RawDrawImageTransparent(20, 20, TextAsSprite("Hello, World", 15), 50);


The above code works, but it has a couple of disadvantages:

  • Cant' use antialiased text (otherwise text edges have a 'pink' matte)
  • Function returns int, not DynamicSprite*, so you cant have access to properties of the sprite (height, width, etc)
#108
Have you ever thought about adding command-line options to the editor?
I would find very useful to have a 'compile' option in the editor. I even though about doing a plugin to implement this, but i guess it is not possible as of AGS 2.72.
SMF spam blocked by CleanTalk