Welcome, Guest. Please login or register.

Login with username, password and session length

 
Advanced search

1411672 Posts in 69398 Topics- by 58452 Members - Latest Member: homina

May 16, 2024, 07:32:38 PM

Need hosting? Check out Digital Ocean
(more details in this thread)
TIGSource ForumsDeveloperPlaytestingCampodecolor (a game of visual composition)
Pages: 1 [2] 3 4 5
Print
Author Topic: Campodecolor (a game of visual composition)  (Read 24829 times)
increpare
Guest
« Reply #20 on: October 15, 2008, 05:26:30 PM »

Fourier transform? Interesting idea. Could you use that to rate symmetry?
Well you could use it to extract information about periodicity.  So, if not symmetry exactly then 'patterns' maybe.  My intuition for 2D fourier transforms (much less discrete ones) isn't the best though.

Quote
My mind has been busier dreaming up possible algorithms to detect the symmetry in your second picture Wink
heh.  Well it does have rotational symmetry.

My way of approaching the symmetry checking would be to have a function that would compare two grids (say sum all the absolute values of differences of the respective values) and produce a single number representing the difference between them.  Then, one constructs a set of symmetry transformations (flips around various axes, rotations, swapping various colours, combinations of these, &c) that represent various plausible symmetries.  Then one looks to see if for any of these transformations, the difference between the original image and the transformed image is small, you say its symmetric.

The main issue with this approach (agj has already encountered it in his own) is that the symmetry mappings are possibly going to end out tossing a few values out (flipping about an off-centre axis for instance), so you'd have to alter the score by the proportion of the play area that the transformed image actually contained to get a more reasonable result.
Logged
agj
Level 10
*****



View Profile WWW
« Reply #21 on: October 15, 2008, 06:35:53 PM »

The higher the 'symmetry score', the lower the symmetry I think ;)

That's correct. Sorry for the confusion.

Your idea ain't half bad, increpare, but then we have the problem of rotating the image in various angles. Truth is, for such a low resolution picture, I don't think that every which symmetry angle is needed; vertical and horizontal is already pretty good, and if I added 45º it'd be as good as it's needed.

Oh and I have to say that I didn't understand a word from that Wikipedia link. :(

Thanks a lot for testing this thing out, and the ideas. I'll be uploading a version with the symmetry algorithm fixed soon.

edit: Oh, would that Fourier transform deal help with calculating rhythm (repeating patterns)?
Logged

increpare
Guest
« Reply #22 on: October 15, 2008, 06:44:57 PM »

Your idea ain't half bad, increpare, but then we have the problem of rotating the image in various angles. Truth is, for such a low resolution picture, I don't think that every which symmetry angle is needed; vertical and horizontal is already pretty good, and if I added 45º it'd be as good as it's needed.
I think that rotation by 90 degrees would be good.  I don't think 45 degree rotations would make enough sense on play-areas of the size you've given to be worth coding for.  Also, please do consider my suggestion of allowing swapping of colours as a form of symmetry (or *something*).

Quote
Oh and I have to say that I didn't understand a word from that Wikipedia link. Sad
I don't fully get it either.  You can probably get by without it, to be honest.

Quote
Thanks a lot for testing this thing out, and the ideas. I'll be uploading a version with the symmetry algorithm fixed soon.
cool Smiley

Quote
edit: Oh, would that Fourier transform deal help with calculating rhythm (repeating patterns)?
Yep.  That's what fourier transforms do. 

There might be easier ways to do it though.  For instance, looking at translations of the grid as a form of symmetry*: if when you translate the grid 3 units to the right, say, and the difference between this version and the original is very low, this sort of indicates that there's some pattern occurring in the grid (even more so if when you repeat the transformation the difference is still low, and if you look at what happens when you transform left 3 units instead of right as well).

(*I shall probably refer to everything I come across as a symmetry for the rest of the thread.  Bad mathematical habit, I'm afraid Wink  )
« Last Edit: October 15, 2008, 06:49:49 PM by increpare » Logged
agj
Level 10
*****



View Profile WWW
« Reply #23 on: October 16, 2008, 10:55:47 AM »

OK, I finished it. Finally. Took me way longer than I had gambled for, but it was all due to my fantastic idea of rewriting the whole algorithm. The result is code that's easier to read, but did I spend some time debugging this thing. I swear, there was no opportunity for making a tiny mistake that I skipped.

Anyway, here it is. Right now it's balanced so that making a composition that is symmetric in a single direction gets you a value close to zero. If the composition is symmetric both horizontally and vertically it'll move toward the positives. And it's still only checking vertically and horizontally, nothing more.

I think that rotation by 90 degrees would be good.  I don't think 45 degree rotations would make enough sense on play-areas of the size you've given to be worth coding for.

Oh, but I didn't mean rotating, I meant using a 45º symmetry axis. Right now I'm using axes 90º from each other.

Also, please do consider my suggestion of allowing swapping of colours as a form of symmetry (or *something*).

What do you mean by this?
Logged

increpare
Guest
« Reply #24 on: October 16, 2008, 11:55:56 AM »

Oh, but I didn't mean rotating, I meant using a 45º symmetry axis. Right now I'm using axes 90º from each other.
Oh okay.  That makes sense then.

Quote
Also, please do consider my suggestion of allowing swapping of colours as a form of symmetry (or *something*).

What do you mean by this?
Forget it actually; it doesn't make much sense to me now.   Roll Eyes

I'll check out your new build as soon as I can spare a couple of minutes....
Actually, one quick check to check something that annoyed me if it was dealt with.  For the carousel mechanism, would it be a big deal to allow people to pick up a piece by clicking anywhere within that piece's square instead of having to 'aim' directly for one of the disks?  This is part of what makes it so frustrating to deal with when using a touchpad.
Logged
agj
Level 10
*****



View Profile WWW
« Reply #25 on: October 16, 2008, 12:34:59 PM »

Yeah, I know! Don't worry, I plan on fixing for the next build.
Logged

mildmojo
Level 1
*


summer rain (soon)


View Profile
« Reply #26 on: October 17, 2008, 11:39:51 AM »

What attributes does the symmetry algorithm take into account?  Size, color, layering, all of the above?  It would be helpful to see the symmetry value normalized on some kind of 0-100% scale.

Does "Temp" correspond to visual hot/cold color temperatures?  It would be really nice to see this visualized as a pointer on a color scale.

At the carousel's current speed, you're only shown about 16 3x3 dot blocks before the timer runs out.  The time limit keeps compositions pretty simple.  If that's your aim, cool.  I find myself wanting to see what happens when I try for increased symmetry through careful choice of pieces instead of playing fling-the-dots.  A reset mechanism of some sort would be helpful, too, so I don't have to reload the page.

I do like it very much, and I especially like the idea of turning your compositions into badges for your signature/avatar/web site.  I think it'd be cool to embed this app as part of the profile creation process on a social site, too.
Logged

DEMAKE compo entry: Road Trip: Southwest USA
agj
Level 10
*****



View Profile WWW
« Reply #27 on: October 17, 2008, 01:56:19 PM »

The symmetry algorithm doesn't check for layering, the color for each cell is averaged and then that value is compared among cells. It's the equivalent of the game squinting before checking for symmetry.

Symmetry (and temperature) are both normalized on a -100 to 100 scale.

Yes, 'Temp' is exactly that. Using a color scale could be good, yeah, I'll consider that.

I will probably have an 'I like what I have' button to go straight to the results screen eventually, while increasing the time limit a bit for those that want to take more time.

Thanks a lot for your appreciations and your suggestions, shrapnel. Some of them are already in the current uploaded version, which you can check at the usual location. This is how it looks right now:



It still has some bugs that I have not taken the time to fix, like the occasional jerking of the color pieces when you grab them (I don't know what causes this) or what happens if you use a piece on the canvas before the next has been created (I know what causes this). The additions are cosmetic: an overlaid texture (the graphic itself being a placeholder) and a results screen. Oh, but I also made the color pieces easier to grab. That's it, but it makes it a lot easier to play and appreciate, I believe.
Logged

mildmojo
Level 1
*


summer rain (soon)


View Profile
« Reply #28 on: October 17, 2008, 04:27:52 PM »

Hey, nice.  Great improvements.  About the pieces flashing on the left when you grab them, perhaps you've got a sprite X-position variable somewhere that's being initialized to zero, and your draw routine is getting called once before your code has a chance to update the sprite to the mouse's X position?  (says the one with zero actionscript experience Smiley)

The temperature and symmetry bars are much nicer.  The rewind icon could use the same treatment as the piece blocks, letting you click anywhere within the symbol's bounding box to activate it.

There's a chance you could make this textless, adding thermometer and symmetry icons beside the bars and taking the numbers out completely, if you wanted to go that way.

In one play, I did get to a point where the carousel stopped delivering pieces.  Heh.  I think that was the session in which I dragged every piece onto the board.
Logged

DEMAKE compo entry: Road Trip: Southwest USA
mildmojo
Level 1
*


summer rain (soon)


View Profile
« Reply #29 on: October 17, 2008, 06:17:32 PM »

Figured the no-more-pieces bug out.  If you take a piece off the carousel before it's moved entirely onscreen from below, no more pieces come out.  Try grabbing the first piece as soon as possible and throwing it on the board somewhere.
Logged

DEMAKE compo entry: Road Trip: Southwest USA
agj
Level 10
*****



View Profile WWW
« Reply #30 on: October 18, 2008, 04:00:26 AM »

About the pieces flashing on the left when you grab them, perhaps you've got a sprite X-position variable somewhere that's being initialized to zero, and your draw routine is getting called once before your code has a chance to update the sprite to the mouse's X position?

Yeah, it's one of the possibilities. I know what to do to debug this one, at least, so no worries.

There's a chance you could make this textless, adding thermometer and symmetry icons beside the bars and taking the numbers out completely, if you wanted to go that way.

That, my fried, is the current plan. The final game will not even have numbers. I don't want to spend time making assets right now, though, hence the text.

If you take a piece off the carousel before it's moved entirely onscreen from below, no more pieces come out.

Yep. That's one of the bugs I mentioned in my previous post, I just didn't explain it properly. It'll be fixed in the next build.
Logged

agj
Level 10
*****



View Profile WWW
« Reply #31 on: October 20, 2008, 10:46:03 PM »

Whew. OK, two new algorithms, though one of them I incorporated mostly because it was so easy: brightness. I might take it out in the future, since it's not very relevant for anything after all. The other one is rhythm, and it took me plenty of frustrations to get right. Not that I did, really, but it's getting there. increpare, thanks for your idea on tackling this one, because it was a great help.

Other than that, what's new is that pieces are not all random anymore, there are certain predetermined shapes which help bring a bit more design into the randomized chaos. I also fixed the bugs from the earlier builds.

Here's the game.

Logged

Eclipse
Level 10
*****


0xDEADC0DE


View Profile WWW
« Reply #32 on: October 21, 2008, 05:34:51 AM »

i really miss any point, looks like placing different scrolling dots help to calculate some values using hidden algorythms of dubious sense.

It it's intended to be art it fails, if it's intended to be a game, it fails more...

sounds like a nice idea but that time limit and the fact that you can only choose fast moving random dots makes it just too random to have any sense
Logged

<Powergloved_Andy> I once fapped to Dora the Explorer
mildmojo
Level 1
*


summer rain (soon)


View Profile
« Reply #33 on: October 21, 2008, 09:32:05 AM »

i really miss any point, looks like placing different scrolling dots help to calculate some values using hidden algorythms of dubious sense.

Huh.  That's a really great abstract summary of all video games and a lot of educational testing strategy right there.
Logged

DEMAKE compo entry: Road Trip: Southwest USA
agj
Level 10
*****



View Profile WWW
« Reply #34 on: October 21, 2008, 11:44:26 AM »

Haha, no, Eclipse, it's not intended to be 'art'. I'm not sure why you say it fails at being a game, though. Maybe because you didn't think it was fun? That's not only a highly subjective measurement, but not really what defines games either. Or maybe because there are no enforced goals?
Logged

increpare
Guest
« Reply #35 on: October 21, 2008, 11:56:15 AM »

Haha, no, Eclipse, it's not intended to be 'art'. I'm not sure why you say it fails at being a game, though. Maybe because you didn't think it was fun? That's not only a highly subjective measurement, but not really what defines games either. Or maybe because there are no enforced goals?
It could be that the ratings still seem a little arbitrary.  Some things you could do would be to, when you see the results, when you move your most over various ratings, to show
1 - an example in some part of the screen of a layout that would give full marks in that category (maybe one example of full marks, one example of non-full marks).
2 - to also be able to display the particular interpretation that the program picked for a particular criterion: for example, for the symmetry criterion, to display the final axis of symmetry it chose, or for the rhythm one to display the period it calculated.  These would go a long way in alleviating some of the more mysterious aspects of the work.

Hiding the quantified algorithms that you've used to represent qualitative aspects of an entity can work really well (quicksilver is a prime example of this).  However, in your case things can feel a little arbitrary.  Maybe even displaying ratings at various points in the game, or offering in-game hints as to where somebody can place a particular object so as to increase/decrease their rating in a particular category might be good?

Also, it would be very good to somehow streamline things to encourage a person to play several games sequentially; the 'one game, then press restart button' mechanism doesn't particularly invite replay.  Maybe a level system of some sort?  This would also help people cope with the fact that the game length is quite short (I don't think this is bad in and of itself).

(oh, one small thing: you should probably change the boxes that display the numbers to be ones where you can't select them)
Logged
agj
Level 10
*****



View Profile WWW
« Reply #36 on: October 21, 2008, 09:56:51 PM »

Oh, yeah, you're right. Of course it still seems pretty hermetic, especially since the algorithms are mostly pretty wonky right now, and that nowhere does the game explain much of anything.

Those are all pretty great ideas; I hadn't thought of showing the symmetry axis and all that. What I had planned was to show a picture of a very symmetric and a very asymmetric composition, and the equivalent for the other parameters, but what you mentioned could be a good extra detail. Showing in-game hints sounds a bit too far from my current abilities, sadly.

I just had an idea. Instead of simply throwing the bars there on the results screen, the game would put a single icon for each parameter. If the composition uses very warm colors, a big fire pictogram could be there; if it is slightly asymmetric, a small picture of... something asymmetric could be shown. Then, if the player hovers over an icon, its corresponding bar would appear, flanked by examples of compositions in both sides of the spectrum. Sounds like a pretty decent plan to me, coupled with your idea of overlaying stuff on top of the composition itself; what do you think?

Regarding the addition of different levels, I don't know. I did think of that at some point, but levels go hand in hand with difficulty curves and all that, so I discarded the idea. What will hopefully encourage replaying is the gallery system.

But wait, that gave me another idea. I think that this is a good one. The total time for the composition could be, say, 3 minutes, but the player can interrupt it at any moment and check the results screen, then resume it where he left off if he's not happy with it. This is not as hard to do compared to offering live hints, yet would provide the same kind of instantaneous feedback, and the opportunity for the player to see how the parameters fluctuate according to their choices. Hmm.
Logged

increpare
Guest
« Reply #37 on: October 22, 2008, 02:44:38 AM »

Regarding the addition of different levels, I don't know. I did think of that at some point, but levels go hand in hand with difficulty curves and all that, so I discarded the idea. What will hopefully encourage replaying is the gallery system.
Think of it not in terms of difficult curves, but of learning curves maybe. Possibly: start off only rating them according to one criterion, and gradually introduce different ones/combinations of ones as people play.

The gallery system idea sounds nice though Smiley

What about having a turn-based mode, where you have a finite set of blocks and you get to do with them what you want?  Or does this go against your idea as to how the game should feel?

I would say that if you're going to display icons to represent the extent of the presence/absence of a particular property, and if you're going to illustrate the extreme cases with examples, that you might be able to get rid of an explicit number/bar.  That's just a rough idea though.

Generally, I think the weakest element of the game is the (graphical user) interface at the moment.  That's probably the easiest thing to work on though Smiley  Your ideas of overlays/pictograms sound good, but they won't fix the interface issues I feel are there.

Being able to check the results mid-game.  Hmm...it's certainly worth trying out Smiley
Logged
muku
Level 10
*****


View Profile
« Reply #38 on: October 22, 2008, 03:54:20 AM »

But wait, that gave me another idea. I think that this is a good one. The total time for the composition could be, say, 3 minutes, but the player can interrupt it at any moment and check the results screen, then resume it where he left off if he's not happy with it.

Why not compute and display the ratings in real-time as the user places new tiles, without any interruption? This would give the most immediate feedback on how your choices affect the image.
Logged
agj
Level 10
*****



View Profile WWW
« Reply #39 on: October 22, 2008, 09:02:31 PM »

Because that would likely result in a poorer performance (a slight hiccup after placing a piece).
Logged

Pages: 1 [2] 3 4 5
Print
Jump to:  

Theme orange-lt created by panic