The shoutbox is currently out of service. Join us on Discord instead.

[TI-84+CE] ICE Compiler

Started by PT_, March 25, 2016, 08:14:17 am

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

DJ Omnimaga

Is it due to the GIF or does the game really run at 4 FPS on a real calc? O.O

PT_

Quote from: DJ Omnimaga on November 08, 2016, 11:11:12 pm
Is it due to the GIF or does the game really run at 4 FPS on a real calc? O.O

It's the framerate. The game itself is pretty smooth, and I've added a Pause too, or it would run too fast!

DJ Omnimaga

Ah ok, I was a bit worried since, after all, it's Pong lol. In any case, I can't wait to give this and GalagICE a try :)

PT_

I'm very happy to say that ICE v1.2 is ready :)

Download here: (sorry, file size is too big)
https://tiplanet.org/forum/archives_voir.php?id=587211

DJ Omnimaga

November 08, 2016, 11:51:57 pm #244 Last Edit: November 09, 2016, 06:26:16 am by DJ Omnimaga
Awesome! I'm gonna check it out soon. Does it contain a quick doc about each command syntax and stuff?

EDIT: @PT_ I can't get Pong to work properly, even with the latest Libload:



I can move the pad but it moves at about 10 pixels a second, the ball doesn't move and everything flickers like mad D: . Is it because I am using OS 5.1.5?

EDIT: Also there is a bug: When you compile a program then go to the 2nd+LINK menu, if you press 2nd+MODE to quit back to the home screen then the calc freezes with the run indicator active.

PT_

That PONG 'bug' is maybe because I didn't update my example ;)
I will upload a new version soon, but that's not a bug :P

However, I can't exactly replicated your second bug, and I'm not sure I understood it correctly. Can you elaborate that more? :)

DJ Omnimaga

November 09, 2016, 07:04:51 am #246 Last Edit: November 09, 2016, 07:56:39 am by DJ Omnimaga
Compile a program, then go to the calculator linking menu (where you can send/receive files). From there, if you quit with 2nd+Quit (mode), the calculator freezes.


EDIT: I tried on-calc (OS 5.2) and I had no issues @P_T

PT_

I will upload soon a revised version, with some minor bugs fixed, and more examples, to make it more clear what you can do with ICE ;)

This is the famous bounce program:

It should run smooth!

Source:
[i]BOUNCE
det(0
det(5,0
[maxY]0,8,8,"0000E0E0E0E0000000E0E0E0E0E0E200E0E000E2E2E2E2E2E0E2E2E2E2E2E7E7E2E2E2E7E7E7E7E7E2E7E7E7E7E7E7E700E7E7E7E7E7E7000000E7E7E7E70000"
For(G,0,19
remainder(rand,312->L1(G
remainder(rand,232->L1(G+20
1->L1(G+40
1->L1(G+60
End
det(2,0
Repeat getKey
For(G,0,19
L1(G->H
L1(G+20->I
det(42,H,I,8,8
If H=312 or not(H
0-L1(G+40->L1(G+40
End
If I=232 or not(I
0-L1(G+60->L1(G+60
End
H+L1(G+40->L1(G
I+L1(G+60->L1(G+20
det(59,0,L1(G),L1(G+20
End
Pause 5
End
det(1


Copy this into SC, download it, and try it yourself! :D

DJ Omnimaga

So I hit a roadblock: TokenIDE Convert to hex option is greyed out when I am in xLIBC mode and SOurceCoder lacks xLIBC sprite conversion. MateoC tells me that ConvPng lets me convert my sprites to C/ASM format, but the ICE format is way different, so for now I'll probably be stuck either using low quality sprites converted using Find/replace in Notepad++ after converting them to BASIC colors, or hope for some converter that supports ICE format. D:


MateoConLechuga

November 10, 2016, 02:44:58 am #249 Last Edit: November 10, 2016, 02:49:12 am by MateoConLechuga
I added an option to ConvPNG in order to output in the ICE format. Here's how to use it; just post any bug if you have problems :)

1) Download the 5.4 ConvPNG prerelease from here

2) Create a file called "convpng.ini" (Without the quotes, also mind the extension)

3) Copy and paste these lines into convpng.ini:

#GroupICE            : ice_gfx
#Palette             : xlibc
#PNGImages           :


Now, below the #PNGImages line you can simply add the names of the png files you wish to convert, as long as the png files are in the same directory as convpng. For example, if I have 3 pngs named xxxx, yyyy, and zzzz, this is what my convpng.ini file would look like:

#GroupICE            : ice_gfx
#Palette             : xlibc
#PNGImages           :
xxxx
yyyy
zzzz


To run convpng, simply double click on the convpng.exe file. Output will be written to ice_gfx.txt

Enjoy :)



DJ Omnimaga

Ooh thanks! That's nifty. That tutorial should be included with ICE I think. :)

I converted 1 sprite for now, to see what would happen and this is the data:

(1) | 258 bytes
"10102B2B2170707070210A0A2A0A534B2A2A2A2B212B4B4B4B212B732A4B534B2A2A2A2A212A2A2A2B21534B2A2A532B2A2A2B2B212A2A2B2A212B2B2B2A734B2A2B2121214B732A53212121212121212121212121212121212121212B4B532A2A214B532A53212121212A0A534B2B2A2B21744B2A2B212A2A2A2A2A532B2B2A2B212A2A0A53212A2A2A2A2A532B2A2A2B214B4B2A4B212A2A2A2B0A532B2B2A2B21532B2A2B212A2A2A2A2A212121212121732B2B2A212A4B4B53534B534B532121532B2A2B212A2A4B2B2B2A4B2B2B212A532B2A2A212A532A532B2B2B2A2B2121532A2A2B212A2121212121212121210A70707021212A21212121212170707070"


Is that right? Also does it contain the width/height?


Also PT_ I tried the ball demo and the speed is insane O.O. Great job on ICE so far.

MateoConLechuga

Sorry, I think I may have forgotten to tell you I fixed the link. Downloading convpng.exe again from the above link should give you the proper width/height again :)

Also, PT_, can you explain why you did not encode the width/height in the string?

DJ Omnimaga



PT_

November 11, 2016, 03:20:47 pm #254 Last Edit: November 12, 2016, 05:32:15 pm by PT_
I've updated ICE v1.2.1 to v1.2.2 :)

There are now more examples to learn from (5 in total [BOUNCE, FLOODIT, GUESS, PONG, SIERP], more are maybe coming soon ;)), and I've included a post of Mateo where he explains how to convert images to ICE sprite data.

Download ICE Compiler

Have fun! :P

Powered by EzPortal