Java-Gaming.org Hi !
Featured games (83)
games approved by the League of Dukes
Games in Showcase (513)
Games in Android Showcase (121)
games submitted by our members
Games in WIP (577)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
    Home     Help   Search   Login   Register   
Pages: [1]
  ignore  |  Print  
  CodeGolf4k  (Read 1749 times)
0 Members and 1 Guest are viewing this topic.
Offline kramin42
« Posted 2012-11-10 10:38:50 »

I "finished" the game and submitted it to Java4k. Play it here:

http://www.java4k.com/index.php?action=games&method=view&gid=466

Original post:

A few days ago I decided it would be fun to make a game similar to Robozzle and this is what I've come up with so far:

CodeGolf4k

The aim is to get the "ball" in the hole while using as little of the program blocks as possible (hence "Code Golf").

Update: if there are bars on top of the hole then the gray buttons must be pressed first. Some levels start with the ball on the hole but the buttons unpressed.

Instructions (hopefully they make sense):

The four commands are:
^ : move forward one step
< : turn left
> : turn right
R : return to the last branch point (see below)

You can create a branch by clicking on the top or bottom of a program block and dragging to the top or bottom of another block.
Branches will cause the program to jump to the block it points to instead of advancing normally. Also, the return command will make the program continue from where it last branched (branching and returning works basically the same as calling a function and returning works, call stack included).

Selecting a colour in the palette and colouring a block will cause the command in the block to only get executed if the ball is on that colour (White means any colour).

Colouring a branch will cause it to only branch if the ball is on that colour. If a block has a white branch and a coloured branch pointing to different places it will prefer the coloured one if the ball is on that colour.

selecting the blank command at the bottom will allow you to recolour blocks without changing their command.

You can right-click on blocks to clear their command or on the start point of a branch to remove it.

Let me know what you think, suggestions are very welcome.

Hope you like it!

"All science is either physics or stamp collecting." - Ernest Rutherford.
CodeGolf4k
M4nkala
Offline ra4king

JGO Kernel


Medals: 352
Projects: 3
Exp: 5 years


I'm the King!


« Reply #1 - Posted 2012-11-13 01:37:19 »

Error: "g.class" not found.... :S

Offline kramin42
« Reply #2 - Posted 2012-11-13 01:46:15 »

Error: "g.class" not found.... :S
Bad timing  Sad, I only just updated it and it might take a little while for GitHub to start hosting the new jar file.

Edit: It should work now

"All science is either physics or stamp collecting." - Ernest Rutherford.
CodeGolf4k
M4nkala
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline kramin42
« Reply #3 - Posted 2012-11-13 02:10:56 »

I've updated the game, it now has four levels and the last two levels have buttons which have to be pressed before the ball can go down the hole.

It also shows a par, which is the number of blocks I solved it with.

Hint for the last level (Edit: now the second to last level):

It's a tree, use recursion.

"All science is either physics or stamp collecting." - Ernest Rutherford.
CodeGolf4k
M4nkala
Offline kramin42
« Reply #4 - Posted 2012-11-14 02:34:38 »

Updated again, It now has 10 levels and is at 4063 bytes

"All science is either physics or stamp collecting." - Ernest Rutherford.
CodeGolf4k
M4nkala
Offline StephR

Senior Duke


Medals: 9



« Reply #5 - Posted 2012-11-17 09:01:05 »

I suggest you to change a bit the "turn left" and "turn right" icons, so no one would confuse them with the "move forward" one. Instead of "<" and ">", what about drawing them this way : "<-1" and "1->".

In your game instructions, you may also add an indicative score rating, so each player would know her/his worth.
Offline kramin42
« Reply #6 - Posted 2012-11-18 01:53:48 »

I suggest you to change a bit the "turn left" and "turn right" icons, so no one would confuse them with the "move forward" one. Instead of "<" and ">", what about drawing them this way : "<-1" and "1->".
Ok, I've changed that and a few other minor things (you might need to clear your java cache for it to change). Thanks for the suggestion, I thought of changing those icons a little while ago but then forgot about it.

Quote
In your game instructions, you may also add an indicative score rating, so each player would know her/his worth.
Yeah, I wrote up these instructions pretty quickly and when I rewrite them I'll probably do something like that, as well as hints because some of the higher levels are quite difficult.

"All science is either physics or stamp collecting." - Ernest Rutherford.
CodeGolf4k
M4nkala
Pages: [1]
  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.

theagentd (20 views)
2014-10-25 15:46:29

Longarmx (53 views)
2014-10-17 03:59:02

Norakomi (47 views)
2014-10-16 15:22:06

Norakomi (35 views)
2014-10-16 15:20:20

lcass (39 views)
2014-10-15 16:18:58

TehJavaDev (69 views)
2014-10-14 00:39:48

TehJavaDev (69 views)
2014-10-14 00:35:47

TehJavaDev (61 views)
2014-10-14 00:32:37

BurntPizza (74 views)
2014-10-11 23:24:42

BurntPizza (47 views)
2014-10-11 23:10:45
Understanding relations between setOrigin, setScale and setPosition in libGdx
by mbabuskov
2014-10-09 22:35:00

Definite guide to supporting multiple device resolutions on Android (2014)
by mbabuskov
2014-10-02 22:36:02

List of Learning Resources
by Longor1996
2014-08-16 10:40:00

List of Learning Resources
by SilverTiger
2014-08-05 19:33:27

Resources for WIP games
by CogWheelz
2014-08-01 16:20:17

Resources for WIP games
by CogWheelz
2014-08-01 16:19:50

List of Learning Resources
by SilverTiger
2014-07-31 16:29:50

List of Learning Resources
by SilverTiger
2014-07-31 16:26:06
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!