CodeWalrus

CodeWalrus Website => Contests => Topic started by: Hayleia on May 01, 2015, 09:55:25 AM

Title: [4x3 contest] [Axe] (No idea for a name :P)
Post by: Hayleia on May 01, 2015, 09:55:25 AM
A wild Hayleia appears :P

Well I was fed up with coding in Java for school projects so I decided to try to enter that contest and write some awesome ugly Axe again :D
I have the idea of the gameplay but I don't know how to call that.

So basically, you start at the top left corner of a 4x3 grid and your goal is to have the screen all blank. Move with the arrows to walk the tiles and lower their level. If you walk on a white tile, you lose. Edges wrap around.

The gameplay took 1 hour to write but now I need levels :P
It's probably going to take more time.
Title: Re: (No idea for a name :P)
Post by: Dream of Omnimaga on May 01, 2015, 11:15:04 AM
For the name if you cannot find one before the deadline, you could always call it H4x3ia for now (it has 4x3 and to a lesser extent Axe in l33tsp33k, in it) :P.

Anyway that sounds pretty challenging O.O. I assume you will make your own levels, right? I like the idea, by the way.
Title: Re: (No idea for a name :P)
Post by: Hayleia on May 01, 2015, 11:42:09 AM
Lol, nice name :P
It probably doesn't describe the game very well but I like how it has Hayleia (almost), Axe and 4x3 in it, as you said :)

And yeah, I'll make my own levels with a level editor I still need to make. It will probably not be included in the contest entry though since it will probably need a more detailed interface (menus and all) than just 4x3 pixels :P

And if you want to know how I got that idea, I can tell you but I warn you, it's very stupid :P
I have been playing MH4U a lot lately, and at the end of each hunt, you get rewards. What you do with those is always put them in your box, but you have to select them one by one in a grid and press A on each of them. Since that's a bit annoying, I try everytime to get them all by passing through each tile only once (not always possible) and I thought it could be made into a full game, with some twists like edge wrapping and tiles that need more than one pass.
(http://game.capcom.co.jp/manual/MH4U/common/game/4611_1.jpg)
Title: Re: (No idea for a name :P)
Post by: Dream of Omnimaga on May 02, 2015, 03:56:23 PM
That would definitively be interesting. Just make sure the contest entry has some levels included since durong judging I probably won't make many myself if an editor is included due to limited time.
Title: Re: (No idea for a name :P)
Post by: Unicorn on May 02, 2015, 05:13:16 PM
Sounds cool! A level editor would make it even more popular with the publics.
Title: Re: (No idea for a name :P)
Post by: Hayleia on May 03, 2015, 07:40:22 AM
Quote from: DJ Omnimaga on May 02, 2015, 03:56:23 PM
That would definitively be interesting. Just make sure the contest entry has some levels included since durong judging I probably won't make many myself if an editor is included due to limited time.
Quote from: Unicorn on May 02, 2015, 05:13:16 PM
Sounds cool! A level editor would make it even more popular with the publics.
Yeah, I'll make a level editor before the release because it will be easier even for me to include enough levels for the release :P
But it won't be included in the official release since it would probably be against the rules (not 4x3), just released externally :)
Title: Re: (No idea for a name :P)
Post by: Duke "Tape" Eiyeron on May 03, 2015, 11:54:03 AM
Here's a name idea : LightWalk.
Title: Re: (No idea for a name :P)
Post by: alexgt on May 03, 2015, 03:33:23 PM
That sounds like CakeWalk... it must be a lie!
Title: Re: (No idea for a name :P)
Post by: ben_g on May 03, 2015, 06:32:10 PM
It's a cool concept, but in the screenshot, there doesn't seem to be a way of knowing where you're standing. Maybe you should let that tile blink, to make it more clear.
Title: Re: (No idea for a name :P)
Post by: CKH4 on May 03, 2015, 06:33:55 PM
Yeah I agree, maybe recti( on both buffers at the cursor position.
Title: Re: (No idea for a name :P)
Post by: Hayleia on May 03, 2015, 07:38:21 PM
LightWalk is a cool name idea, thanks :D
A friend of mine also suggested Four Shades of Grey lol. I should probably make a poll some time, when everyone suggested their idea.

And yeah, making your current position blink might be a good idea. It would only be a problem when you're standing on a white tile but since that can only happen at the beginning, it's not a problem.
Title: Re: (No idea for a name :P)
Post by: matrefeytontias on May 03, 2015, 10:38:03 PM
Not bad actually. Also, with 12 tiles and 4 possible states, that's 20734 possible puzzles excluding all black and all white :P that should keep one busy for a while.
Title: Re: (No idea for a name :P)
Post by: Dream of Omnimaga on May 04, 2015, 02:24:33 PM
Lol Four Shades of Grey would be funny actually.
Title: Re: (No idea for a name :P)
Post by: alexgt on May 04, 2015, 08:20:42 PM
That ^ (-_(//));
Title: Re: (No idea for a name :P)
Post by: Hayleia on May 05, 2015, 07:50:05 AM
Quote from: matrefeytontias on May 03, 2015, 10:38:03 PM
Not bad actually. Also, with 12 tiles and 4 possible states, that's 20734 possible puzzles excluding all black and all white :P that should keep one busy for a while.
How did you calculate that ? Because I know the solution is not 4^12 since there are a number of unsolvable problems in that, but how did you get the number of solvable problems then ?

And yeah, when that friend of mine suggested Four Shades of Grey, I thought this was the game it would fit most. Of course, most z80 greyscale games only use Four Shades of Grey, but that game here is pretty much only about Four Shades of Grey :P
But it's a bit funnyculous so I don't know.
Title: Re: (No idea for a name :P)
Post by: CKH4 on May 05, 2015, 11:13:07 AM
12^4-2. I don't think that that number is right because of unsolvable ones but it should be right including unsolvable ones.
Title: Re: (No idea for a name :P)
Post by: matrefeytontias on May 05, 2015, 02:31:36 PM
Well I didn't account for the unsolvable ones. As CKH4 said, I only did 4^12 - 2 to account for the full-white and full-black puzzles.
Title: Re: (No idea for a name :P)
Post by: CKH4 on May 05, 2015, 02:41:19 PM
I don't see a way to account for the unsolvable ones short of counting them by hand. We may be able to approximate them by finding the median of 4^6 and then counting the number of impossible ones from 4^5 to 4^7 and then multiplying by ^6. I'm pretty sure that I'm the only one that understands what I'm saying but if you understand maybe you could try to explain it better.
Title: Re: (No idea for a name :P)
Post by: Hayleia on May 05, 2015, 08:49:44 PM
Quote from: matrefeytontias on May 05, 2015, 02:31:36 PM
Well I didn't account for the unsolvable ones. As CKH4 said, I only did 4^12 - 2 to account for the full-white and full-black puzzles.
Well I agree that 4^12-2 should be all puzzles except all black and all white but the calculation you posted on the other page was more 12^4-2, so I got confused and thought your number (which was far less than 4^12, which I could tell just by reading it since I know 4^10 by heart) was the number of solvable problems :P

Quote from: CKH4 on May 05, 2015, 02:41:19 PM
I don't see a way to account for the unsolvable ones short of counting them by hand. We may be able to approximate them by finding the median of 4^6 and then counting the number of impossible ones from 4^5 to 4^7 and then multiplying by ^6. I'm pretty sure that I'm the only one that understands what I'm saying but if you understand maybe you could try to explain it better.
Nope, I didn't get it :P

Also, here's where the development is at.
The main program is now 809 bytes and has a black blinking cursor on your position.
The editor is a lot bigger and allows you to create/edit an appvar and edit the only level it contains. It needs to support adding/deleting levels, plus probably some other features.
Title: Re: (No idea for a name :P)
Post by: CKH4 on May 05, 2015, 08:53:57 PM
Nice, the size is quite impressive. How do you manage levels though? A string or some Data()s?
Title: Re: (No idea for a name :P)
Post by: Hayleia on May 05, 2015, 08:57:47 PM
Well for now it's just a stupid [], but they will be stored in appvars next, to allow people to share their levels :)
Title: Re: [4x3 contest] [Axe] (No idea for a name :P)
Post by: Snektron on May 05, 2015, 08:58:40 PM
Oh that would be quite a cool feature :D
Title: Re: (No idea for a name :P)
Post by: CKH4 on May 05, 2015, 09:03:36 PM
Oh that's cool. How much data does each one take so far and is would a correct level format be:
[4,2,3,1]
[2,2,3,2]
[1,3,4,2]?
Title: Re: (No idea for a name :P)
Post by: matrefeytontias on May 05, 2015, 09:55:53 PM
Well since it's 12 cells with 4 possible states each, it's indeed 12^4 possibilities. I can't really see how one would determine if a particular configuration is solvable or not though (by non-algorithmic means of course).

EDIT: just realized that I wrote 4^12 above :P that was a typo.
Title: Re: (No idea for a name :P)
Post by: Hayleia on May 05, 2015, 10:32:52 PM
Quote from: CKH4 on May 05, 2015, 09:03:36 PM
Oh that's cool. How much data does each one take so far and is would a correct level format be:
[4,2,3,1]
[2,2,3,2]
[1,3,4,2]?
Remove the commas and substract 1 to all your numbers and you're good :)
I read/write nibbles but I could compress even more since each number is on 2 bits, not 4. But I kept 4 in case I ever add support for more shades than 4 (bullsheep, I'm just too lazy to write code to read/write 2 bits :P (not that it's hard, just that levels are already small enough and probably don't need more compression, and I'd like my code not to be too large)).

Quote from: matrefeytontias on May 05, 2015, 09:55:53 PM
Well since it's 12 cells with 4 possible states each, it's indeed 12^4 possibilities.
Well ok for the first part of the sentence, but doesn't that make 4^12 possibilities ? I mean, 1 cell with 4 possible states makes 4^1 possibilities, not 1^4. So replace 1 with 12 and you get 4^12, not 12^4 :P

Quote from: matrefeytontias on May 05, 2015, 09:55:53 PM
I can't really see how one would determine if a particular configuration is solvable or not though (by non-algorithmic means of course).
Yeah, I guess this could be calculated using a recursion or something, but I guess that's not really useful.
But since I didn't recognize 4^12 in your first post, I actually thought you did that recursion or found something else to calculate easily, that's why I asked in the first place :P
Title: Re: (No idea for a name :P)
Post by: matrefeytontias on May 05, 2015, 10:42:37 PM
Well I can't math right now, so we'll talk about that later x)

Also, knowing how to determine if a level is solvable or not would permit you to implement a random level generator, which could be a nice addition to the game.
Title: Re: (No idea for a name :P)
Post by: Dream of Omnimaga on May 05, 2015, 11:33:05 PM
This looks pretty interesting Hayleia. I can't wait to try the final result when you will submit it. :)
Title: Re: (No idea for a name :P)
Post by: Hayleia on May 07, 2015, 01:42:02 PM
Quote from: matrefeytontias on May 05, 2015, 10:42:37 PM
implement a random level generator, which could be a nice addition to the game.
Well that's actually a very good idea, especially since I can't make a decent level selection menu for the contest release (so custom levels would be supported for the final game but not for the contest release) so that would be a nice plus in my opinion :D

Quote from: DJ Omnimaga on May 05, 2015, 11:33:05 PM
This looks pretty interesting Hayleia. I can't wait to try the final result when you will submit it. :)
Thanks :)
Title: Re: (No idea for a name :P)
Post by: Hayleia on May 08, 2015, 09:06:08 PM
The random level generator is implemented (since yesterday in fact)... and I also wrote a seedable random number generator :D
This way, I don't even have to create levels for that game, I just have to put different seeds to the random number generator and different parameters to the level generator to have as many levels as I want in the game :P
Title: Re: (No idea for a name :P)
Post by: Dream of Omnimaga on May 09, 2015, 04:59:34 AM
Ooh, random levels seems cool. Are they guaranteed to be solvable? How much time does it take to generate them? :D
Title: Re: (No idea for a name :P)
Post by: Hayleia on May 09, 2015, 07:05:34 AM
They should be all solvable yes. At least, I was able to solve all the ones I generated (I set the generator to "easy" :P). And I didn't try to make it generate harder levels but at least when in easy mode, it's instantaneous.