Login [Register]
Don't have an account? Register now to chat, post, use our tools, and much more.
I am making my first game programmed in ICE. I don't have any experience in programming except in TI-BASIC and after exploring Cemetech for a while and then finding the ICE Compiler in the Archives I decided to learn ICE and program my first game, SpherixCE.

Following the amazingly explained "Documentation ICE v2.2.1" while also looking at the "ICE Compiler Commands List", I have been off to a good start. I found a good tileset off the internet and selected 16 different tiles which I made into a new tileset (the original tileset had over 900 tiles!). After running into a few problems (including changing the name of windows - convtile and windows - conpng to convtile and convpng respectively and not knowing what command prompt was), I got stuck on the following instructions:



Open Command Prompt Did
Navigate to the folder Did

Run convtile --ice
I ran convtile through Command Prompt which didn't seem to work:



I renamed convtile to convtile --ice and ran through command prompt and that didn't work either. I tried putting my .csv file onto convtile to see if it would work that way and it didn't. I searched "convtile" through Cemetech's search engine and I realize there's already a forum for convtile, but since I was told in the SAX to post about my program, I've decided just to make my own forum


The Tileset!:
I believe convtile is for converting a tilemap exported from Tiled, which is available at https://www.mapeditor.org/

If you want to convert a tileset (the graphics) then you will need to check out convpng - which I believe is mentioned in the guide you are following? http://learn.cemetech.net/index.php/ICE:Using_ICE#Tilemaps
convtile doesn't exist anymore. There's only convcsv, which you can find here: https://github.com/mateoconlechuga/convcsv/releases/latest

You have a tileset, which is the sprites for a tilemap. To convert a tileset, follow the guide using convpng.
To convert a tilemap using convcsv (rather than convtile), use the following syntax, where tilemap.csv contains the tilemap created with Tiled or similar.


Code:
convcsv -i tilemap.csv tilemap.txt


tilemap.txt will now contain the array you can use in your ICE program.
MateoConLechuga wrote:

To convert a tileset, follow the guide using convpng.


I went ahead and already did that step

MateoConLechuga wrote:

To convert a tilemap using convcsv (rather than convtile), use the following syntax, where tilemap.csv contains the tilemap created with Tiled or similar.


Code:
convcsv -i tilemap.csv tilemap.txt


tilemap.txt will now contain the array you can use in your ICE program.






I'm still not sure why this isn't working. What is "code 1"?
code 1 means that it cannot figure out what file you are trying to convert. You can't just run the application like that. You need to use the cd command to navigate to the directory that contains both convcsv and the file you are trying to convert, and then you can run the executable with just convcsv.exe -i Level1.csv tilemap.txt

When we say what to put into a command terminal, it should be **exactly** what we say. Not extra paths, not missing things, etc.
Thank for bearing with my stupidity MateoC. I got the tilemap displayed correctly on my calculator and I will start on game mechanics. I am planning on making a pseudomatrix of the tilemap (technically a list since ICE does not directly have a matrix feature) and sort of like the .csv file containing my tiles, create a list containing the dimensions of the tilemap along with number corresponding to different tiles. Of course, the chest can contain more than one thing, so that alone will take a couple different values up. When you move Spherix (the blue sphere) the program will find Spherix's code number in the list and move it accordingly in the list, replacing the tile it was last on with a blank tile (checking for walls, items, etc. of course). The map should only have to redraw the tile spherix was on and the tile spherix is currently on.

And now that I have a little progress, I should explain what the game is about. SpherixCE is supposed to be a puzzle game where your goal is to get to the rainbow "door" to advance to the next level. I plan to add more tiles later, but for now this is what each tile does:

This is spherix. You navigate him through each level

This is, well, the floor... you can walk on it

This is a wall, and unlike the floor, you can't walk on it

Water, can be "neutralized" by Red Crystal

Lava, can be "neutralized" by Blue Crystal

White Crystal, "neutralizes" black hole

Red Crystal, "neutralizes" water

Blue Crystal "neutralizes" lava

Green Crystal, needed to go through rainbow door

Used to open chest

Can contain a crystal or another key


These are bridges. You can safely walk over water now (ironically, Spherix is 93% water, in frozen form of course)

A Boulder. Sometimes these are in the way and need to be pushed around to get to where you need to go (they're sort of like younger siblings)

The "Rainbow" Door. The exit to each level. The green crystal needed before entering

It's a black hole. Stepping in one without a white crystal is most likely fatal.


Here's Level 1:
irc wrote:
18:05 <MateoC> Kaluwolf++
18:05 <saxjax> [Kaluwolf] yeah
18:06 <MateoC> very nice work Smile
18:07 <MateoC> looks like it's coming together
MateoC told me you can store a sprite into an appvar instead of having an obnoxious program with a definesprite() command followed by a couple thousand characters. For the Write() command, the syntax is sum(4,"DATA",SIZE,COUNT,SLOT). I assume "DATA" would just be the pointer to the sprite, but how big would SIZE be? My sprite is 32x32 pixels (the data for the sprite is 2,048 characters long - 32*32*2). How large would my SIZE be? Or am I doing this totally wrong?
You can use convpng to store the sprite to an appvar:

https://github.com/mateoconlechuga/convpng/blob/master/examples/c_appvar/convpng.ini

Example is for C but just change C to ICE and it will work.

Then you can just use GetDataPtr to get a pointer to the sprite in the appvar memory.
MateoConLechuga wrote:
You can use convpng to store the sprite to an appvar:

https://github.com/mateoconlechuga/convpng/blob/master/examples/c_appvar/convpng.ini

Example is for C but just change C to ICE and it will work.

Then you can just use GetDataPtr to get a pointer to the sprite in the appvar memory.



Code:
#AppvarC           : var_gfx
#IncludePalettes   : all_gfx
#PNGImages         :
 sprite_2
 sprite_1

#GroupC            : all_gfx
#PaletteMaxSize    : 14
#PNGImages         :
 sprite_1
 sprite_2


Why are there two sprites? I assume it will work with only one?
It's an example with 2 sprites Razz Use 1 sprite if you don't have two sprites that you want to put in an appvar.
Alright, update time. I got each level (tilemap) to render one after another (after taking a peek at PT_'s The World's Hardest Game) I got everything stored safely away into appvars. The problem is, I want more tiles in the game (pressure plates for the boulders, bridges are pretty stupid, levers). This wouldn't be a problem except.... I'm a terrible artist, like 5 year olds can draw better than me. I was wondering if anyone wanted to help me make more sprites (that don't look horrible and flow with the rest of the tilemap). Thanks in advance!
Can't you just like "borrow" some from somewhere on the internet?
MateoConLechuga wrote:
Can't you just like "borrow" some from somewhere on the internet?


I guess so. (*sighs*) That's what I did with the original tileset, except it took me well over an hour to find.
Kaluwolf wrote:
Alright, update time. I got each level (tilemap) to render one after another (after taking a peek at PT_'s The World's Hardest Game) I got everything stored safely away into appvars. The problem is, I want more tiles in the game (pressure plates for the boulders, bridges are pretty stupid, levers). This wouldn't be a problem except.... I'm a terrible artist, like 5 year olds can draw better than me. I was wondering if anyone wanted to help me make more sprites (that don't look horrible and flow with the rest of the tilemap). Thanks in advance!

I wouldn't mind drawing a few sprites for you.
I've got some examples of sprites I drew here, here, and here.
As I mentioned above, I am planning of making a matrix of the tiles in the tilemap to navigate each level. The problem is, the tilemap is in a string and my matrix (which is technically a list - the Data() syntax) is numerical. Is there some way I can bridge that:


Code:

[i]TILEMAP
CloseAll
Open("SpherixL","w+"->A
Write("030303030303030303030303030001030101030602010103030101040101030202010103030303030101010101010103030101010101070101010103030101010101010101010103030108010101010101010103030101010101010101010103030303030303030303030C03",108,1,A
CloseAll
Open("SpherixM","w+"->A
Data(1,3,3,3,3,3,3,3,3,3,3,3,3,3,1,3,1,1,3,6,2,1,1,3,3,1,1,4,1,1,3,2,2,1,1,3,3,3,3,3,1,1,1,1,1,1,1,3,3,1,1,1,1,1,7,1,1,1,1,3,3,1,1,1,1,1,1,1,1,1,1,3,3,1,8,1,1,1,1,1,1,1,1,3,3,1,1,1,1,1,1,1,1,1,1,3,3,3,3,3,3,3,3,3,3,3,12,3->LEVELS
Write(LEVELS,108,1,A


I want to be able to convert LEVELS back to hex and rewrite the Write() command with it, so I can just render the tilemap again and it will have already updated. An alternative is just to make sprites of each tile and then make a matrix but that seems less efficent.
  
Register to Join the Conversation
Have your own thoughts to add to this or any other topic? Want to ask a question, offer a suggestion, share your own programs and projects, upload a file to the file archives, get help with calculator and computer programming, or simply chat with like-minded coders and tech and calculator enthusiasts via the site-wide AJAX SAX widget? Registration for a free Cemetech account only takes a minute.

» Go to Registration page
Page 1 of 1
» All times are GMT - 5 Hours
 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

 

Advertisement