devolution

Author Topic: WhoreMaster: Abby's Crossing  (Read 140058 times)

0 Members and 1 Guest are viewing this topic.

Offline DocClox

  • Dev Team
  • *****
  • Posts: 1867
  • Messing Around With Python
Re: I've been messing around with pygame
« Reply #75 on: November 19, 2013, 05:58:31 AM »
Hmm... I could maybe make a gradient strip that's bigger than the indicator, but give the widget a small size.  Then I'd be able to shade gradually by moving the strip so a different part showed through the viewport. Add a little brass lamp as a casing and it could work very well.

If I do that, I'll probably restyle the board to look more like zone 1930s railway departure board. that should let me use a font that's a bit easier to read. maybe disk back the colour on the burnished brass a little while I'm at it :)

[edit]

That worked. I needed to use 2 nested QLabels to make the scrolling work, but that should work fine

[edit]

OK, restyled with colour lamps and a steampunk departure board look for the text bits. I might lose the last row and add a couple of scroll up/scroll down buttons. I'll make it respond to PgUp/PgDown and arrow keys in any case, but explicit buttons are always a good idea. Maybe restyle the monitor and image to use square frames.



Overall, I think I like this one better. What do you think?
« Last Edit: November 19, 2013, 02:37:06 PM by DocClox »

Offline rudistoned

  • Full Member
  • ***
  • Posts: 229
Re: I've been messing around with pygame
« Reply #76 on: November 19, 2013, 04:14:13 PM »
Looks better, more interesting and IMHO makes it easier to spot problems (red color). Nicely done!

Offline DocClox

  • Dev Team
  • *****
  • Posts: 1867
  • Messing Around With Python
Re: I've been messing around with pygame
« Reply #77 on: November 19, 2013, 04:34:10 PM »
I agree. That was a good idea about the lamps :)

Here's a test strip for the lamps. Values range from 100% to 0 in 20% intervals, with the last one being deactivated.



They'll fade smoothly in 1% intervals (or less if need be). Want me to post the code?


Offline rudistoned

  • Full Member
  • ***
  • Posts: 229
Re: I've been messing around with pygame
« Reply #78 on: November 19, 2013, 04:38:46 PM »
I'm always interested in code, sure! :)


Would it be okay if I used that code in my game? All character stats in Pytherworld scale from 0 to 100, so a widget like that will almost certainly be useful somewhere.

Offline hewhocumsbynight

  • Hero Member
  • *****
  • Posts: 683
  • All Hail the Crimson King!
Re: WhoreMaster: Abby's Crossing
« Reply #79 on: November 19, 2013, 04:50:13 PM »
Ahh, you renamed the thread! I don't know what's going on now?
My MEGA folder can be found at:  https://mega.co.nz/#F!EYhAgTyI!keiMX47NrnGOEozwNb2Vfg

Torrent link of my version, effective September, 2016:  magnet:?xt=urn:btih:4606F11A1C216337D7F3DFD6716307F48CFB996A&dn=WhoreMaster.06.02.29&tr=udp%3a%2f%2ftracker.openbittorrent.com%3a80

Offline rudistoned

  • Full Member
  • ***
  • Posts: 229
Re: WhoreMaster: Abby's Crossing
« Reply #80 on: November 19, 2013, 04:51:58 PM »
Looks like this is getting more serious  8)


Update:
It just struck me again that all these screens are customized Qt widgets. Isn't it great how malleable Qt can be if you press the right buttons (or maybe punch hard enough  :D  )?
« Last Edit: November 19, 2013, 04:55:56 PM by rudistoned »

Offline DocClox

  • Dev Team
  • *****
  • Posts: 1867
  • Messing Around With Python
Re: I've been messing around with pygame
« Reply #81 on: November 19, 2013, 04:59:09 PM »
Would it be okay if I used that code in my game? All character stats in Pytherworld scale from 0 to 100, so a widget like that will almost certainly be useful somewhere.

By all means use the code. Is it ok if I ask you to make your own lamp fittings? I mean I'm sure you would anyway.

Anyway, here's the code:

Code: [Select]
from PyQt4 import QtGui
from PyQt4.QtCore import Qt

class TartBarLamp(QtGui.QWidget):
        def __init__(self, *args, **kw):
                QtGui.QWidget.__init__(self, *args, **kw)
                self.setGeometry(0, 0, 39, 41)
#
#               this widget is going to be our viewport
#               we set it to be smaller than the grad
#               so the grad will be clipped to size
#
                vport = QtGui.QLabel(self)
                vport.setGeometry(8, 8, 25, 25)
#
#               now here's the grad itself.
#               I've used one about 10x the size of the port
#               but any size will do. bigger the grad, the
#               smoother the transition should be
#
                grad = QtGui.QLabel(vport)
                grad.setGeometry(0,0,34,229)
                path = "resources/grad.png"
                grad.setPixmap(QtGui.QPixmap(path))
                self.grad = grad
#
#               I want a grey lamp for when there is no data
#               so this is a plain grey texture.
#
#               we position it over the viewport and hide it
#               so the lamp is initially ON
#
                grey = QtGui.QLabel(self)
                grey.setGeometry(7, 7, 28, 31)
                path = "resources/tart_bar_lamp_grey.png"
                grey.setPixmap(QtGui.QPixmap(path))
                grey.hide()
                self.grey = grey
#
#               this is the lamp image that sits over the
#               viewport
#
                lamp = QtGui.QLabel(self)
                lamp.setGeometry(0, 0, 39, 41)
                path = "resources/tart_bar_lamp_2.png"
                lamp.setPixmap(QtGui.QPixmap(path))

#
#       set the lamp to represent X% value for a stat
#
#       expects an integer percentage
#
        def set_percent(self, percent):
#
#               first make sure it's turned ON
#
                self.switch(True)
#
#               convert to floating point
#
                fval = percent / 100.0
#
#               the way I set the grad up, green is at the
#               top of the strip. But I want green to mean
#               100% so I need to invert the ratio.
#
#               I'm sure there's a simpler way to go about this bit
#
                fval = 1.0 - fval
#
#               now scroll the grad strip down behind the viewport
#               proportionally speaking
#
                offset = int((229-25) * fval * -1)
                self.grad.move(0, offset)

#
#       toggle switch on and off
#
        def switch(self, bval):
                if bval:
                        self.grey.hide()
                else:
                        self.grey.show()

if __name__ == "__main__":
        import sys

        app = QtGui.QApplication(sys.argv)

        top = QtGui.QLabel()
        top.setGeometry(0, 0, 520, 80)
        path = "resources/wood.jpg"
        top.setPixmap(QtGui.QPixmap(path))

        xoff = 20
        lamp1 = TartBarLamp(top)
        lamp1.move(xoff,20)
        lamp1.set_percent(100)
        xoff += 70
        lamp2 = TartBarLamp(top)
        lamp2.move(xoff,20)
        lamp2.set_percent(80)

        xoff += 70
        lamp3 = TartBarLamp(top)
        lamp3.move(xoff,20)
        lamp3.set_percent(60)

        xoff += 70
        lamp4 = TartBarLamp(top)
        lamp4.move(xoff,20)
        lamp4.set_percent(40)

        xoff += 70
        lamp5 = TartBarLamp(top)
        lamp5.move(xoff,20)
        lamp5.set_percent(20)

        xoff += 70
        lamp6 = TartBarLamp(top)
        lamp6.move(xoff,20)
        lamp6.set_percent(0)

        xoff += 70
        lamp7 = TartBarLamp(top)
        lamp7.move(xoff,20)
        lamp7.switch(False)
        lamp6.set_percent(0)

        top.show()
        sys.exit(app.exec_())

That ought to do it. here's the images I used:







Ahh, you renamed the thread! I don't know what's going on now?

Like rudy said - I've decided to take this a bit more seriously. I've certainly moved beyond the "messing around" stage :D

It just struck me again that all these screens are customized Qt widgets. Isn't it great how malleable Qt can be if you press the right buttons (or maybe punch hard enough  :D  )?

Oh yeah :D And I've got a feeling I'm just scratching the surface ...
« Last Edit: November 19, 2013, 05:01:20 PM by DocClox »

Offline rudistoned

  • Full Member
  • ***
  • Posts: 229
Re: I've been messing around with pygame
« Reply #82 on: November 19, 2013, 05:32:45 PM »
By all means use the code. Is it ok if I ask you to make your own lamp fittings? I mean I'm sure you would anyway.
Of course that's okay, those are your graphics after all. I named the fittings "donotuse.png"  ;D
Lamp fittings matching the art style will be necessary, sure, but at the moment Pytherworld does not even have an art style. Well, I'll worry about graphics when it get to them. For now, my concerns are elsewhere.
Thank you very much! Your code works on my system, again by just replacing PyQt4 with PySide.


Oh yeah :D And I've got a feeling I'm just scratching the surface ...
If you ever feel like taking a dive, look at the graphics view framework. From what I've seen it's powerful and flexible.

Offline DocClox

  • Dev Team
  • *****
  • Posts: 1867
  • Messing Around With Python
WhoreMaster: Abbey's Crossing
« Reply #83 on: November 20, 2013, 04:50:35 PM »
If you ever feel like taking a dive, look at the graphics view framework. From what I've seen it's powerful and flexible.

I've been looking at some of the model/view stuff, but that looks fun too. If I ever decide to try and add a dungeon crawling mini-game, that looks like the way to go.

Here's another test strip, this one for the job boxes.



I think that's all the jobs I have planned, at least for the time being. Any others will probably be depend on special circumstances.

Now, I need a menu of some sort for all those, and then I need to start putting it all together and hooking it up.
« Last Edit: November 21, 2013, 03:23:34 AM by DocClox »

Offline DocClox

  • Dev Team
  • *****
  • Posts: 1867
  • Messing Around With Python
Re: WhoreMaster: Abby's Crossing
« Reply #84 on: November 21, 2013, 02:13:35 PM »
Menu Widget:



That's just the design and the basic graphics, of course. If I have more jobs than that, I might make it so the slots rotate with arrow keys or the mouse wheel. That would be cool.

I'd love to animate some of these widgets as well. I made a start with that on the main screen with the moving pointer and the blinking lights, but I've not really pursued it further.

Oh well, one thing at a time, I suppose :)

[edit]

Didn't get much done tonight, but I managed to stitch the "tart bar" together



The darker red is to indicate the currently selected row.

[edit]

Tart bar with header widget



The headings have tootips offering more detail, but they don't seem to want to screenshot

[edit]

OK,  replaced the old  table with the new oneL



Not bad, but the screw brackets I added kind of crowd out the other panels. I think I'll definitely need to redo those.

Otherwise, it's working quite well :)

[edit]

Reworked the image frame and monitor to fit in better with the style of the table. I'm putting a bit of thought into how these things are supposed to be attached to the wall and it seems to be paying dividends :)




I can see me having to go back and redo the art for the main screen before I'm done. Oh well, I'll worry about that after everything else is working :)

[edit]

A couple of elevator style buttons for paging through the lists of girls, should that become necessary.



Same widget with mouse-down  on the up button.


« Last Edit: November 23, 2013, 05:39:32 AM by DocClox »

Offline DocClox

  • Dev Team
  • *****
  • Posts: 1867
  • Messing Around With Python
Re: WhoreMaster: Abby's Crossing
« Reply #85 on: November 23, 2013, 08:11:47 AM »
I made those buttons way too big. I was thinking of them as an extension of the monitor rack, but in practice, they just dominated the whole screen. So I redid the buttons at half size.

I think they're still a bit big. What do people think?



Thing is, I expect these'll see a lot of use, so I don't want to make them too small and fiddly.  On the other hand, I expect I'll page the screen using PgUp/Down or shift and up/down arrow, so it's not that big a deal. But not everyone plays these games the same way...

I also can't decide whether to mount the panel on the mounting rack with the monitors, or just centre it under the big board. But if I do that, I think it'll need shrinking again to about the width of one of the rows

Offline rudistoned

  • Full Member
  • ***
  • Posts: 229
Re: WhoreMaster: Abby's Crossing
« Reply #86 on: November 23, 2013, 08:24:40 AM »
It definitely looks nice now and the required functionality is there. May I suggest to polish cosmetic details when the game is working and fun? You know what they say about premature optimization ;)
Unless you really enjoy polishing doing this now is just not necessary.

Offline DocClox

  • Dev Team
  • *****
  • Posts: 1867
  • Messing Around With Python
Re: WhoreMaster: Abby's Crossing
« Reply #87 on: November 23, 2013, 09:09:11 AM »
It definitely looks nice now and the required functionality is there. May I suggest to polish cosmetic details when the game is working and fun? You know what they say about premature optimization ;)
Unless you really enjoy polishing doing this now is just not necessary.

I think I enjoy the visual design aspect of the thing. It's not something I get to do much, and I find a certain satisfaction in making something look right.  I enjoy talking about the design process too. Maybe a little too much.

But yeah, some days I could fiddle all day with just one widget if I let myself. I'll try not to do that so much :)

Meanwhile, on the subject  of when things look right ...



I think extending the mounting rack worked quite well. Next job is to make it show the slaves I buy in the Souk :)

[edit]

OK, I can buy slaves from the market, have them disappear from the market and appear in the brothel so that they're names appear on the tart board. Slight bug in that you always seem to buy the wrong slave, but that's fixable.

Not bad for a busy weekend mostly taken up with relatives :)

[edit]

Bought from the slave market and loaded in game. Still loads to do on this screen, but making progress.



[edit]

I've been trying to think of an icon for the player in the game. A button to click on and bring up PC stats and so on.

I thought about a top hat, but that didn't entirely work. So I tried this:



I'm vaguely thinking of giving the player the choice of playing a male or female character, and I wanted something that could reflect that.

I'm quite pleased with how they turned out in the end :)
« Last Edit: November 28, 2013, 06:42:00 PM by DocClox »

Offline DocClox

  • Dev Team
  • *****
  • Posts: 1867
  • Messing Around With Python
Re: WhoreMaster: Abby's Crossing
« Reply #88 on: November 30, 2013, 06:57:57 PM »
Here's a teaser for you all!

It's the first cut of the intro scene I'll be using in the game. Plus a test of the Storybox widget I made, and a test of my Pyinstaller generated exes.

On the downside, it doesn't have any gameplay beyond clicking "more", and some of the scene art is pretty rubbishy.

https://www.dropbox.com/s/k9c4vq7tvda9hic/wmac.demo.7z

Anyway, have a look. Source and art files are included. I'll update this post with some screenies in a bit :)

[edit]

Start of the scene. Just the storybox and the "more" button showing.





Later on we get some dialogue. This one shows the facebox (more of a faceball, really) and the name box



The facebox raises some interesting issues. In the demo, we have an explicit face image to use. In the game, the plan is that you might get a scene with any of your girls. Which is going to be awkward because most girlpacks won't have "Face" images.

So the plan is to look for files starting with "face" and use them if we find them. If not, it's going to glom on to a random profile image, scale that to size, and clip to fit. Sometimes that works well, and sometimes you get headless boob and crotch shots (which can be oddly erotic, I find) depending on the original composition and aspect ratio.

Not an ideal solution, but it lets me use standard packs, and still provides an upgrade path to do it properly.

Oh! And also today, I updated the girl management table so it supports sorting by column and multiple selection based on shift click. Not bad for a day's work.
« Last Edit: November 30, 2013, 07:14:51 PM by DocClox »

Offline hewhocumsbynight

  • Hero Member
  • *****
  • Posts: 683
  • All Hail the Crimson King!
Re: WhoreMaster: Abby's Crossing
« Reply #89 on: December 01, 2013, 12:00:45 AM »
When I retool packs, I can start adding "Face" images to them.  Are there any other varieties of file you intend to introduce?
My MEGA folder can be found at:  https://mega.co.nz/#F!EYhAgTyI!keiMX47NrnGOEozwNb2Vfg

Torrent link of my version, effective September, 2016:  magnet:?xt=urn:btih:4606F11A1C216337D7F3DFD6716307F48CFB996A&dn=WhoreMaster.06.02.29&tr=udp%3a%2f%2ftracker.openbittorrent.com%3a80