Java-Gaming.org    
Featured games (79)
games approved by the League of Dukes
Games in Showcase (475)
Games in Android Showcase (106)
games submitted by our members
Games in WIP (530)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
    Home     Help   Search   Login   Register   
Pages: [1] 2
  ignore  |  Print  
  Hexara -- work in progress  (Read 9991 times)
0 Members and 1 Guest are viewing this topic.
Offline philfrei
« Posted 2011-01-21 00:56:59 »



http://www.hexara.com/game.html

[Updated 7/26/2013]

Takes about 3 minutes to load. Sad There's so much to do, starting with streamlining the sound load (about 1 minute, 30 seconds of .wav data comprises 15MB and there is less than 200KB code and 15 tiny pngs). And much to add to the visual design & sequencing, but some basic playability is there.

To play: first select LOAD from the top left menu button. It loads, in sequence, five sample puzzles of increasing difficulty. Other choices on the Menu button are disabled or not written yet. The goal of the puzzle is to make all six symbol sequences (on the six green "hanging scrolls") exist within the hex grid as neighboring-hex sequences. One can click and drag the tiles.

This is all core java, javax.sound, and uses passive rendering. The images are mostly built via BufferedImage, not counting the .png symbol set that displays inside the gels.


Thanks for any feedback and encouragement.

"Greetings my friends! We are all interested in the future, for that is where you and I are going to spend the rest of our lives!" -- The Amazing Criswell
Offline philfrei
« Reply #1 - Posted 2011-01-21 01:34:50 »


This shows a partially completed puzzle. The first scroll on the right (light green with red border) has all it's tiles in the Hex grid as neighbors. The spokey thing doesn't have to be next to the eye. What counts is the sequence, eye-nextto-moon-nextto-spokey.

"Greetings my friends! We are all interested in the future, for that is where you and I are going to spend the rest of our lives!" -- The Amazing Criswell
Offline SimonH
« Reply #2 - Posted 2011-01-21 01:53:22 »

Screeny looks nice, but seriously, you'll lose 99% of potential players unless you can drop the load time. I gave up after 30 secs Undecided
For 3 mins load time people will expect a bit more than a puzzle game... Are the sounds really that vital? Can't you use midi or something instead?
Put up a 200K 'no sounds' version & I'll try it!

People make games and games make people
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline philfrei
« Reply #3 - Posted 2011-01-21 02:46:40 »

You are absolutely right.
I'll work on the "no sound" version, shouldn't be too hard. [Edit: Silent version, loads in about 10 seconds, is now up. Link is on first post of this thread.]

Any suggestions for playing back .mp3 or some other compressed format instead of .wav?

As a person with audio background, it is hard to let go of trying to make the sound quality really high.

"Greetings my friends! We are all interested in the future, for that is where you and I are going to spend the rest of our lives!" -- The Amazing Criswell
Offline loom_weaver

JGO Coder


Medals: 17



« Reply #4 - Posted 2011-01-21 03:28:00 »

I love the sound... quite peaceful and adds to the mood.

Dragging symbols is a pain... imagine playing on a touchpad or ipad.  Should be able to click source and dest separately too.

If both source and dest are already placed then they should switch positions instead of clearing the source.

The shades of green are too subtle and hard to see.  Same with the circle to hex surround.

I find the puzzles quite hard actually.  Took me probably 15-20 minutes to finish the first.
Offline philfrei
« Reply #5 - Posted 2011-01-21 03:50:21 »

Thank you! Much appreciated. I was thinking that when a "scroll" gets completed in the Hex grid--it becomes "energized" somehow. The lighter green is a placeholder measure. I'm thinking I'd like to make the scroll surface itself have some animation. Not sure how I'll implement this yet. Perhaps make a series of patterned paints that get cycled? Also looking at crazy notions like creating a voronoi-type skin and have it start vibrating around when the scroll is completed.

I really like the idea of switching the tiles. Hadn't gotten to it yet. [Edit: added 1/24/11] Was hoping to get feedback, such as yours, that this really would be helpful. I'm also considering ways of doing three-or-four-way switching, taking a block of hexes and kind of rotating them in place. The click-source-destination, that I hadn't considered in a long while, but will think about again. This is what I get for not having a handheld. Clicking and dragging is not easy to do in that context?

I like the idea of a peaceful atmosphere, as it can help concentration, and as such, an important part of the overall concept. It IS a difficult puzzle, like the last half of a good hard sudoku. I was envisioning it being something where one would only tackle one a day, and it would take a pleasant part of an hour to solve.

"Greetings my friends! We are all interested in the future, for that is where you and I are going to spend the rest of our lives!" -- The Amazing Criswell
Offline philfrei
« Reply #6 - Posted 2011-01-21 07:20:01 »

Am now looking into a suggestion that sound resources can be obtained from the server rather than from the jar. Maybe the best of both worlds is possible (fast load, high quality sound)?

[Edit: so far, no luck. Any suggestions as to whether this is a viable path or not?]
[Edit #2: more discussion on this in post #10.]

"Greetings my friends! We are all interested in the future, for that is where you and I are going to spend the rest of our lives!" -- The Amazing Criswell
Offline cylab

JGO Ninja


Medals: 38



« Reply #7 - Posted 2011-01-21 11:56:38 »

You could open a URLConnection to the server your applet is hosted, load your sound effects as ogg into a ByteBuffer while showing some intro-screen and play them in the game via jorbis.

Mathias - I Know What [you] Did Last Summer!
Offline teletubo
« League of Dukes »

JGO Ninja


Medals: 48
Projects: 4
Exp: 8 years



« Reply #8 - Posted 2011-01-21 12:32:27 »

Am now looking into a suggestion that sound resources can be obtained from the server rather than from the jar. Maybe the best of both worlds is possible (fast load, high quality sound)?

[Edit: so far, no luck. Any suggestions as to whether this is a viable path or not?]

haven't you tried OGG sound instead of wav ? I believe WAV is the worst alternative possible .

Offline markus.borbely

Junior Member





« Reply #9 - Posted 2011-01-21 23:01:37 »

Quite interesting, but I really miss beeing able to swap two pieces. Also, I want to be able to rotate them three and three. Place the mouse in the center of three pieces and right click to rotate them. Or something.
Technically, it works good.
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline philfrei
« Reply #10 - Posted 2011-01-21 23:10:16 »

Thanks! I will look into this. I've never used OGG, and will have to figure out how to convert the WAV to OGG. I've been doing my music work in Sonar Homestudio, and they don't have an export to OGG as far as I know. Will look into this.

The idea of playing the sounds from the server is of course (now that I tried to do it) a non-starter. The game loads quickly, but the repeated calls to the server for the sound files are ludicrously inefficient, especially since I was trying to allow overlapping sounds. Imagine trying to stream four or five audio files at the same time.

As long as the audio files end up on the client side, a background loading thread is a plausible strategy. Thanks for pointing me at OGG. I suppose I should look at MP3 playback as well. I just really prefer avoiding its lossiness, and want to be stubborn and see how far I can push audio quality for that significant minority of people who are as much or more sound-oriented than visually oriented.

[Edit: I've just run across FLAC, a free lossless audio compression! They are claiming 30%-50% lossless compression on audio files. AND, it is supported by OGG.]

"Greetings my friends! We are all interested in the future, for that is where you and I are going to spend the rest of our lives!" -- The Amazing Criswell
Offline philfrei
« Reply #11 - Posted 2011-01-21 23:24:39 »

Thank you Markus! I'm wondering how to do this without requiring keyboard keys, such as shift-click or alt-click, or s (for swap) click, or c-for chain rotate?

There could be a baseboard button that swaps the mode between click&drag vs click source, click destination. But that could be a bit annoying.

I was considering some sort of scooping of multiples tiles. But clicking in the vertice would be a lot friendlier.

Ooohh!  Grin Inspiration: clicking on the line (space) between two hex grids causes a swap! [Edit: added 1/24/1] Rotate of three could be in the vertice. Rotating a block of four--would require a vertice and a single swap. Very doable.

What is implication of dropping a tile into a vertice or edge...pondering.

"Greetings my friends! We are all interested in the future, for that is where you and I are going to spend the rest of our lives!" -- The Amazing Criswell
Offline Mads

JGO Ninja


Medals: 26
Projects: 3
Exp: 6 years


One for all!


« Reply #12 - Posted 2011-01-22 10:26:37 »

It works fine for me.. I just cant beat it  Lips Sealed

Offline philfrei
« Reply #13 - Posted 2011-01-22 11:05:35 »

Some strategies follow: (I plan on including a hints page, so these are some notes to that end.)

One idea is to count the number of unique symbols and the number of hexes they must occupy. If they are the same, you know that each symbol will only appear in one spot. From that you can make further deductions.

Second idea is to count the number of neighbors a given symbol has. If a symbol has four neighbors (according to its placement in the hanging scrolls), and a given hex, like a corner or edge, only has two, three or a fourth occupied by a non-neighbor, then you know that tile can't possibly go in that spot. That can be helpful as a process of elimination strategy.

If a sequence on a single scroll contains two "fixed" (purple) tiles, then you know something about where the intermediate tiles must go. This can be extended to apply to two scroll sequences with a common symbol.

Some of the above must be modified when there are fewer tile symbols than there are hexes! The last two puzzle examples are of this ilk. The fifth puzzle is quite difficult. It can easily take an hour or more. (My exhaustive tree analysis proved that there was only 1 solution in something like 5,400,000+ branches. The analysis tree in the first puzzle had 1 solution in 6640 branches.) But there are things that can be deduced, and solution "paths" that can be proven to be dead ends much quicker than the exhaustive tree can.

Still, it seems I should make some more examples that are easier to solve, to give folks some practice and a leg up. Having been at this a while, my perspective on difficulty is skewed.

"Greetings my friends! We are all interested in the future, for that is where you and I are going to spend the rest of our lives!" -- The Amazing Criswell
Offline appel

JGO Wizard


Medals: 49
Projects: 4


I always win!


« Reply #14 - Posted 2011-01-22 15:27:08 »

Loading for a minute, then nothing happened, just froze on a white screen.

Check out the 4K competition @ www.java4k.com
Check out GAMADU (my own site) @ http://gamadu.com/
Offline Alan_W

JGO Knight


Medals: 8
Projects: 3


Java tames rock!


« Reply #15 - Posted 2011-01-22 20:39:41 »

I'm really enjoying this.  Currently on Level 4, which is proving quite hard going.

That was fiendish!

On the Last Level (5)...

I can't quite formulate enough constraints to make this solveable.  Cry

Success!  Grin

Time flies like a bird. Fruit flies like a banana.
Offline Mads

JGO Ninja


Medals: 26
Projects: 3
Exp: 6 years


One for all!


« Reply #16 - Posted 2011-01-23 10:38:14 »

Tried it, and this is just not my kind of thing  Roll Eyes
It worked great though (non-sound version).

Offline philfrei
« Reply #17 - Posted 2011-01-23 10:46:55 »

Loading for a minute, then nothing happened, just froze on a white screen.

Thanks for trying! May I ask what browser/system?

I know one friend with a Mac is also having trouble. One thing I don't understand in his case, I'm using the Javascript code example provided in the tutorials that is supposed to insist on version 1.6 (if I understand it correctly), but his system still insists on loading 1.5. Been too busy to focus on this though, as i got a flurry of work out of the blue. (Thankfully!)

"Greetings my friends! We are all interested in the future, for that is where you and I are going to spend the rest of our lives!" -- The Amazing Criswell
Offline philfrei
« Reply #18 - Posted 2011-01-23 10:48:28 »

Tried it, and this is just not my kind of thing  Roll Eyes
It worked great though (non-sound version).

Thanks for giving it a go!

"Greetings my friends! We are all interested in the future, for that is where you and I are going to spend the rest of our lives!" -- The Amazing Criswell
Offline philfrei
« Reply #19 - Posted 2011-01-23 10:54:55 »

I'm really enjoying this.  Currently on Level 4, which is proving quite hard going.

That was fiendish!

On the Last Level (5)...

I can't quite formulate enough constraints to make this solveable.  Cry

Success!  Grin

Music to my ears! I'm really glad to hear you enjoyed the puzzle. (There's hope for this project.) I'm curious how long the various puzzles took for you to solve, and if you have solving strategies to share. (No guarantee I won't use the info to try and make even harder puzzles.)

"Greetings my friends! We are all interested in the future, for that is where you and I are going to spend the rest of our lives!" -- The Amazing Criswell
Offline Alan_W

JGO Knight


Medals: 8
Projects: 3


Java tames rock!


« Reply #20 - Posted 2011-01-23 15:53:21 »

Music to my ears! I'm really glad to hear you enjoyed the puzzle. (There's hope for this project.) I'm curious how long the various puzzles took for you to solve, and if you have solving strategies to share. (No guarantee I won't use the info to try and make even harder puzzles.)

I was doing pretty much as you suggested up to Level 4
1) Count the number of squares
2) Count the number of unique shapes and determine whether one or more must be repeated.
3) Look for repeated shapes on the scrolls and note which shapes are repeated
(You can't use the same shape twice in a sequence, as the score doesn't illuminate)
4) Look for repeated shapes on the board and note them as well
5) Count the number of times each shape appears on a scroll
6) Count the number of neighbours and then determine how many unique neighbours
7) Sort the resulting list by number of unique neighbours
Cool Any shape having more unique neighbours than the most connected cell on the board must have at least two occurrences
9) Shapes with a lot of neighbours are constrained to cells with at least that number of linkages
9) Starting at each shape already placed on the grid, place its unique neighbours on adjacent cells.
10) Look at the grid and rearrange those shapes so as to facilitate linking them up with other islands of shapes so as to complete a scroll
11) Do what-if's particularly when you don't know which shapes appear multiple times.  While duplicate shapes with lots of occurences and linkages are more likely, don't discount the less obvious sneaky choices.
12) Don't use 9) twice when writing lists.

Another clue to possible duplicate shapes, is where two shapes are adjacent on a scroll, but other scrolls have them adjacent to shapes prefixed on the board.  At least one shape must be a duplicate.

Time flies like a bird. Fruit flies like a banana.
Offline philfrei
« Reply #21 - Posted 2011-01-24 00:38:26 »

Excellent! Another friend was asking for a scratch pad for building sub-structures. That got me thinking of maybe a popup where one could place the entire substructure into the puzzle. I want to spend some time considering how to do this. Or maybe find some screen real estate where a substructure could be staged. I think there are a couple higher priorities first, though, like the hex switching/rotating and of course, solving the sound/download time situation.

Another general issue to consider: how many of the clues or strategies should be presented. Some might prefer a discovery process. Thinking, too, how wide is the gap between beginning and advanced sudoku players? How wide will the gap be with easy and hard Hexara puzzles? I suppose someone who considers themselves a "Friday" player won't normally do a "Monday" puzzle and vice versa, and this sorts itself out. (I'm thinking, to eventually make and present a puzzle a day, like with the NYTimes crosswords--Monday is easiest, Friday hardest.) But I get ahead of myself. First make a working, presentable program.

"Greetings my friends! We are all interested in the future, for that is where you and I are going to spend the rest of our lives!" -- The Amazing Criswell
Offline Terminalord

Senior Newbie





« Reply #22 - Posted 2011-03-06 17:45:50 »

Nice game. I like the overall look and feel of the game. Loaded fine and worked as advertised.

Firefox 4 beta 12
Windows Vista

Terminalord
Offline common_man

Senior Newbie


Medals: 1



« Reply #23 - Posted 2011-08-10 08:27:21 »

Hi,

   I tried out the game and liked it a lot Smiley Nice concept and nice designing too..
   
   I am not sure if work is still in progress for this game, but would like to point out a problem nevertheless :
   - After I complete one level, everything glows and disappears. After everything disappears completely and then I click 'Load' from 'File', it works fine. But when I click 'Load' while the disappearing act is still in progress, the new level is not loaded properly !! (the main structure in the middle does not appear).
Offline philfrei
« Reply #24 - Posted 2011-08-10 09:29:33 »

Thanks for the compliment and thanks for the suggestion! Yes, it's "in progress" but maybe "in stasis" makes more sense. Am working on a lot of background learning & projects that should ultimately be very useful for this and a couple other ideas for games I have designed.

I agree the way the puzzles come up is lame, and plan to entirely redo that on the next iteration. I wasn't aware of the bug you caught though. Thanks for pointing it out, though I will probably chuck the entire design for something else. Definitely open to suggestions. I'm thinking of having a screen with icons representing the puzzles and their status (solved or not). I'd also like to set up something where I can add a new puzzle a day, Monday puzzles being easiest, Saturday being the hardest, and Sundays have actual words on the scrolls instead of icon strings.

The scrolls could use some texture and animation for when they get "activated" via completion on the center grid. (Part of what I want to learn, like how to make them swing a bit like a real hanging cloth thing, with tassels.) Other ideas welcome.

"Greetings my friends! We are all interested in the future, for that is where you and I are going to spend the rest of our lives!" -- The Amazing Criswell
Offline common_man

Senior Newbie


Medals: 1



« Reply #25 - Posted 2011-08-10 12:39:08 »

Great ideas !! Smiley   I observed one more thing..  You have provided a 'Design' option in the 'File' menu. Are you planning to let users design puzzles themselves? Or is it for you only?

BTW : I reached the last level.. maan I havnt yet figured out teh solution for that..  Huh
Offline Cero
« Reply #26 - Posted 2011-08-10 16:28:27 »

Thanks! I will look into this. I've never used OGG, and will have to figure out how to convert the WAV to OGG.

even if that post is old, I use Oggenc  http://www.rarewares.org/ogg.php
which just converts raw pcm wav to ogg at a quality you desire. I only use ogg for sound after switching from FMOD to slick audio

btw FMOD is free and as long and your game is free aswell / not commercial in any kind, you can use it. FMOD being an industry standard obviously can play many formats and very nicely, like mp3 and so on.
NativeFMODEx is what you would want then

otherwise Slick uses JOrbis/Jogg, which you can of course also use by yourself

Offline philfrei
« Reply #27 - Posted 2011-08-10 22:27:42 »

Yes, I plan to make the designer available. One of the slick things in it is a tree-search algorithm that I use to show all solutions to a given puzzle. I use it to make sure the puzzles I make only have one solution.

It would be nice to have a way for people to share the puzzles that they make. I'm also thinking about ways to allow folks to use their own icons.

Grand plans...

Yes, the last puzzle is very difficult. I was envisioning making top-level puzzles about "Friday" Sudoku level difficulty, as in taking an hour or so to solve, and requiring a lot of precision in the process, having developed something of a skill set with the patterns, tricks and dependencies. (Curiously, the symbols of the last puzzle also work as a cypher--you can substitute letters and get 6 words on the six scrolls that are thematically related. But I didn't want to get into that as a standard feature as those puzzles are significantly harder to design.)

@cero: I hadn't heard of rarewares. I'll take a look. I've been using Audacity to convert .wav to .ogg. My goal is to stay within core Java, and the various ogg players I've found give me grief with things like memory leaks and lots of cpu consumption. To push the sound like I want to, I need as close to raw PCM as I can get away with. Just a design decision/goal. But thanks for the suggestions!

"Greetings my friends! We are all interested in the future, for that is where you and I are going to spend the rest of our lives!" -- The Amazing Criswell
Offline bobjob

JGO Knight


Medals: 10
Projects: 4


David Aaron Muhar


« Reply #28 - Posted 2011-12-11 07:54:19 »

Fun game.

The sound adds a lot to the atmosphere of the game. It will defenitely be a lot better with ogg support as the load time is a considerably excessive.
That said with all the graphic effects, I didnt notice any lag or flickers.

Running on:
OS: Win7
Browser: mozilla firefox.

My Projects
Games, Webcam chat, Video screencast, PDF tools.

Javagaming.org with chat room
Offline philfrei
« Reply #29 - Posted 2011-12-11 08:53:35 »

@bobjob -- Thanks!

Actually, I've decided to abandon OGG entirely. No more "Vorbis, the fearsome OggMonster" to battle. I've been making really good progress with coding for FM generation on the fly, which I am going to do, instead.

All the sounds you hear in the game were made by a 1980's Yamaha DX7. Well, actually, the patches were ported to a softsynth (FM7) and recorded from there as wav files. So, since they are FM, and I know FM pretty well, it made sense to try and make a Java version.

Anyway, I've got the "windchime" chime patch pretty well nailed this week, and aspects of the drone working as well. The bigger gongs are yet to do. The drone will need a flanger, but I think that will be doable. I'm told flangers are not much more complicated than an echo with a very short delay time (that varies), and I managed an echo on the Theremin project.

But, yeah, now that I have a mixer and FM happening, I think I'll be able to recreate the audio that took 15 MB of sound files with less than 150 KB of pure Java. (100:1 savings.) So I am psyched. Looking forward to solving that and getting back to finishing the game!

Side issue, I'm hoping (perhaps in vain) that I can use some of this sound programming expertise in android. But I haven't really looked closely enough at Android yet. Most of the books and tutorials I've come across just cover some simple ways to do sound, nothing low level.

"Greetings my friends! We are all interested in the future, for that is where you and I are going to spend the rest of our lives!" -- The Amazing Criswell
Pages: [1] 2
  ignore  |  Print  
 
 
You cannot reply to this message, because it is very, very old.

 

Add your game by posting it in the WIP section,
or publish it in Showcase.

The first screenshot will be displayed as a thumbnail.

ctomni231 (34 views)
2014-07-18 06:55:21

Zero Volt (30 views)
2014-07-17 23:47:54

danieldean (25 views)
2014-07-17 23:41:23

MustardPeter (27 views)
2014-07-16 23:30:00

Cero (42 views)
2014-07-16 00:42:17

Riven (44 views)
2014-07-14 18:02:53

OpenGLShaders (32 views)
2014-07-14 16:23:47

Riven (33 views)
2014-07-14 11:51:35

quew8 (30 views)
2014-07-13 13:57:52

SHC (66 views)
2014-07-12 17:50:04
HotSpot Options
by dleskov
2014-07-08 03:59:08

Java and Game Development Tutorials
by SwordsMiner
2014-06-14 00:58:24

Java and Game Development Tutorials
by SwordsMiner
2014-06-14 00:47:22

How do I start Java Game Development?
by ra4king
2014-05-17 11:13:37

HotSpot Options
by Roquen
2014-05-15 09:59:54

HotSpot Options
by Roquen
2014-05-06 15:03:10

Escape Analysis
by Roquen
2014-04-29 22:16:43

Experimental Toys
by Roquen
2014-04-28 13:24:22
java-gaming.org is not responsible for the content posted by its members, including references to external websites, and other references that may or may not have a relation with our primarily gaming and game production oriented community. inquiries and complaints can be sent via email to the info‑account of the company managing the website of java‑gaming.org
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines | Managed by Enhanced Four Valid XHTML 1.0! Valid CSS!