Author Topic: [ENDED] Code Golf Contest #5  (Read 21311 times)

0 Members and 2 Guests are viewing this topic.

Offline JWinslow23

  • Coder Of Tomorrow
  • LV7 Elite (Next: 700)
  • *******
  • Posts: 556
  • Rating: +43/-6
  • I make quality calculator games...when I have time
    • View Profile
Re: Code Golf Contest #5
« Reply #30 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
Did you know that "Ammonia Gas" rearranged is "As Omnimaga"?
Click here for the only set of games you'll ever need
= ?

Offline 3298

  • LV2 Member (Next: 40)
  • **
  • Posts: 26
  • Rating: +1/-0
    • View Profile
Re: Code Golf Contest #5
« Reply #31 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.
« Last Edit: August 16, 2014, 11:40:17 am by 3298 »

Offline Adriweb

  • Editor
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1708
  • Rating: +229/-17
    • View Profile
    • TI-Planet.org
Re: Code Golf Contest #5
« Reply #32 on: August 16, 2014, 05:56:36 pm »
(Update for mine : 548 chars - it was actualy a thing I forgot to remove... :P)
My calculator programs
TI-Planet.org co-admin.
TI-Nspire Lua programming : Tutorials  |  API Documentation

Offline JWinslow23

  • Coder Of Tomorrow
  • LV7 Elite (Next: 700)
  • *******
  • Posts: 556
  • Rating: +43/-6
  • I make quality calculator games...when I have time
    • View Profile
Re: Code Golf Contest #5
« Reply #33 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
Did you know that "Ammonia Gas" rearranged is "As Omnimaga"?
Click here for the only set of games you'll ever need
= ?

Offline Adriweb

  • Editor
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1708
  • Rating: +229/-17
    • View Profile
    • TI-Planet.org
Re: Code Golf Contest #5
« Reply #34 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)
My calculator programs
TI-Planet.org co-admin.
TI-Nspire Lua programming : Tutorials  |  API Documentation

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55943
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: Code Golf Contest #5
« Reply #35 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

Offline Princetonlion.tibd

  • Members
  • LV8 Addict (Next: 1000)
  • ********
  • Posts: 790
  • Rating: +3/-4
    • View Profile
Re: Code Golf Contest #5
« Reply #36 on: August 18, 2014, 12:53:26 pm »
So we have to pre-plan all possible games for the contest :P

Offline 3298

  • LV2 Member (Next: 40)
  • **
  • Posts: 26
  • Rating: +1/-0
    • View Profile
Re: Code Golf Contest #5
« Reply #37 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.

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55943
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: Code Golf Contest #5
« Reply #38 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?

Offline JWinslow23

  • Coder Of Tomorrow
  • LV7 Elite (Next: 700)
  • *******
  • Posts: 556
  • Rating: +43/-6
  • I make quality calculator games...when I have time
    • View Profile
Re: Code Golf Contest #5
« Reply #39 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
Did you know that "Ammonia Gas" rearranged is "As Omnimaga"?
Click here for the only set of games you'll ever need
= ?

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55943
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: Code Golf Contest #5
« Reply #40 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.

Offline 3298

  • LV2 Member (Next: 40)
  • **
  • Posts: 26
  • Rating: +1/-0
    • View Profile
Re: Code Golf Contest #5
« Reply #41 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.

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55943
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: Code Golf Contest #5
« Reply #42 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.