Who likes Klax?

Thread in 'Other games' started by tepples, 11 May 2009.

  1. tepples

    tepples Lockjaw developer

    As I understand it, Andromeda/Mirrorsoft fell behind on royalty payments to Elorg, and Elorg settled by awarding console and portable rights to Nintendo. Once Atari Games learned that its upstream licensor had lost its license, it was almost the nineties, and the response was Klax.

    Who here plays Klax? Is there a Klax forum comparable to this Tetris forum? Is there anyone who plays both Guitar Hero and Klax, other than my cousin?
  2. Klax is a pretty boring game by most people's standards. It's barely more engaging than, say, Hatris.
  3. Zaphod77

    Zaphod77 Resident Misinformer

    Klax gets really unfair fast.

    The difficulty just ramps up to a ludicrous level, and you end up loosing regardless if skill, as near as I can tell...

    Maybe i just suck, though...
  4. tepples

    tepples Lockjaw developer

    I own three copies of Klax: one ported to NES, one ported to GBA, and one emulated on PS2 as part of Midway Arcade Treasures.

    The commentary for Smash TV in Midway Arcade Treasures states that in the late 1980s, Atari Games used the phrase "wave-based" to refer to games where you clear one screen and move on to the next (e.g. Missile Command, Smash TV). Dr. Mario for NES is another wave-based game.

    Atari Games' Tetris and Klax were wave-based. But these games incorporated a feature called "ramping": after you started a game or continued using a credit, the game would run on a lower difficulty level for a wave or two. (The NES port of Klax had an option to turn ramping on or off.) That might cause some of the "unfairness" you feel. I seem to remember some manic shooters having a similar feature, causing players to lose lives on purpose to turn down the difficulty in some parts of the game. And Tetris is no stranger to ludicrous difficulty: try clearing all 1300 levels of Shirase on Ti.

    As for boring, could you elaborate?
  5. I'd love to see a superplay video show me I'm wrong, but as far as I can tell being good at Klax means keeping the screen very empty and getting x2 or x3 chains. Colour me unimpressed. There's just no room to expand into rich high level play strategies.
  6. Zaphod77

    Zaphod77 Resident Misinformer

    Tepple,s you are probably thinking of Battle Garegga, which is infamous for having a very nasty rank that prevents poeple form single life clearing the game.

    The game is not meant to be single life cleared, though, it is meant to be played for score, and you are expected to do whatver it takes to get more points, and thus more extends so you can die more and lower the rank so you can progress farther.

    Most modern shooters are absolutely possible to single life clear. Not easy, but possible.

    Actually in Klax, i'm prety sure the ramping feature doesn't lower the difficulty of the first few, it increases the difficulty of the following screens rapidly. Before long the tiles just show up too fast, and ther eare many more colors then places to put them. And those evil Horizontal Waves are just sadistic. Much worse than the diagonal ones.
  7. K


    played this game when i was young, on my cpc 6128, the coming piece animation was funny, but i always died pretty fast.... never understood the interest. quickly got back to fruity frank.
    make me remember i also had the opportunity to play standard Tetris and Tetris 3D on my uncle's PC (5.25 inch soft disk) , but as far i remember Tetris just left me the impression of the game you play because you don't have anything else on hand. Fortunately my uncle had prince of persia.
  8. tepples

    tepples Lockjaw developer

    Yep. I just couldn't remember the name or find the right Google keywords in about ten minutes of searching.

    Six of one == half dozen of the other.

    The bin is five cells wide, and there are eight colors. You come off like a Gnometris player used to being able to "play forever" on its 14-cell-wide grid with the following pattern, adjusting it to cover short-term variations in the randomizer.
    |I      |
    |I JL S T Z|
    |I JJLLOO S TZ |
  9. Zaphod77

    Zaphod77 Resident Misinformer

    I very well may just suck, but i have serious issues trying to place 8 colors.

    When there are four or five, it's trivial to place all of them.

    WHen there ie six, you keep the sixth color on the paddle, and can still place the other five every time.

    Once you get up to seven, the safety net is gone, and you evenjtually will have to cover yourself and start juggling pieces. You can still go for verticals, and every time you get three of one of the colors that doesn't fit, jump them in the pit immediately. That works a fair amount of the time in the early levels before the diffculty ramps up.

    But eight is just too many for me to even do that reliably. And that's not even the maximum number of colors.

    The max is TEN.

    At level 60, the dark green tiles are adde,d and at 90, they add the grey ones.

    SO the color spectrum is

    Red, orange, yellow, green, blue, purple, cyan, white, dark green, and grey.
  10. lgb


    Maybe we need a Klax Koncept (disregarding those infringements, of course) subforum?
  11. tepples

    tepples Lockjaw developer

    In fact, since 1996, Mortal Kombat has the same publisher as Klax.

    I'm working on a Klax clone codenamed FK. I already have keyboard, joystick, mouse, and Guitar Hero PS3 controller support in the version on my Ubuntu laptop. The next step is line clearing, and that's a bit trickier than in Columns, Dr. Mario, and the like because Klax has a wild tile. Once I get that solid, I'll be able to upload a prototype like I did for Lockjaw 0.01. Then we can take a few months to experiment with balancing away the overly fast ramping and boring play, so that by the time it is the teens and there is once again time for the game, we will be ready.
  12. Zaphod77

    Zaphod77 Resident Misinformer

    well there are 10 colors, plus wild tile.

    so we assign 16 bits per tile.


    and wild would be


    now we simply and three ajacent positions, and if we get a non zero number, we have a match.

    This also automatically catches the 4 and 5 long klaxes, and gives them the appropriate count. Add to klax counter, if the right direction.

    Check every possible 3 long match line before deletes. First we start with the horizontals. GO thru the tiles, amrking the number of horizontla klaxes eahc is used in.

    Next we process those klaxes for score, according to table below.

    vertical horizontal diagonal

    3-KLAX 50 1,000 5,000
    4-KLAX 10,000 5,000 10,000
    5-KLAX 15,000 10,000 20,000

    Yes, a vertical 5 klax IS possible. you have to drop the third thru 5th tiles while another delete is happening elsewhere. You can also cheat on NES klax only and drop pieces WHILE tiles are falling from a delete. This cannot be done on the arcade.

    So we are doing horizontals. the following patters are possible.


    single horizontal: 1 multiplier


    horizontal 4 klax: 1 multiplier


    horizontal 5 klax: 1 multiplier


    two horizonal 3 klaxes, scored by wild tile: 2 multiplier (this is important)

    NOw, we do the same two pass process for vertical.

    Then the five diagonals for 1 direction.

    Then the five for the other direction. note that some of these diagonals are short, and have less options for them.

    multiply total score by klax multiplier.

    flash tiles and play sound effect during delay.

    Award score.

    Apply klax count against total, erase klax count.

    delete tiles, make tiles fall down.

    perform next klax sweep, only if none are found, reset multiplier.

    Not so hard. [​IMG]
  13. lgb


    Ah yes. Blame it on me having few arcade game compilations (I've only had Midway Arcade Treasures 3).

    Interestingly enough, it doesn't seem to be mentioned in Atari's Wiki article.
  14. tepples

    tepples Lockjaw developer

    Speaking of Midway Arcade Treasures: An interview on the game disc states that one of the developers loved Lucy, and Klax was inspired by the sitcom's candy factory episode titled "Job Switching". BPS designed another game that could be described as a more literal video game interpretation of the episode, rebranded by Nintendo as Yoshi's Cookie.

    UPDATE: It's here. FK Convey 0.01 (source and win32 binary)
  15. Muf


    Great, now if you dealt blocks and changed the track speed based on the rhythm of a user-supplied MP3 file, you can combine Guitar Hero, Klax and Audiosurf into one game! [​IMG]
  16. I noted before that Lockjaw had issues compiling in GCC 4.3 and above, but the same issue pops up in FK Convoy as well. I've discovered that the issue is in <include-path>/allegro/internal/alconfig.h:
    /* special definitions for the GCC compiler */
    #ifdef __GNUC__
       #define ALLEGRO_GCC
       #ifndef AL_INLINE
          #ifdef __cplusplus
             #define AL_INLINE(type, name, args, code)    \
                static inline type name args;             \
                static inline type name args code
             #define AL_INLINE(type, name, args, code)    \
                extern __inline__ type name args;         \
                extern __inline__ type name args code
       #define AL_PRINTFUNC(type, name, args, a, b)    AL_FUNC(type, name, args) __attribute__ ((format (printf, a, b)))
    Replacing with in the above:

    /* special definitions for the GCC compiler */
    #ifdef __GNUC__
       #define ALLEGRO_GCC
       #ifndef AL_INLINE
          #ifdef __cplusplus
             #define AL_INLINE(type, name, args, code)    \
                static inline type name args;             \
                static inline type name args code
             #define AL_INLINE(type, name, args, code)    \
                extern __inline__ __attribute__((__gnu_inline__)) type name args;         \
                extern __inline__ __attribute__((__gnu_inline__)) type name args code
    Save that, and now Lockjaw and FK Convoy compile. This type of modification should be done by the Allegro developers, however, so I suggest adding -fgnu89-inline to CFLAGS in Lockjaw or FK Convoy's makefile until the Allegro developers fix this.

    Last edited: 29 Jun 2009
  17. tepples

    tepples Lockjaw developer

    But how do I detect which version of GCC is installed, so that I don't get this?
    cc1.exe: error: unrecognized command line option "-fgnu89-inline"
  18. You could do this:
    GCC_VERSION := `$(CC) --version | sed -ne '1s/^gcc (GCC) \(\([[:digit:]]\.\)\{1,\}[[:digit:]]\).*$/\1/p'`
    On my system, that puts "4.4.0" into GCC_VERSION. If you only want the major.minor version, i.e. "4.2", "4.3", "4.4" or higher, the following works:
    GCC_VERSION := `$(CC) --version | sed -ne '1s/^gcc (GCC) \([[:digit:]]\.[[:digit:]]\).*$/\1/p'`
    I couldn't really find any other way to get the GCC version number in a makefile. However, in compiled C code, __GNUC__ and __GNUC_MINOR__ are the major and minor version numbers at compile time when in GNU C modes of operation.

    I'd suggest filing a bug report to the Allegro developers so you don't have to do all this version checking nonsense in the future.
  19. tepples

    tepples Lockjaw developer

    MinGW (port of GCC to Windows without Cygwin) is still stuck on GCC 3.4.5 because of C++ ABI issues, and Ubuntu Hardy (what I run on my laptop) isn't on the latest GCC either. The sed command gives 3.4 when I enter it into Windows XP's command prompt (I have make and sed from devkitPro MSYS installed):
    E:\develop\fk>gcc --version | sed -ne '1s/^gcc (GCC) \([[:digit:]]\.[[:digit:]]\).*$/\1/p'
    But it doesn't find anything when I enter it into Bash on the same PC:
    bash-3.1$ gcc --version | sed -ne '1s/^gcc (GCC) \([[:digit:]]\.[[:digit:]]\).*$/\1/p'
    bash-3.1$ exit
    After a bit of testing, which involved the following minimal makefile (with the $ doubled to keep Make from treating $/ as a variable name and sed from bitching about an "Unterminated `s' command"):
    CC := gcc
    GCC_VERSION := `$(CC) --version | sed -ne "1s/^gcc (GCC) \([[:digit:]]\.[[:digit:]]\).*$$/\1/p"`
    .PHONY: test
     echo $(GCC_VERSION)
    I determined that Make handles command lines more like Bash than like cmd.exe, which I had guessed because make -j2 uses sh to help with job scheduling. I did a Google search for [ sed gcc version ], which led me to a page explaining . Now with this makefile:
    CC := gcc
    GCC_VERSION := `$(CC) -dumpversion`
    .PHONY: test
     echo $(GCC_VERSION)
    I get this output:
    echo `gcc -dumpversion`
    The next step is figuring out how to use less-than and greater-than on version numbers. I looked in Make's manual, and the only conditional statements it supports are ifeq, ifneq, ifdef, and ifndef: only equality, not inequality. I tried using $(if) with the '[' program, but it can't compare strings for inequality unless they're integers:
    E:\develop\fk>[ 3.4 -lt 4.2 ]
    [: invalid integer `3.4'
    I tried searching Allegro's SourceForge.net bug tracker and allegro.cc, and I saw no reference to this issue. That shocked me, as newer GCC has been out long enough that this ought to have come up. But Allegro 4.2.x seems to no longer be maintained: "Closing for now as 4.2.x is rather old. Please reopen or report a new bug if the problem persists in 4.3.10." If I were to upgrade to 4.3.10, I'd have to recompile from source on every platform because odd-numbered minor versions of Allegro are unstable, and unstable versions of Allegro aren't included in distribution repositories. But then this might be the right opportunity to switch to static linking, seeing as Windows provides no way to distribute dependencies other than to bundle them with an application.
  20. This works for any version number of GCC:
    CC := gcc
    CFLAGS := -Wall -O -std=gnu99
    GCC_MAJOR := `$(CC) -dumpversion | sed -e 's/\([[:digit:]]\{1,\}\).*/\1/'`
    GCC_MINOR := `$(CC) -dumpversion | sed -e 's/[[:digit:]]\{1,\}\.\([[:digit:]]\{1,\}\).*/\1/'`
    GCC_ATLEAST_4_3 := $(if $(shell if [ \( $(GCC_MAJOR) -gt 4 \) -o \( \( $(GCC_MAJOR) -eq 4 \) -a \( $(GCC_MINOR) -ge 3 \) \) ]; then echo yes; fi),yes)
    ifeq ($(GCC_ATLEAST_4_3), yes)
    	CFLAGS += -fgnu89-inline
    .PHONY: test
    	@echo $(CC) $(CFLAGS)
    It appends -fgnu89-inline to CFLAGS only if the GCC version is 4.3 or above. It also covers for when there is GCC 5.0, 6.0, etc. The $(shell <shell operations>) command is the real saving grace here, because it lets us use shell commands, which can work with numbers. Notice that I've not increased dependencies at all; only shell builtins and sed are used.
    Last edited: 29 Jun 2009

Share This Page