Omnimaga

Calculator Community => Contests => Community Contests => Topic started by: JWinslow23 on August 11, 2014, 01:19:21 pm

Title: [ENDED] Code Golf Contest #5
Post by: JWinslow23 on August 11, 2014, 01:19:21 pm
This challenge will never happen again. :P

NEXT: Here (http://www.omnimaga.org/other-calculator-discussion-and-news/code-golf-contest-6)
PREVIOUS: Here (http://www.omnimaga.org/other-calculator-discussion-and-news/code-golf-contest-4)

Challenge 5

Problem
You must make a game of Snake (or Nibbles, if you know it as that). It must follow all of these guidelines:
Deadline
August 18, 2014, 1:00 AM EST

As there is random chance involved, and it is interactive input, no sample input shall be given.

If any further clarification is needed, contact me or Runer112. We will try to guide your heads in the right direction. (Get it? Like, you're guiding the snake's head in a certain dire...ah, just forget it.)

Nspire Lua
RankUserSizeBoard SizeDateCode
1Adriweb54823*238/16/2014 4:57:21 PM
Spoiler For Spoiler:
a,b=5,2
x,y=0,1
g,h={5},{2}c=0
f=0
m=math.random
r=table.remove
timer.start(.1)on={charIn=function(n)x=({x=-1,z=1})[n]or 0
y=({r=-1,y=1})[n]or 0
end,paint=function(n)z=n.drawString
z(n,f,14*a,9*b)for e=1,#g do
z(n,8,14*g[e],9*h[e])end
end,timer=function()g[#g+1]=(g[#g]+x)%23
h[#h+1]=(h[#h]+y)%23
for n=1,#g-1 do
if g[n]==g[#g]and h[n]==h[#h]then
error(c)end
end
if a==g[#g]and b==h[#h]then
repeat
a=m(22)b=m(21)for n=1,#g do
if a==g[n]and b==h[n]then
d=0
break
else
d=1
end
end
until d>0
c=c+1
else
r(g,1)r(h,1)end
platform.window:invalidate()end}

TI-83+ BASIC
RankUserSizeBoard SizeDateCode
1JWinslow2330121*218/11/2014 9:55:09 AM
Spoiler For Spoiler:
26->K
1.01->B
{4Ans->A
"300fPart(Ans)-2->u
"2-3int(Ans->v
ClrDraw
AxesOff
ZStandard
104->Xmax
~72->Ymin
ZInteger
Vertical 63
For(A,1,440
Repeat not(sum(⌊A=Ans
randInt(1,21)+.01randInt(1,21->C
End
Repeat sum(Ans=C
A->dim(⌊A
⌊A(1
Pt-On(u,v,2
B
Pt-Off(u,v,2
C
Pt-On(u,v,3
Pt-Off(u,v
getKey->L
If Ans=34 or 2>abs(Ans-25
Ans->K
⌊A(A->B
⌊A(1)+(K=34)-(K=25)+.01((K=26)-(K=24
Ans+21(not(int(Ans))-(22=int(Ans))+.01(not(fPart(Ans))-(.22=fPart(Ans
If L=45 or sum(⌊A=Ans
Goto 0
augment({Ans},⌊A->A
End
augment(Ans,{Ans(A->A
End
Lbl 0
ClrHome
A

TI-84+CSE BASIC
RankUserSizeBoard SizeDateCode
1JWinslow23336165*1658/12/2014 4:02:45 PM
Spoiler For Spoiler:
26->K:1.001->B:{4Ans->A
ClrDraw:AxesOff
BorderColor 3
BackgroundOff:ZStandard
Vertical 2.5,12
For(A,1,600
Repeat not(sum(⌊A=Ans
randInt(1,165)+.001randInt(1,165->C
End
Repeat sum(Ans=C
A->dim(⌊A
⌊A(1
Pxl-On(fPart(Ans)E3-1,int(Ans-1),14
Pxl-Off(fPart(B)E3-1,1-int(B-1
Pxl-On(fPart(C)E3-1,1-int(C-1),11
getKey->L
If Ans=34 or 2>abs(Ans-25
Ans->K
⌊A(A->B
⌊A(1)+(K=34)-(K=25)+.001((K=26)-(K=24
Ans+165(not(int(Ans))-(166=int(Ans)))+.165(not(fPart(Ans))-(.166=fPart(Ans
If L=45 or sum(⌊A=Ans
Goto 0
augment({Ans},⌊A->A
End
augment(Ans,{Ans(A->A
End
Lbl 0
ClrHome
A

Java
RankUserSizeBoard SizeDateCode
1ben_g1610(screen_height-20)*(screen_height-20)8/12/2014 1:16:46 PM
Spoiler For Spoiler:
import java.awt.*;import java.awt.event.*;import java.util.*;import java.util.List;import javax.swing.*;class S{static List<N> s;static int x=20,y=20,d=0,h,i=x,j=y,o=0;static Graphics g;public static void main(String[]a){s=new ArrayList<N>();for(int i=0;i<60;i++)s.add(new N(19,20));final JFrame f = new JFrame();f.setUndecorated(true);h=Toolkit.getDefaultToolkit().getScreenSize().height-20;f.setBounds(0,20,h,h);f.addKeyListener(new KeyListener(){@Override
public void keyPressed(KeyEvent k){if(k.getKeyCode()==k.VK_ESCAPE)System.exit(0);if(k.getKeyCode()==k.VK_RIGHT)d=0;if(k.getKeyCode()==k.VK_DOWN)d=1;if(k.getKeyCode()==k.VK_LEFT)d=2;if(k.getKeyCode()==k.VK_UP)d=3;}@Override
public void keyReleased(KeyEvent k){}@Override
public void keyTyped(KeyEvent k){}});JPanel p=new JPanel();f.setContentPane(p);f.setVisible(true);g=f.getGraphics();while(!c(x,y)){x%=h;y%=h;if(x<0)x=h-1;if(y<0)y=h-1;g.setColor(Color.green);g.fillRect(x,y,1,1);g.setColor(Color.red);g.fillRect(i,j,1,1);g.setColor(Color.white);g.fillRect(s.get(0).x,s.get(0).y,1,1);s.add(new N(x,y));if(i==x&&j==y){o=0;for(int i=0;i<30;i++)s.add(new N(x,y));if(s.size()>=h*h)System.exit(0);}else{s.remove(0);}if(o==0){o=1;f();}long m=System.currentTimeMillis();while(System.currentTimeMillis()-m<20){}if(d==0)x++;if(d==1)y++;if(d==2)x--;if(d==3)y--;}System.out.print(s.size()/10-7);System.exit(0);}static void f(){while(c(i,j)){i=(int)(Math.random()*h);j=(int)(Math.random()*h);}}static boolean c(int x,int y){for(int i=0;i<s.size();i++){if(s.get(i).x==x&&s.get(i).y==y){return true;}}return false;}}class N{int x,y;public N(int v,int w){x=v;y=w;}}

SysRPL
RankUserSizeBoard SizeDateCode
1329827864*648/17/2014 6:59:16 PM
Spoiler For Spoiler:
::
  RECLAIMDISP BINT0 BINT64 BINT128
  2DUP BINT0 2OVER LINEON LINEON
  BINT2 BINT4
  BINT32 DUP TWO{}N ONE{}N TRUE
  BEGIN
    VERYSLOW
    IT ::
      BEGIN
        BINT64 UNCOERCE DUP
        %RAN %* COERCE #2* SWAP
        %RAN %* COERCE
        2DUP PIXON? UNROT PIXON
      NOT_UNTIL
      ROT#1+UNROT
    ;
    SWAP GETTOUCH IT ::
      { BINT10 BINT14 BINT15 BINT16 }
      NTHOF DUP#0<> ?SWAPDROP
    ;
    DUPDUP 4UNROLL
    BINT1 #AND #0=
    3PICK FPTR2 ^LASTCOMP INCOMPDROP
    3PICK ?SWAP 4ROLL
    BINT2 #>ITE BINT1 BINT63 #+
    BINT63 #AND
    ROT ?SWAP 2DUP TWO{}N
    4ROLLSWAP >TCOMP UNROTSWAP
    #2* SWAP2DUP PIXON?
    3PICK3PICK SWAP#1+SWAP PIXON?
    2SWAP 2DUP SWAP#1+SWAP LINEON
    5PICK 4PICK LENCOMP #< IT ::
      ROTDUP CDRCOMP 4UNROLL
      CARCOMP INCOMPDROP
      SWAP #2* SWAP2DUP SWAP#1+SWAP
      LINEOFF
    ;
  UNTIL 3DROP
;

Ruby
RankUserSizeBoard SizeDateCode
1Juju611(height-1)*(height-1)8/18/2014 11:40:15 AM
Spoiler For Spoiler:
f=[7,7]
s=[[4,4]]
t=0
z=true
d=:r
l,r=`stty size`.split
l=l.to_i-1
while z do
print"\x1b[2J\x1b["+f[1].to_s+";"+f[0].to_s+"H*"
s.each{|a|print"\x1b["+a[1].to_s+";"+a[0].to_s+"H#"}
print"\x1b["+(l+1).to_s+";1H"+t.to_s
`stty raw -echo`
c=STDIN.read_nonblock(1)rescue nil
`stty -raw echo`
case c
when'a'
d=:l
when's'
d=:d
when'w'
d=:u
when'd'
d=:r
end
x,y=s[-1]
case d
when:l
x-=1
when:d
y+=1
when:u
y-=1
when:r
x+=1
end
x=1 if x>l
x=l if x<1
y=1 if y>l
y=l if y<1
n=[x,y]
if s.index(n)!=nil
z=false
else
s.push(n)
if n==f
t+=1
while(f=[1+rand(l),1+rand(l)]).index(n)!=nil do end
else
s.shift
end
end
sleep 0.1
end

Language Ranking
RankLangUserSizeBoard SizeDate
1SysRPL329827864*648/17/2014 6:59:16 PM
2TI-83+ BASICJWinslow2330121*218/11/2014 9:55:09 AM
3TI-84+CSE BASICJWinslow23305165*1658/12/2014 4:02:45 PM
4Nspire LuaAdriweb54823*238/16/2014 4:57:21 PM
5RubyJuju611(height-1)*(height-1)8/18/2014 11:40:15 AM
6Javaben_g1610(screen_height-20)*(screen_height-20)8/12/2014 1:16:46 PM
Title: Re: Code Golf Contest #5
Post by: Matrefeytontias on August 11, 2014, 01:20:49 pm
Just so you know, someone made a 256-bytes Snake on Cemetech using z80 ASM, and it does all you said (although it uses a 16*16 grid).
Title: Re: Code Golf Contest #5
Post by: ClrDraw on August 11, 2014, 02:15:56 pm
I made one just the other week but it's a 33 x 21 grid and I'm too lazy to change it.
(http://clrdraw.weebly.com/uploads/2/6/9/6/26968629/8306255.gif)

http://clrdraw.weebly.com/ (http://clrdraw.weebly.com/)

Quote
Just so you know, someone made a 256-bytes Snake on Cemetech using z80 ASM, and it does all you said (although it uses a 16*16 grid).
Woah  O.O  that's awesome.
Title: Re: Code Golf Contest #5
Post by: JWinslow23 on August 11, 2014, 02:57:37 pm
Just so you know, someone made a 256-bytes Snake on Cemetech using z80 ASM, and it does all you said (although it uses a 16*16 grid).
Notify that someone! He can change it, and submit it!

And this challenge is more oriented towards computer languages and stuff, as a quick Google search will bring up an already made answer for TI-BASIC (which I will not allow anyone to submit but the author, whom I do not know).
Title: Re: Code Golf Contest #5
Post by: ben_g on August 11, 2014, 03:15:10 pm
Coded golf 5? Does that mean 4 is over already?
/me forgot to submit his entry again :S

Anyway, I'll try this one. Can we use simple command-line text graphics and rely on the user to set the window to the correct size?
Title: Re: Code Golf Contest #5
Post by: JWinslow23 on August 11, 2014, 03:46:53 pm
Coded golf 5? Does that mean 4 is over already?
/me forgot to submit his entry again :S

Anyway, I'll try this one. Can we use simple command-line text graphics and rely on the user to set the window to the correct size?
It doesn't matter the size of the window as long as the play area is 8 snake pieces tall and 16 snake pieces wide. And yes, you can use ASCII graphics.
Title: Re: Code Golf Contest #5
Post by: ben_g on August 11, 2014, 03:56:28 pm
Well, I mainly meant that if you output text in a command line larger than the area you use, it may show garbage on the edges, like the remainder of previous frames.
Title: Re: Code Golf Contest #5
Post by: JWinslow23 on August 11, 2014, 04:02:06 pm
Well, I mainly meant that if you output text in a command line larger than the area you use, it may show garbage on the edges, like the remainder of previous frames.
I think you can assume that the window is at least 8*16, but if you want to change the window size to a certain number, you can.
Title: Re: Code Golf Contest #5
Post by: Adriweb on August 11, 2014, 05:52:55 pm
I got a working one at 533 bytes in Nspire-Lua.
Still working on it.

Also, just to be sure : we loose whenever the head of the snake touches any part of its body, right ?
(that's what I did anyway)
Title: Re: Code Golf Contest #5
Post by: willrandship on August 11, 2014, 05:57:44 pm
What are the rules on how input must work? All the languages I've been using so far don't support raw input without libraries, and it would be faster to do it via line based input, but also much worse.

It will also be impossible for you to test without installing perl/python and whatever library I use.
Title: Re: Code Golf Contest #5
Post by: JWinslow23 on August 11, 2014, 06:14:22 pm
What are the rules on how input must work? All the languages I've been using so far don't support raw input without libraries, and it would be faster to do it via line based input, but also much worse.

It will also be impossible for you to test without installing perl/python and whatever library I use.
I will install perl or python, whichever I get submissions for. I will, however, have to see an animated screenie of any entries of Nspire Lua and any other language I can't test.
If you press a certain key, the snake goes a certain direction. If no key is pressed, the snake keeps going in its current direction. That's how input works. Plain and simple. Like getKey for TI-BASIC, or some complicated sequence with CHOICE for Batch.
Also, yes, Adriweb, that is how it works.
Title: Re: Code Golf Contest #5
Post by: Adriweb on August 11, 2014, 06:16:52 pm
I will, however, have to see an animated screenie of any entries of Nspire Lua and any other language I can't test.
My code works on Jim's js Nspire-Lua tester ^^
http://bwns.be/jim/WEBspire/editor.html
(edit : well, there's a weird behaviour on some modulus cases, though :o - the snake simply decides to vanish from the screen :P)

Also, down to 523 bytes
Edit : 522
Edit : 517
Edit : 502
Title: Re: Code Golf Contest #5
Post by: JWinslow23 on August 11, 2014, 06:18:07 pm
That's great! :D
Title: Re: Code Golf Contest #5
Post by: willrandship on August 11, 2014, 06:19:14 pm
That's really not simple at all for any terminal-based language. Input for those languages is not handled in real time. Imagine making a basic snake with only input, not getkey, and you'll be pretty much spot on.
Title: Re: Code Golf Contest #5
Post by: JWinslow23 on August 11, 2014, 06:32:45 pm
That's really not simple at all for any terminal-based language. Input for those languages is not handled in real time. Imagine making a basic snake with only input, not getkey, and you'll be pretty much spot on.
Is there a command like CHOICE?

http://ss64.com/nt/choice.html (http://ss64.com/nt/choice.html)

If there is one of that kind of command, it should be simple enough.
Title: Re: Code Golf Contest #5
Post by: ben_g on August 11, 2014, 07:16:25 pm
(http://img.ourl.ca/1407806056.gif)
It's slow and huge, but it's a start.
Title: Re: Code Golf Contest #5
Post by: JWinslow23 on August 11, 2014, 07:17:42 pm
(http://img.ourl.ca/1407806056.gif)
It's slow and huge, but it's a start.
I believe I had something like that, except 100 bytes smaller.
Title: Re: Code Golf Contest #5
Post by: Adriweb on August 11, 2014, 07:51:34 pm
down to 500 bytes with no true-randomness as well as no check for spawn location

With both, 613 bytes >.<

Anyway, submitted.

GL HF


Edit : 596 bytes;
Title: Re: Code Golf Contest #5
Post by: JWinslow23 on August 12, 2014, 10:25:26 am
Anyway, submitted.
...then where's the PM? :P
Title: Re: Code Golf Contest #5
Post by: Adriweb on August 12, 2014, 10:29:48 am
It was the pastebin on the IRC PM :P

But anyway, I forum-PM'd you ^^
Title: Re: Code Golf Contest #5
Post by: JWinslow23 on August 12, 2014, 10:31:06 am
It was the pastebin on the IRC PM :P

But anyway, I forum-PM'd you ^^
Oh, that's why you sent it to me there. :-\ Well, I mean forum PM from now on. Just like last contest. :P

Also, check that your board is square.
Title: Re: Code Golf Contest #5
Post by: Adriweb on August 12, 2014, 10:48:52 am
it is. 9x9.

Got the PM, btw ?
Title: Re: Code Golf Contest #5
Post by: JWinslow23 on August 12, 2014, 11:02:33 am
it is. 9x9.

Got the PM, btw ?
Should've responded to you. :)

Oh, and I have 2 entries of my own. They are board size 21*21 and 165*165, respectively. They are the largest square boards for their platforms that fit the rules.
Title: Re: Code Golf Contest #5
Post by: ben_g on August 12, 2014, 12:15:02 pm
...
You must make a game of Snake (or Nibbles, if you know it as that). It must follow all of these guidelines:
  • It must be played on an square "grid" (each space being the width of one snake segment) as large as possible
  • The graphics for the food and the snake segments must each be different
  • The border must be clearly defined, and have different graphics from the food or the snake
   [li]The food must spawn randomly, Adriweb :P [/li]
   [li]The snake is moved with interactive input (such as a getKey-like command) if possible; if not supported, you may enter a direction each frame[/li]
   [li]Your snake must wrap around the sides of the board[/li]
   [li]At game's end, the program must display however many pieces of food were eaten in some way[/li]
   [li]Your game, above all, must be playable :P [/li]
[/list]
...
It's not clearly mentioned in the rules, but shouldn't the food always spawn in an empty space as well (not on the snake)?
Title: Re: Code Golf Contest #5
Post by: Adriweb on August 12, 2014, 12:50:37 pm
Yes indeed, it must.

(it's what takes me ~90 bytes :P)
Title: Re: Code Golf Contest #5
Post by: JWinslow23 on August 12, 2014, 01:31:10 pm
...
You must make a game of Snake (or Nibbles, if you know it as that). It must follow all of these guidelines:
  • It must be played on an square "grid" (each space being the width of one snake segment) as large as possible
  • The graphics for the food and the snake segments must each be different
  • The border must be clearly defined, and have different graphics from the food or the snake
  • The food must spawn on a random EMPTY square, Adriweb :P
  • The snake is moved with interactive input (such as a getKey-like command) if possible; if not supported, you may enter a direction each frame
  • Your snake must wrap around the sides of the board
  • At game's end, the program must display however many pieces of food were eaten in some way
  • Your game, above all, must be playable :P
...

It's not clearly mentioned in the rules, but shouldn't the food always spawn in an empty space as well (not on the snake)?

What unclear rule? :P

Also, this:
(http://img.ourl.ca/Contest5TIBASIC.gif)
Title: Re: Code Golf Contest #5
Post by: ben_g on August 12, 2014, 01:46:49 pm
Also:
...
You must make a game of Snake (or Nibbles, if you know it as that). It must follow all of these guidelines:
  • It must be played on an square "grid" (each space being the width of one snake segment) as large as possible
  • ...
...

(http://img.ourl.ca/snake.png)
Large enough for you?  :P
(it automatically adjusts to the screen size, and that at only 1580 bytes)
Title: Re: Code Golf Contest #5
Post by: Adriweb on August 12, 2014, 04:23:56 pm
Hum, as large as possible now.... mkay

I'm down to 551 bytes btw in Lua, not with this new rule though

Edit : nevermind, 555 bytes for a well defined grid (which is now 23x23)
Title: Re: Code Golf Contest #5
Post by: JWinslow23 on August 12, 2014, 05:13:58 pm
I would have a 63*63 board for TI-83+ BASIC, but that would break the rule of "border, food, and snake graphics must be different". And I have a ~280 byte one in TI-83+ BASIC, but it breaks the rule of "largest possible board". Oh, the things I do to myself...
Title: Re: Code Golf Contest #5
Post by: Adriweb on August 12, 2014, 05:17:36 pm
That's also true for the Nspire, can't really see anything with a 1px thing (especially on clickpads) so I've made the biggest square that's enjoyable to play with I guess (not confusing at least)
making it bigger wouldn't take more bytes for me though, I believe, so it's not really the point ^^
Title: Re: Code Golf Contest #5
Post by: JWinslow23 on August 12, 2014, 05:21:51 pm
I actually DID do 1pxl for TI-84+CSE BASIC. Hey, I DID say "largest possible size" (165*165 pxl)! :P
Title: Re: Code Golf Contest #5
Post by: 3298 on August 16, 2014, 11:08:44 am
I'm on vacation, but who cares, my calculator is with me. This time I wrote my first real-time game in SysRPL ... well, by posting here I pretty much told you what game it is. ;) It measures 276 bytes and has some aspects where I'm not really sure if they are allowed:
1. A snake segment is 2*1 black pixels, the food texture is black pixel on the left, white pixel on the right. The board size is 64*64 snake segments with black lines as borders below and to the right. (Results: graphics are stretched horizontally, and strictly speaking the border texture conflicts with the food and snake textures, but the white pixels beyond the border make it easy to tell where the border really is.)
2. The screen size would support a 65*65 board, but using 65 instead of 64 makes the wrap-around logic more complicated. (BINTS have a bitwise AND operator, but the MOD operator is not present.)
3. In fact, with a few bits of Saturn and ARM assembly I could use 4-bit grayscale graphics, so I could shrink the snake segments to 1*1, resize the board to 80*80 with a line to the right, and make the border, snake and food use different colors. The downside: that means a larger code size.
4. Speed with the VERYSLOW (=300ms) delay command is a tiny bit too slow, and SLOW (=15ms) instead makes it too way fast. Five or six SLOWs are fine, but each takes 2.5 bytes. :/
5. ON (usually does Cancel) makes the game bug out, but reversing the snake direction will kill you instantly, so it can replace ON to quit the game.
Title: Re: Code Golf Contest #5
Post by: Adriweb on August 16, 2014, 05:56:36 pm
(Update for mine : 548 chars - it was actualy a thing I forgot to remove... :P)
Title: Re: Code Golf Contest #5
Post by: JWinslow23 on August 18, 2014, 12:04:32 pm
I. AM. NEVER. DOING. THIS. CHALLENGE. AGAIN. O.O

Don't expect to see any more game challenges before Contest #9001. :P
Title: Re: Code Golf Contest #5
Post by: Adriweb on August 18, 2014, 12:26:50 pm
As requested :
- Board size : I set it to 23x23
- Controls : 'r' to go up, 'x' left, 'y' for down, and 'z' for right. (This is good for a CX device, not sure on another platform :P)
Title: Re: Code Golf Contest #5
Post by: DJ Omnimaga on August 18, 2014, 12:38:18 pm
Games could work out but they would require months of planning before launching the said contest. X.x
Title: Re: Code Golf Contest #5
Post by: Princetonlion.tibd on August 18, 2014, 12:53:26 pm
So we have to pre-plan all possible games for the contest :P
Title: Re: Code Golf Contest #5
Post by: 3298 on August 18, 2014, 03:06:46 pm
Wow, I got the shortest entry this time. :angel: Apparently this nut was too tough for Golfscript and CJam. Though I have to admit that the concerns I expressed above still apply to the version I submitted (it is in fact the same version I had when I wrote my previous post). I was working on a grayscale version, but that one is still not finished - and likely will never be because this round is over. Probably it would have ended up bigger because it needs to contain the grayscale system - there is not much existing system code I could recycle for that.
Title: Re: Code Golf Contest #5
Post by: DJ Omnimaga on August 18, 2014, 06:27:48 pm
So we have to pre-plan all possible games for the contest :P
Yeah but if JWinslow23 decides to do like 4 game-related Code Golf contests within a single month span, then that's a massive amount of stuff to plan and it would be easy to get lost in it and mix rules up.

Wow, I got the shortest entry this time. :angel: Apparently this nut was too tough for Golfscript and CJam. Though I have to admit that the concerns I expressed above still apply to the version I submitted (it is in fact the same version I had when I wrote my previous post). I was working on a grayscale version, but that one is still not finished - and likely will never be because this round is over. Probably it would have ended up bigger because it needs to contain the grayscale system - there is not much existing system code I could recycle for that.

Which calculator is your SysRPL entry compatible with by the way?
Title: Re: Code Golf Contest #5
Post by: JWinslow23 on August 18, 2014, 06:28:17 pm
So we have to pre-plan all possible games for the contest :P
Yeah but if JWinslow23 decides to do like 4 game-related Code Golf contests within a single month span, then that's a massive amount of stuff to plan and it would be easy to get lost in it and mix rules up.
I'll NEVER do a game again, don't worry. :P
Title: Re: Code Golf Contest #5
Post by: DJ Omnimaga on August 18, 2014, 06:30:05 pm
It's up to you I guess. That said, I guess it might be a good idea considering the contest would be in direct competition with Omnimaga's own contest (assuming they do a game contest this year) so getting enough entries might be a problem, especially with the much shorter deadline.
Title: Re: Code Golf Contest #5
Post by: 3298 on August 18, 2014, 08:07:41 pm
Quote from: DJ Omnimaga
Which calculator is your SysRPL entry compatible with by the way?
I write it on my 50G of course, and due to the negligible differences between 49G+ and 50G (the 50G is mostly a hardware quality upgrade, and returned an IO port the 49G+ was missing ... I believe it was the serial one) it should always run on the 49G+ as well.
I usually try to make my code compatible with the 49G (real Saturn processor instead of an emulation with extended instruction set on top of ARM9, and a display height of only 64 pixels instead of 80), but this one draws a line in the 65th row (i.e. just outside the display area) which could possibly corrupt the memory. I also had trouble turning off the softmenu (bottom 8 pixel rows or so), and in the spirit of Code Golf, I didn't bother with it because it was not in the way on my 80-line display.
While not in my focus, the 48GII (Saturn emulation on top of ARM9, but 64-line display, and some advanced math features are removed) might run my programs as well. I'm pretty sure I'm not using any of the missing features in this one, but again, the line in the 65th row might be a problem on the small screen. Generally all 49G-compatible programs not using the removed features should be fine. But don't ask me what features these are exactly, I only read that the 48GII is feature-wise betweenthe 49G and its ancestor, the 48GX.
Compatibility with the 48S, 48SX, 48G and 48GX is highly unlikely. I think none of my Code Golf submissions are compatible at least due to use of the ZINT data type and Flash Pointers, which were not present in those.
Was that enough of compatibility talk? :D

Those 49G(+)/50G calcs gotta be the only calcs with on-board ASM development tools. Okay, I heard about two weird old Casio models with C as their primary language, and a third-party language on some TI calcs compiled to native code (that was called Axe, right?).
 At least these tools are pretty handy for development on the go. And as usual, most of the documentation you need is available in calculator-compatible formats as well. There are some libraries shipping with only HTML docs, but meh, that on-calc web browser has an offline mode, too. 8) It's skipping the images, but the formatted text is all I need.

About future Code Golf challenges: I wouldn't mind some more complicated problems. Say problems related to graph theory or cryptograhy. A full game may be a bit overkill, but the other ones were pretty trivial.
Title: Re: Code Golf Contest #5
Post by: DJ Omnimaga on August 19, 2014, 12:13:43 pm
Aah ok I wasn't sure if it was the 48G or an other old calc. I might get a 50g eventually so I might give some games a try (49/50g-exclusive games are rare for some reasons) including yours to see how they are on that calc and how SysRPL compares with HP PPL speed.