I just posted a new version of Lackey, build date 04-26-11. Post bugs here.

Started by Trevor, April 26, 2011, 09:06:12 AM

Previous topic - Next topic

Trevor

Some of these new features are in preparation for the upcoming tabletop games improved support.

GRID STUFF
There are some new options players to do with the appearance preferences of the grid. In case you didn't notice, currently you can't just drop a card anywhere on the table. As you drop it, the card will snap to a grid which currently is invisible. This is mostly done so things line up nicely. It's mostly aesthetic. At present, the default value of the grid size is .03, where the table width is 2 units wide and 2 units tall. In other words, if you put a line of cards on the table as close as they could fit next to an adjacent card, yet not being on top of that card, you could line up 66 cards. (2/.03=66)
Anywho, there is a grid now, but it's invisible. Come this new version, you now have the option for making that grid visible (as well as changing its color). If you don't want that many squares, you can opt to have the drawn grid to be X units wide. If the grid size is the default (.03) and you opt to draw the grid so it's 3 units wide, you would see squares of .09 size.

You also have the option to draw the grid on the intersections of where cards are dropped, or in between the intersections.

Note that you cannot change the grid unit size. That is something the plugin maker only can do. The reason for this is if people were using different grid unit sizes, then they would drop cards where THEY see the grid, which wouldn't be the same place YOU see the grid.

The plugin maker can now override the default grid size.
The plugininfo syntax for this is:
GRIDSIZE:".5"
You don't need to include this in your plugin if you are content with the default size of .03, which I think is likely the case. This feature was mainly added in order to be able to sync up a tiled game board with the grid size. Most plugins don't need to include this.

Here are a few pics:
Preferences:

Showing a grid drawn on intersections:

Showing a grid drawn NOT on intersections:



DIFFERENT CARD SIZES
Plugin makers can now have cards of multiple sizes in a plugin. Some games have different size cards. Note that all card sizes are relative to cardback.jpg. So if the image for a card is 3 times taller than cardback.jpg and 4 times wider than cardback.jpg, it would appear thrice as tall and 4 times as wide as any card image that is the same dimensions as cardback.jpg.

SUPPORT FOR MANY DIFFERENT IMAGE FORMATS
You can now load jpg, gif, png, bmp, tif, tga, and some others. If you want a specific format supported, let me know. You should be able to use these as table playmat images and avatars, and plugin makers can use these new formats for card images included in their plugins.

SUPPORT FOR TRANSPARENT IMAGES
Transparent GIF and PNG files can now be loaded and displayed with transparency. The above images show an example of this with the rogue.gif I used as a test image. You can see the background underneath her on the table, and her hair is even overlapping from the large card image to the left of the table. I do not yet support animated gifs, but I will look into adding that.

SYNC PLAYER TABLE PLAYMATS
You can now sync playmats with your opponents. Type "/playmatsync" (or "/ps") in the chat log and all of your opponents will load the table image you have. And if they don't have it, you will send it to them. Note that to send the image, it must be less than 1MB in size. I didn't yet put permissions attached to this, so if you use this feature, be considerate and ask first. This was mostly done so tabletop games can have one player set (or send) the game board to all players.


To tilt the table, put your cursor over the table and use your scroll wheel while holding down the alt (or option) key. If you don't hold down the alt (or option) key, it would zoom the table.

Another thing I added was notifications. If there is a server broadcast message, which only the host of the server can do, you will see this message even if you are in a game. Similarly, if someone sends you a private whisper on the server, and you are in a game, you will see this whisper in your game log. That way, you won't miss important messages.

I added a lot of new things, and tweaked a lot of old things, so there are likely some bugs. I will fix the bugs quickly and post new versions of Lackey over the next few days and weeks. If you notice something not working as you think it should, let me know.

d3vtr0n

could someone change their own gridsize to a different size even if the plugin you made needed the the grid to be a default size?

Trevor

Quote from: d3vtr0n on April 26, 2011, 12:37:55 PM
could someone change their own gridsize to a different size even if the plugin you made needed the the grid to be a default size?
Only the plugin maker can change the ACTUAL grid size. But you can choose to view the grid at effectively larger sizes. Try the "Set Grid size" option in the appearance preferences. It actually is for setting the number of grid units that the grid is drawn at, not the absolute grid size, but the effect is the same.

visualbasicwizard

There's a wierd effect when dragging cards on the table now.  The card image ends up being offset from the blue frame where the card is actually being placed with the mouse.  If the card is placed in the dead-center of the table, it lines up with the frame.  The farther from the center the card goes, the more the card is offset from the frame, with the card image appearing closer to the center.

TheBuck

wait let me get this straight,we are going to be able to play tabletop games like Risk on here soon? If so that is freaking cool.

Trevor

Quote from: TheBuck on April 26, 2011, 10:34:46 PM
wait let me get this straight,we are going to be able to play tabletop games like Risk on here soon? If so that is freaking cool.
I was thinking more like miniatures games, but I will add stuff to play board games too.

TheBuck


Nava

Quote from: visualbasicwizard on April 26, 2011, 04:38:47 PM
There's a wierd effect when dragging cards on the table now.  The card image ends up being offset from the blue frame where the card is actually being placed with the mouse.  If the card is placed in the dead-center of the table, it lines up with the frame.  The farther from the center the card goes, the more the card is offset from the frame, with the card image appearing closer to the center.

The same here: the problem is only visible when not using a zoom factor of 100% and increases with the difference of the actual zoom size from 100%.

Nava

AdLit

How does one designate in a plugin if you're using a jpg or a png for example?  it seems that changing the file without notifying lackey comes up with an unknown image error (i.e. the spawned ? card).


EDIT: is it as simple as adding ".png" or ".gif" to the carddata file at the end of the image name?

Trevor

Quote from: AdLit on April 27, 2011, 07:35:40 PM
How does one designate in a plugin if you're using a jpg or a png for example?  it seems that changing the file without notifying lackey comes up with an unknown image error (i.e. the spawned ? card).


EDIT: is it as simple as adding ".png" or ".gif" to the carddata file at the end of the image name?
Generally, if you don't include ".jpg" (or obviously if you do), then it assumes the file is a jpg. If you explicitly add a different suffix, like .png, it should open it as a png file. So, yes, in the card data file you would add .png or .gif or whatever whereas if they are jpg files you don't need to.

Under most circumstances, people should still use jpgs since they are a very efficient format.

AdLit

QuoteGenerally, if you don't include ".jpg" (or obviously if you do), then it assumes the file is a jpg. If you explicitly add a different suffix, like .png, it should open it as a png file. So, yes, in the card data file you would add .png or .gif or whatever whereas if they are jpg files you don't need to.

So I redid a carddata file by adding .png to the filenames, and it doesn't load any of the images.  Do you need to make any changes to the plugininfo file? 

Here's an example of what I've done:

If the jpg carddata file was "card001,cardback"

The png carddata file was "card001.png,cardback.png"

Is that correct?

Trevor

Quote from: AdLit on April 28, 2011, 09:23:31 AM
QuoteGenerally, if you don't include ".jpg" (or obviously if you do), then it assumes the file is a jpg. If you explicitly add a different suffix, like .png, it should open it as a png file. So, yes, in the card data file you would add .png or .gif or whatever whereas if they are jpg files you don't need to.

So I redid a carddata file by adding .png to the filenames, and it doesn't load any of the images.  Do you need to make any changes to the plugininfo file? 

Here's an example of what I've done:

If the jpg carddata file was "card001,cardback"

The png carddata file was "card001.png,cardback.png"

Is that correct?
That looks correct. It's possible there is a bug. I did just add it and its somewhat untested. To be sure, send me the image files and your plugin and I will test it.

AdLit

Ok, i'll pack it into a rar file and send it to you via email later today, thanks.

AdLit

Here is the download link for my png test plugin.  It is the same files from a working jpg-based plugin, I just switched the image files and changed the carddata file accordingly.  Please use the regular deck editor and not the pack selector for testing purposes, as I didn't upload every single image in the interest of saving you download time/space.

Thanks in advance.  Here's the link:

http://www.filedropper.com/testpng1

EDIT: Something I noticed while troubleshooting this... the game will not recognize cardback.png as the actual default cardback; as such, unless you have an image named cardback.jpg it won't even let you load the plugin.  You can even have every card with an alternate cardback, such as "card1.png,cardback1.png" and it will still not open the plugin without a cardback.jpg file.  Perhaps there needs to be a way to designate in the plugininfo file that you're using png's instead?  Even with the cardback.jpg file there, though, you still don't see any images in the deck editor or in the game.  It merely allows you to load it.

anomie

This is kind of strange.

When I first installed Lackey (which was the build before this one), the proxy tester would fail even though I could verify that the port forwarding was working through my firewall.
I didn't get on for a bit, then connected to the server sometime this week to play a few games and the proxy tester worked fine, and I was able to host normal games, even though I hadn't changed anything in the firewall.
I updated to this build, the proxy tester is now not working again, and I have not changed any firewall settings.