Omnimaga

Calculator Community => Discontinued => Major Community Projects => Escheron: Shadow over Ragnoth => Topic started by: Iambian on October 24, 2010, 09:32:41 pm

Title: Picross (Clone)
Post by: Iambian on October 24, 2010, 09:32:41 pm
So, me and geekboy have been talking on IRC about making a 2D Picross clone. For those who are unfamiliar with it, you can find results by either Googling "Picross" or "Nonogram" (which seems to be what it's supposed to be called). He said something about making his entry in Axe and my entry as an App.

So, if you're looking at the breadcrumbs above the topic, you're probably gonna wonder why I posted this under the E:SoR subforum. The reason behind this move is a bit of a stretch, but bear with me.

I intend on using a modified version of E:SoR to build the game. This modified version was originally built for a rickroller, found here: http://ourl.ca/4114/75957

Source is included in it so if you know what you're doing, you can beat me to the punch. So... what do you think?

EDIT: To clarify, I'm only intending on doing this thing. The link to source was what I'm working with to make this game.

EDIT2: For a download link, find the attachment on this post: http://ourl.ca/7598/135642
Title: Re: Picross (Clone)
Post by: DJ Omnimaga on October 25, 2010, 12:29:07 am
the game.
...

Quote
this game.
That's better.

Joking aside that seems like a great project. Will you be able to post screenshots soon? :)
Title: Re: Picross (Clone)
Post by: Iambian on October 25, 2010, 08:06:46 pm
Still working on the thing. It's rather bland and I haven't coded very much yet. Here's a screenshot of what I have so far (other than the equally bland title screen).
Title: Re: Picross (Clone)
Post by: DJ Omnimaga on October 25, 2010, 08:21:04 pm
Nice. Are they mostly mockups or do you have some of the coding (besides the engine you are using) done?
Title: Re: Picross (Clone)
Post by: Iambian on October 26, 2010, 04:14:56 pm
Some of the coding has been done. Those screenshots are of the actual engine doing its work. Well... it's what's been done of the engine. I've also got the cursor to work and it lets you chisel tiles. It also lets you mark them if you know they're not valid. It also locks out the tiles so you have to revert them to blank tiles before you can change their status, so you don't accidentally chisel out tiles that have been marked off for not chiseling.

I don't actually know what the appropriate terms are, but I'm basing these terms off of the Mario's picross (GB) thing that I saw a YouTube video for.
Title: Re: Picross (Clone)
Post by: Iambian on October 26, 2010, 07:57:09 pm
I know it's a double post. Just got a screenshot going of what I have so far.
Title: Re: Picross (Clone)
Post by: Geekboy1011 on October 26, 2010, 08:02:27 pm
epic looking although may i ask how you stored the info for the different tyle mars eg how it can tell weather its a x or a [] ( mark or marked with the x) as i just wonder if there is a better way then storing a byte map for each of them X.x
Title: Re: Picross (Clone)
Post by: Iambian on October 26, 2010, 08:16:31 pm
The way I do it is a rather roundabout way, since I built it using structures provided by the E:SoR menu system and rendering routines. I'm basically using a piece of the game's "textshadow" buffer as an array.

The way you should probably do it is to keep your table in something like a matrix or some 2D array. This table should be completely independent of the image you're supposed to be making, but... the contents of this array should be something like sprites where an empty tile would be... well. Empty. A [ ] tile would be some other value, and x tiles would be yet another value. When you go to compare the contents of the game area to the image you're supposed to be recreating, just recreate a binary of the image given your [ ] tiles versus your non-marked tiles. Non-marked would be 0 and [ ] tiles would be 1, where the x tiles would be ignored in the reconstruction of the image.

Should the image match what you have, then you've won the game. If you are trying to do something like a timer and penalize the player for incorrectly marking a tile as [ ], then you should try something like the following:

After you have reconstructed the image, compare it against the original in this manner:

(original xor playarea) and playarea

If there's any nonzero things as a result of that operation, then you know that a player tried to chisel out a tile in the wrong spot.

At any rate, and to attempt to answer your question...

I find it better to keep your images as a binary, and your play area as an array. Only when the array changes between a marked [ ] tile and an unmarked tile, should the array be silently converted in the background back to a binary file and compared directly between your source or solution image.
Title: Re: Picross (Clone)
Post by: Geekboy1011 on October 26, 2010, 08:18:46 pm
awesome that helps a lot ty iambian ^_^
Title: Re: Picross (Clone)
Post by: Iambian on October 26, 2010, 09:14:07 pm
Changed the mid-border line to black. It was white. I think it looks better.
Title: Re: Picross (Clone)
Post by: TIfanx1999 on October 26, 2010, 10:12:13 pm
Hmm... odd. Cool, but odd. =) I look forward to seeing it finished. =)
Title: Re: Picross (Clone)
Post by: Iambian on October 27, 2010, 12:41:32 am
The game can now tell if you've won. When you start marking the board white, a small number appears below the title thing. When it turns to a "1", you know you've solved the thing. You can see me playing around with it.

And, yes. I'm looking at the solution as I'm doing the puzzle, so don't get any ideas. I just wanted a quick way to test the thing out.

Maybe tomorrow, I'll make it a little fancier.
Title: Re: Picross (Clone)
Post by: Madskillz on October 27, 2010, 12:44:20 am
Man you work fast Iambian. Ha looks good, I always sucked at this game though.
Title: Re: Picross (Clone)
Post by: Ranman on October 27, 2010, 12:48:44 am
Very nice!  8)

Although I've never played this game.
Title: Re: Picross (Clone)
Post by: DJ Omnimaga on October 27, 2010, 01:14:16 am
This looks simple but really great at the same time. Nice job so far Iambian. :)
Title: Re: Picross (Clone)
Post by: ztrumpet on October 27, 2010, 07:07:19 am
That looks great.  Wonderful job Iambian! ;D
Title: Re: Picross (Clone)
Post by: ASHBAD_ALVIN on October 27, 2010, 07:19:00 am
wow... nice work!  Picross was always one of those games I loved, so keep it up! :D
Title: Re: Picross (Clone)
Post by: DJ Omnimaga on October 27, 2010, 03:09:46 pm
One thing, though, why is that topic in E:SoR? ??? Is it just because it uses E:SoR engine?
Title: Re: Picross (Clone)
Post by: Iambian on October 27, 2010, 03:33:25 pm
One thing, though, why is that topic in E:SoR? ??? Is it just because it uses E:SoR engine?
Yes. Zera was actually wanting to do some sort of minigame for E:SoR. I'm not sure this is gonna be it since there's compatibility problems with respect to the actual game. So, who really knows?

Oh, I also put it in the E:SoR topic just to find out who picks up on it if they didn't read the first post.

Also, I was successfully able to solve the puzzle using methods that an actual player would employ. For more information about solving nonograms, this seems like a good site: http://www.comp.lancs.ac.uk/~ss/nonogram/solve
Title: Re: Picross (Clone)
Post by: Builderboy on October 27, 2010, 03:44:33 pm
I love nonograms!  The implementation you have here is really quite awesome ^^ Does the background being light grey pose any viewing problems on calc?
Title: Re: Picross (Clone)
Post by: DJ Omnimaga on October 27, 2010, 03:52:19 pm
One thing, though, why is that topic in E:SoR? ??? Is it just because it uses E:SoR engine?
Yes. Zera was actually wanting to do some sort of minigame for E:SoR. I'm not sure this is gonna be it since there's compatibility problems with respect to the actual game. So, who really knows?

Oh, I also put it in the E:SoR topic just to find out who picks up on it if they didn't read the first post.

Also, I was successfully able to solve the puzzle using methods that an actual player would employ. For more information about solving nonograms, this seems like a good site: http://www.comp.lancs.ac.uk/~ss/nonogram/solve
Oh I see. A mini-game, now that sounds like a nice idea. Kinda like FF1 world map mini-games, right?
Title: Re: Picross (Clone)
Post by: Iambian on October 28, 2010, 01:30:42 am
It's mostly finished. I just need more levels and maybe a few visual enhancements, but for game play purposes, it's done. I still want to hold onto the binary to make those changes, tho. Or if there's any suggestions.

Oh right. I still need to write up a tutorial mode. Silly me. That'll be a while longer.

The first screenshot shows the way the game prevents accidental quits. Because noone likes accidentally quitting when they're just about to win. And before you say anything, yes. I screwed up that puzzle.

The second screenshot shows me actually finishing a puzzle. Guess who's the answer?

EDIT: Screenshots best viewed in Firefox or Opera
Title: Re: Picross (Clone)
Post by: DJ Omnimaga on October 28, 2010, 07:29:06 am
Lol interesting way to quit, I like it. I myself often found myself accidentally quitting games because some games have CLEAR or MODE used to access the in-game menu but I forgot that game used them to quit instantly.
Title: Re: Picross (Clone)
Post by: Iambian on October 29, 2010, 11:06:05 pm
Ran into a snag. The grayscale quality is too poor for me to read the small numbers, so I'm going to have to spend time working on the imported engine to get it to work right. Perhaps a palette swap is in order?

Other than that, I've been solving and collecting puzzles from www.griddlers.net and I've got a pretty sizable haul from that place. There's finally some measure of justice in the game: I've had to solve every puzzle that I put in before I can add it to the game. Still, I intend on giving credit where credit is due, so I'll also be changing some minor things to show the source of each puzzle, in addition to where to get more puzzles that are akin to it. ID and everything.

Still... I believe I'm missing something ...
I just don't know what.
Title: Re: Picross (Clone)
Post by: DJ Omnimaga on October 30, 2010, 12:14:17 am
Sorry to hear about the grayscale quality :( I hope you can get it to look better.
Title: Re: Picross (Clone)
Post by: TIfanx1999 on November 01, 2010, 06:12:59 pm
Lobster puzzle FTW. :)
Title: Re: Picross (Clone)
Post by: Iambian on November 01, 2010, 10:53:00 pm
I'm gonna go ahead and discontinue the project 'till further notice. The move was made because I spent a wee bit too long on this and I need to get back to coding E:SoR. This post contains a download of the binary of what I have so far. There's a lot of space leftover if you want me to add more puzzles sometime in the future. If you want to create your own puzzles, make it out like the following:

Code: [Select]
05,05  ;width, height
11111  ;it's a square :)
10001
10001
10001
11111
Editor macros can and will be used to format the thing into something that can be used proper. The max width is 15 and the max height is 10.

If you have many puzzles, do me a favor and put them all in a text file or something. That way, I can use that nifty forum feature to grab all the attachments in one go.

EDIT: Puzzle theme was changed, so it'll appear different. 2ND is to "chisel" a tile and DEL is to "mark out" a tile. When you win, you have to hit MODE to get back to the puzzle selection. At any rate, MODE is to go back. Also, changes made in this version versus the prior one also cleans up the puzzle area to make it "look" completed.
Title: Re: Picross (Clone)
Post by: DJ Omnimaga on November 01, 2010, 11:06:32 pm
Oh phew I thought you were killing it forever, according to IRC. I'm glad this is not dead. Sorry to hear it is on hold, although it is understandable. E:SoR progress is great as well and I've been waiting for it for a long while :D

WIll you upload this in the download section? (it would need to be zipped, tho)
Title: Re: Picross (Clone)
Post by: skuller972 on January 10, 2011, 10:23:52 am
I haven't played Picross in a while, but I believe that the way you stack the sets of multiple numbers in the screenies, and the way the numbers are stacked in other Picross games are in reverse. You should try just writing the numbers out in the opposite direction. I'm not completely sure though so don't quote me on it.
Title: Re: Picross (Clone)
Post by: Iambian on January 10, 2011, 08:43:33 pm
I haven't played Picross in a while, but I believe that the way you stack the sets of multiple numbers in the screenies, and the way the numbers are stacked in other Picross games are in reverse. You should try just writing the numbers out in the opposite direction. I'm not completely sure though so don't quote me on it.
Excellent observation! It is, indeed, reversed, but the reason it's reversed is because of how the code generates the numbers. I was thinking about how to get it back to the way it should be, but I didn't want to mess around with code that seemed to work for its purpose.

So, yeah. It *is* backwards, but I don't intend on changing it. Too much work.
Title: Re: Picross (Clone)
Post by: DJ Omnimaga on January 10, 2011, 10:59:18 pm
On an unrelated note, nice to see you around again Skuller972 ;D