I have started a small project, that helps on-calc with creating tile-map based games. It has a part that helps with sprite drawing, and with tile-map making. I have it setup in mind to make it support scrolling maps, linear mulit matrix maps, and nonlinear mulit matrix maps. Once you draw your sprites, you can place them on the map, so it sets up the matrix for you.
I think I'm going to use the PicArc identity(1 command to store pictures for the sprites (that way you can use more than 0-9).

Any suggestions, questions?

Edit: I'm storing each individual matrix in an appvar for the maps of the multi matrix maps.
It took me quite a while to finish the drawing portion of the program, but it finished (except for maybe a few bugs). I might need a few program testers to help me find a few bugs. The Map editing part is also almost done!

I think this will be pretty useful to anyone making a tile-map based game.
I'm interested in testing, but my calculator's miniusb port just got messed up AGAIN. (I sent back the original when this happened, and now have a 'refurbished' one which just broke the same way.)
Well, I have made a little more progress, when I have a complete working version, I'll load a version of it to google drive or somthing. It's comming along pretty well. Hopefully I'll have a few screenies soon.
I'm assuming this is for Ti-84 dev? Maybe add CSE support! That will get more people to use it, as the CSE is the calculator that TI is franchising nowadays.
zeldaking wrote:
I'm assuming this is for Ti-84 dev? Maybe add CSE support! That will get more people to use it, as the CSE is the calculator that TI is franchising nowadays.

I still haven't tried to learn hybrid for the CSE yet, though that's a good idea. I kinda thought about it a little, but I think I'm going to try to finish the one for the monochrome first. That shouldn't be too long though.
16aroth6 wrote:
zeldaking wrote:
I'm assuming this is for Ti-84 dev? Maybe add CSE support! That will get more people to use it, as the CSE is the calculator that TI is franchising nowadays.

I still haven't tried to learn hybrid for the CSE yet, though that's a good idea. I kinda thought about it a little, but I think I'm going to try to finish the one for the monochrome first. That shouldn't be too long though.
Great to hear! I agree that finishing the monochrome version first is an approach that makes sense, because in my opinion xLIB tilemaps on the monochrome calculator are a little more straightforward than color xLIBC tilemaps on the TI-84 Plus C Silver Edition.
KermMartian wrote:
Great to hear! I agree that finishing the monochrome version first is an approach that makes sense, because in my opinion xLIB tilemaps on the monochrome calculator are a little more straightforward than color xLIBC tilemaps on the TI-84 Plus C Silver Edition.


I agree there.

I had a problem with this code:


Code:
real(1,TG-T,TH-T,T/8,T,iPart(Z/(-9T+168))+P,(T/8)(-.75T+18)fPart(Z/(-.75T+18)),TiPart(Z/(-.75T+18)),0,0,1

Given:
T can equal 8 or 16
Z can be any number >= 0

I tried to debug that code for more than two hours last night, and finally ended up giving up on it. Please help Sad
P can be any number >1 and <256
G and T are just simple integer variables

The Problem:
When T=16 (and maybe when T=8 ), it rounds this code:

Code:
(T/8)(-.75T+18)fPart(Z/(-.75T+18))

It only rounds it down one int in the real(1 command, and it only rounds it when Z>6 and when the result of that code is 4 or 10...
I was able to kind of able to fix it by rounding the result of that code to 0 decimal places and putting that in, but I'm still not sure how that fixed it...
Well, I have an almost working version. There's just like 3 tiny bugs that I still know about, but have been too lazy to fix... Razz

This is what it does so far:
1. Appvar Generator: stores matrices in a specific order to an appvar to edit later. (only supports the Linear-Multi-Matrix map at this point)
2. Pic Editor: Works quite well at this point, though as I have been using it, I decided there were a couple things that I want to add. At this point the Pic editor can draw using points (standard for the calc), lines (black, white, inverse), circles (round or fast), rectangles (real(12) ones ect.), and text (Big and small [as well as Upper and Lower case] with inverse and normal text displayed). I want to add Vertical and Horizontal lines to the list of lines you can use. I also want to add a grid, to help you know where the edges of your sprites should be.
3. The Map Editor: Takes the map from the Appvar, and you can place sprites on the map to make it look how you want. The program stores it back to the matrices in the appvar.

I'm really excited to release it, it's coming along really well.
well, here's a sorta working version.
https://drive.google.com/file/d/0Bzaky924cXrkN3BTV3BuSFUwdTA/view?usp=sharing
16x16 tiles work on the map edit, 8x8 is still a little buggy. The Pic Editor should be fine. The matrix creator only supports option 2 at this point. The help topic doesn't cover all of it yet, but here are the main keys and functions:

Matrix Editor:
Use the arrows to decide how big your map is going to be
2nd or Enter to confirm size

Draw Pics:
Arrows to move cursor
Y= to change drawing type
Window to change style
Trace to go backwards one pic (dosen't go backwards past beginning pic)
Graph to go forwards one pic

Map Editor:
Arrows to move selection of matrix in map
2nd to select the matrix

Arrows to select tile to place in the map
Numbers around 5 to move a matrix over in that direction
5 to return to the matrix layout map
Trace to go backwards one tile
Graph to go forwards one tile

Please test, report bugs, and give ideas! I'm really enjoying using it at this point.
Great progress on this project! I gave it a try this morning, and I have the following feedback and suggestions:
1) It could use a Doors CS icon.
2) At the matrix type selection screen, you should really just accept keys [1]-[3] and [CLEAR]. I mashed [1], [2], and [3] for quite some time before realizing I needed to press [ENTER].
3) Choosing matrix types 1 and 3 sent me back to the menu, which I' sure you're aware of because of your notes above.
4) The matrix size chooser becomes increasingly slow as you expand the matrix size, which I assume is due to the drawing of lines. However, I looked at your code, and for a matrix of size M x N, you're drawing M*N rectangles instead of M+N lines to create a grid. I replaced it with the following code to speed things up:
Code:
real(0,1
For(C,0,A
95-95C/A
real(12,0,Ans,0,Ans,63,0
End
For(D,0,B
63-63D/B
real(12,0,0,Ans,95,Ans,0
End
Note that I removed the extra parentheses, and changed the loops to start at 0 instead of 1.
5) After selecting the sprite size, the text says "SAVING MATRICIES" instead of "SAVING MATRICES"
6) Your saving loops slows down over time, because Celtic III's LineWrite function has to search past more and more data. You should essentially run the loop in reverse order by repeatedly inserting a new line at line 1, which will be O(n) instead of roughly O(n^2).
7) When you enter an invalid map name in the MAP EDIT tool, you get an error at a line starting expr(. I didn't investigate it, but I suspect you're not checking that the specific AppVar actually exists, which you should.

Hope this helps! I look forward to doing more testing soon.
That looks good, Kerm. I will try to fix some of those things. I think I have the pic editor almost finished. I plan on implementing the other map types this week (hopefully). I'm also working on a couple of small projects with the Map helper, And I plan to release those in the near future.
I tried to have the map editor draw inverse lines for each sprite block on the screen. It looked really messy. I think I will change that to just draw inverse lines around the sprite block that you are editing. I am also implementing the horizontal and vertical lines. The other thing I'm planning on adding is a command override function. This will help with drawing on the bottom row of the screen.
I also added an info screen to the opening of the pic editor. This should help with some of the pevious confusion on how to use the pic editor itself.
I can't decide what to use as the DCS icon. Any suggestions?
Well I pulled this project out of the dusty piles of calculator code (not really, I use the picture editor quite a bit.) I worked on having the picture editor draw a simple tile boundary lines, but it's buggy and crashed my calculator... Swapped pt-change( commands to pxl-change, saving space. Added a way to toggle boundaries. I've added an extra menu to the picture editor for other functions.
  
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 UTC - 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