New feature - resize images

Tue, 03/19/2013 - 19:06 -- BlueWinds

So, this doesn't deserve a whole version number tick, but I didn't want to wait for enough other new stuff... I sure hope the Versioning System Police don't come knocking. Open up the Messages window. Try hitting "," or "." on your keyboard (comma or period).

Muahaha! If you hit comma enough times to make the images disappear, it will also hide the site logo and page title - a "public space safe" version of the game. It doesn't modify the text, of course, so you'll still get caught if someone is reading over your shoulder - but it's a hell of a lot less incriminating than the images would have been. ;)

Comments

pi (not verified) on

i'm just getting a bouncing green ball.

"file:///C:/Users/Mark/Downloads/BrothelS.im-master/BrothelS.im-master/modules/core.js
Line 0"
but there is no save to export.
BlueWinds on
So... looks like you ignored my warning in the release announcement to read README.md if you're running the game locally. Go ahead and check out the instructions in the readme - they will help. ;)
pi (not verified) on

the image resizing doesn't seem to work on chrome, and on the very first turn the messages window doesn't automatically pop up.

BlueWinds on

I am... so completely confused. Not your fault - you're totally right that it doesn't work in Chrome. Chrome is reporting that the +/- keycodes are 187/189, while firefox reports them as 61/173. Those... cannot possible be different numbers in different browsers, and yet they are. ^^;;

So a fix - instead of +/-, I've changed it to be "," "." (comma and period), since those seem to work properly in several different browsers. Not sure about the message dialog not opening the first time (which I am also able to reproduce) - I'll look into that later. Odd that it should only fail to open for the first turn.

Arcess (not verified) on

Thank you for making images disappear at the smallest zoom - it works well as a no-image mode.One unexpected side-effect is that the girls' images are no longer present to indicate what actions they're performing, which is useful information when those tasks involve the player (Talking, Exploration, Denial).

 

Also, my mobile devices do not have comma and period keys. If an alternative way to adjust the sizes could be hidden away in a menu somewhere next version, that would be helpful.

BlueWinds on

It wasn't unexpected - I applied a blanket "hide all images" rule, to be sure I didn't miss any. Good point that those images should stay visible though (since all basic girl images should be mostly SFW) - fixed.

Also, try opening the hotkeys dialog again - you can now click on the increase/decrease image lines.

Knoloa (not verified) on

Blue, I just found something that might be used for Saber's patrol rape :

https://images.4chan.org/d/src/1363790881452.jpg

 

Loved the last release (dem market events), you're doing a great job.

OrangeGucci (not verified) on

Nice new feature. But it looks like there's some kind of issue with the hotkeys menu displaying the buttons as a half-formed link. Also, speaking of version numbers, it'd be great if the version number was displayed somewhere inconspicuous - it'd make it easier to compare the dev build to the main build.

Arcess (not verified) on

In Firefox, they look like normal underlined links, not half-formed ones. May I ask which browers you're using?

As far as I know, there's no way to view the version number within the game at the moment, but an easy way to see if there are differences being tested on Dev is to compare the following two pages. At the moment, both versions are the same, with the most recent changes pushed through and the image resize feature done as an adjustment directly to the main version.

OrangeGucci (not verified) on

I'm using Chrome, and they look the same - normal underlined links that don't go anywhere or do anything.

BlueWinds on

In addition to what Arcess said, I usually don't increment the version number except in two situations - when I have a function that needs to update save files, and when I feel enough has changed to make an announcement.

Joe (not verified) on

Great job, BlueWinds.

I have some suggestions.

GAMES EXPERIENCE

  1. Remove animations or make them faster.

GAME DEVELOPMENT

  2. The images should be better organized as follows:

    1) Different kind of images should be put in different folders, so that, for instance, fetish images are put in /content/girls/Kirino/image/fetish/ and the name is 1.jpg instead of Fetish1.jpg. A quick and dirty solution is to change /modules/girls/class.js line 202 to img = this.base().images.basePath + '/' + type + '/' + img; and line 198 to   if (!img) { img = this.base().images.base; type = "base";}.

    2) Mission images and intro image should not be coupled with girls' images. Put them in /content/missions/ folder.

  3. To accelerate the development, you can write base.js for some characters while leaving the images/ empty. Let players add images.

GAME CONTENT

  4. If copyright is not a concern, good images can be found at http://danbooru.donmai.us/posts, http://chan.sankakucomplex.com, and http://www.pixiv.net. In my experience if you can find more than 40 pages of posts on danbooru, you are most likely to find some high quality images that can be used in the game.

  5. Add a character called Master, that is, the player themselves. Actions should be redefined so that players can pay for some special services to keep them motivated. Those images may not be coupled with the girls, so lots of lots of good images can be put in. 

  6. Action "Advertise" should have its own images. Dressing/undressing, lingerie and swimsuit images can be used.

  7. Action "Masturbate (chores)"  and corresponding images can be added. The action exchanges endurance for happiness, for example.

  8. Action "Public Toilet (Jobs)" can be added. Just use "group" images. So players can actively enjoy those images rather than being "raped" randomly.

  9. I hope yuri(lesbian) images can be incorperated. But i haven't thought of a good name.

I really appreciate it in advance if any of these suggestions will be implemented. If none of them are to be implemented, I will still enjoy the game.

BlueWinds on

1. The only animations I can think of are the dialog show/hide ones, which last 1/5th of a second. Do they really slow down your play experience that much?

2. See http://site.brothels.im/node/24#comment-319 for a discussion of why this is unlikely.

3. Doesn't make that much sense without #2.

4. I do indeed search those sites - most of the images come either from there or from user submissions.

5. I do intend to add more characterization to the player soon, especially as part of revamping the "loan" into using missions, like all the other content. You'll get to choose a name, gender, make some more real choices, etc. - not when the game starts, like most character creation, but slowly over the course of months. There will still not be images directly representing the player, though.

6. If you want to gather one or two images for each girl currently in the game, I'd be fine with adding a separate image category for it. Not something I'm likely to spend time on doing myself though.

7. I sort of figured that was something the girls did on their own time, possibly while Resting. ;)

8. Yes, I do intend to add more uses for the Group images soon. "Private parties" at the brothel, and yes, public toilet events. They'd probably interrupt normal Whoring, rather than be a separate action - if she accepted, it would take up 3-5 "customer slots", and if declined, wouldn't have the same decline penalty as normal customers.

The reason they exist right now but have so little use is because Bondage used to be called Fetish, and was group sex. When I changed it, I still had all the images, and didn't want to have to find them again later.

9. Lesbian sex is also planned. I'm still trying to think of a good way to deal with it gamewise that isn't just A) "everyone is bisexual" or B) "lesbian stat," 0-100.

Joe (not verified) on

#1.

Yes, the animation is slow to me. But no, I do not think the biggest problem is dialog fading. Rather, it's the accordion's animation. It takes undefinite time depending on its size, and some time it is distractively slow. 

I disable it every time I download a new version, because making it faster requires additional Jquery libueries. You can leave it as is if no one else is complaining ( I am not compaining though :).

 

#2

I read the post, but it is not what I meant. I know that javascript is not capable of getting folder entries.

Let me make this more clearly:

1. Images are stored like /content/girls/Kirino/image/fetish/1.jpg,  /content/girls/Kirino/image/fetish/2.gif

2. Change /modules/girls/class.js line 202 to img = this.base().images.basePath + '/' + type + '/' + img; so that javascript can go into that folder.

3. In /content/girls/Kirino/base.js, variables should look like fetish: ["1.jpg", "2.gif"],

4. Make changes where needed.

This can surely be done as I have made such changes and tested on the latest release. Advantages are that 1) variables can now be perfectly aligned and that 2) error-checking is easier and that 3) basePath are now not so bloated (arguably) and that 4) editing those variable is copy-n-paste from another variable.

 

If more control over pathes is needed, you can redefine basePath to an array as path: {base:["/content/girls/Kirino"] fetish: ["fetish"]...}, and make changes where needed.

 

#4 #5 #6 #7 #8

Those are good ideas. Hope to see them soon.

I guess something has to be done myself. Thanks for publishing this into GPL, and thanks for making the game extendable.

 

 

BlueWinds on

1) Oh yeah, forgot about the accordion animation. You're right, it's a little slow (I think the default speed is 400ms, as opposed to 200ms I use elsewhere). I'll speed it up for the next version, but I'm not going to remove any of the animations - I think they make the UI look a lot more smooth.

2) Here's the pro/con list as I see it:

  • Pro: Better aligned filenames make it easier to count at a glance and visually pleasing.
  • Pro: Standardized names make it easier to find missing images.
  • Pro: Adding new image types is less painful.
  • Con: Time to reorganize and rename all existing files.
  • Con: Time to write update function to change references in all existing savegames (it's not a big issue with Messages, since they're one-turn-only, but many missions last for weeks and I wouldn't want to break them).
  • Con: Inability to reuse files - See Kirino, for example, where one of her fetish images is also her pregnant image. This isn't a big deal, since the files are small.
  • Con: So... many... folders... to... make...

Right now, the time to make the changes is overwhelming the benefits in my mind, but you're right that it would be a good change to make. Perhaps I'll be bored some evening with nothing better to do. :P

Mattychan (not verified) on

I'm useing chrome and it seems that one of Sakuya's pictures does not work during her expose activity.(I hope i am useing the comment system properly)

also love the game man it is very well made!

Arcess (not verified) on

Good catch. It looks like her base.js refers to five Naked images, but there are only four in the folder.

BlueWinds on

Fixed - thanks for the report.

maxxe25 (not verified) on

Sorry for posting on an old one it was just it seemed to be the update that changed how it was played. then again i haven't been away that long so idk but i was woundering how the new import and export saves file works now.

Arcess (not verified) on

Rather than text for you to copy-and-paste, exports now save as a file on your computer. I run Windows 7, and both Firefox and Chrome save it by default to the downloads folder, but Firefox calls it a weird combination of characters like "h_TBmR8G.part" and Chrome calls it "save.json". The contents of these files are the same as what was previously in the box to cut-and-paste. To import a game, click the "Import Game" button and navigate to this file on your hard drive to load it.

maxxe25 (not verified) on

I try that and that's the problem. I go to download folder through import and it shows nothing is there but if i open file without import i obviously see the saved file

BlueWinds on

I'm going to guess you're running the downloaded version, right? Well, try downloading it again, because I'm pretty sure I fixed this (I did fix it after the release announcement, and made no mention of the fact).

Otherwise, at the bottom of the open-file dialog, notice that section where it says "file type"? Change that from whatever it says to "All files" and you should be able to select the save-game.

maxxe25 (not verified) on

Im chrome and windows 7 btw

maxxe25 (not verified) on

Also one recommendation. I know it requires over a dozen other files but why not have sabers patrols increase the safety on the streets by getting rid of gang dangers and tentacles. Their fun but there are times i wish they wouldn't bother.

And one thing i notices is when main girl (forgot name and never seen her in anime) was going to tell you something and it told me to get her obedience up i maxed out the stat and waited thirty turns and she still wouldn't talk. Not sure if it glitched or i was doing it wrong

BlueWinds on

I can't fix bugs without save exports. Really, if you notice a bug, export the game and attach it to your comment.

Due to the way the game is designed, I really can't have actions modifying other actions the way you describe. Well, I mean I could, but it would be pretty complicated and I don't think it would add enough to the game to be worth the headache.

Arcess (not verified) on

Regarding the mission, I suspect that it was to raise Sakuya's obedience and you increased Kirino's instead.

maxxe25 (not verified) on

ah ok. thanx

user (not verified) on
"TypeError: Saves from versions below 0.5 are no longer supported.
 
How about a saves converter?
Anonymous (not verified) on

I'd imagine the creator does not want to be stuck supporting deprecated save formats from old beta deployments -- even if they have been deployed to the public previously.  If the changes to 0.5 included some heavy changes to the way save files work, then the cost of maintaining this level of support may heavily outweigh the benefit in the long run. (I know that doesn't really help; just offering the likely rationale)

That said, should this really be an explicit JS error?  :3

BlueWinds on

Maintaining it wasn't the issue - since all upgrades are incremental, as long as the upgrade from 0.4 -> 0.5 kept working, the upgrade from 0.5 -> whatever would have worked as well.

The upgrade path was mostly removed because the early upgrade code was ugly as hell, I didn't want to refactor it, and because it runs every time a save-game is loaded - a tiny slowdown, but code-bloat and slowdown none the less. I also didn't think anyone would still have saves from before that point.

I suppose I could have written a popup to say that old saves aren't supported, but since it's uncommon now, and will only be getting less common in the future, it was easier to just do "throw new TypeError();" I'm lazy sometimes. ;)

user (not verified) on

That's why I was asking for a stand alone converter that thous of us with old saves can use in order to continue with them in the new version.

BlueWinds on

Hm, let's see...

https://github.com/BlueWinds/BrothelS.im/archive/f9f4255dbfa94f662432592191ff88fc67fa2577.zip

If you download that, open/import your old game, then export if again, you should be able to import it into the most recent release. :fingers crossed:

user (not verified) on

Nice idea but there is one problem, I'm playing on the brothels.im site and can't export my save since the SAVE "button" is grayed out.

BlueWinds on

Hm, that is a cunnundrum. Do you know how to run a javascript command? Try this one:


var a = localStorage.getObject('saved-games');

var blob = new Blob([JSON.stringify(localStorage.getObject(a._first()), null, 2)], { type: 'text/json' });

$('#load').attr('href', URL.createObjectURL(blob));


... then click on "Load" - it should prompt you to download the saved game as a text file.

var a = localStorage.getObject('saved-games');

var blob = new Blob([JSON.stringify(localStorage.getObject(a._first()), null, 2)], { type: 'text/json' });
$('#load').attr('href', URL.createObjectURL(blob));
var a = localStorage.getObject('saved-games');

var blob = new Blob([JSON.stringify(localStorage.getObject(a._first()), null, 2)], { type: 'text/json' });
$('#load').attr('href', URL.createObjectURL(blob));
var a = localStorage.getObject('saved-games');

var blob = new Blob([JSON.stringify(localStorage.getObject(a._first()), null, 2)], { type: 'text/json' });
$('#load').attr('href', URL.createObjectURL(blob));
var a = localStorage.getObject('saved-games');

var blob = new Blob([JSON.stringify(localStorage.getObject(a._first()), null, 2)], { type: 'text/json' });
$('#load').attr('href', URL.createObjectURL(blob));
var a = localStorage.getObject('saved-games');

var blob = new Blob([JSON.stringify(localStorage.getObject(a._first()), null, 2)], { type: 'text/json' });
$('#load').attr('href', URL.createObjectURL(blob));
user (not verified) on

Error: NS_ERROR_NOT_AVAILABLE: Component returned failure code: 0x80040111 (NS_ERROR_NOT_AVAILABLE) [nsIDOMWindow.localStorage]Source File: javascript:%20var%20a%20=%20localStorage.getObject('saved-games');%20%20var%20blob%20=%20new%20Blob([JSON.stringify(localStorage.getObject(a._first()),%20null,%202)],%20{%20type:%20'text/json'%20});%20$('#load').attr('href',%20URL.createObjectURL(blob));Line: 1

Anonymous (not verified) on

Found a couple issues; I'm using Pale Moon 19.0.1 (Firefox derivative).  No save-game attachment since they're reproducible right out of the gate:

  1. When scheduling tasks for a girl, if you select something on the drop box for a task like Explore before assigning the girl to the task, the girl's sprite will not be moved to the task.  The girl is still assigned to the task, however. (hooray UI bug!)
  2. This may just be my browser, but I can see the message dialog box appear in the lower-left corner for a split second before disappearing and fading into view in the center.  This occurs regardless of whether I press the message button or pass a turn.  Maybe an issue with setting up visibility before the transition's ready?

Also, do you prefer reading bug reports through blog comments, or would you rather they be posted elsewhere (ie, Github)?

Anonymous (not verified) on

One more problem: deleting a saved game through Load Game while in the middle of playing appears to return you to main intro blurb ("You wake up somewhat disoriented, to the gentle sound..."), effectively ending your current game until you reload it.

BlueWinds on

Ah yes, I dread the Save/Load game dialogs. Haven't updated that code since the first molucular hydrogen formed. The Load Game dialog is also disabled if there are no saved games, meaning you can't import either. Will fix - thanks for the report.

BlueWinds on

Bug reports here are prefereable - Github doesn't email me when new issues open, and I haven't visited the repository in months. Pale Moon is an interesting project - I agree that Mozilla needs to focus a lot on speed improvements if they want to keep up with Chrome. I'm on Linux myself.

1. Right, thanks for reminding me about that. I'll fix it before the next release.

2. I see it too, and know the cause. jQuery UI is... flakey about positioning dialogs properly. I've had to use a hack to get things centered / at the top, which is causing the flicker. I should just use "visibility:hidden;" to hide it until it's ready - I'll fix it in the next version.