So you basically just change the drawing code and your done with the port? Thats pretty cool To bad my second major game is written in Axe, so porting will not likely happen for it
Does anyone know if writing to archive is bad for the memory? I have heard that repeatedly writing to archive will eventually damage it.
On a different subject, how do programs like Doors find the names of all the programs (and how can I do that in Axe)?
The flash memory wears down after about 100000 writes to it. Reading does not damage it though.
Doors and other programs (like the axe *compiler itself ) get a list of programs by reading from the vat, which is basicly a large list of files, their types, as well as their location in ram/flash. You can either read from it directly, or use the memkit axiom, provided in the download file. Memkit is easy to use with commands like Load() and Next().
Ahh thats cool (Especialy the ascii train!) Is there any particular reason why the train runs so slowly? I mean like, wil it be faster if you used sprites instead of text?
That text crashing was due to how arabic text width may get smaller with more chars, so not a possibility here
That is what I meant- when the string was truncated to fit on the screen, it got bigger and went even farther of the screen Unless I misunderstood something
You noticed correctly. Text printing is handled by the OS, which may freak out when attempting to print text offscreen. It's up to the programmer to make sure that the text they print is not offscreen.
I hate that. It would be much easier if the OS handled the screen text itself, and IMO, much more optimized to. (Compare the OS having some code like If((x=(x+char.length))>=screen.width) return; vs the programer having to come up with some hacky code Furthermore, (at least according to tom scott), no proper text culling caused a security flaw where one could crash someone else's iOS device by sending arabic chars.
Well i did figure it out: the client requests a page with the url "https://translate.google.com/translate_a/<Params here>", which contains the data in a format like this: http://pastebin.com/PuZpV2my But the whole idea is against the google TOS, and like a majority of the requests are blocked
Bump I have released the third version, v2.2. Here is a changelog: +MAD optimization +Over 20 new levels, but maybe more +Pressing [ + ] will make the lazer go 2 pixels at a time, and [Enter] will pause it. +The game now requires only 1500 bytes at run time, which is a less arbitrary number then 2000B was +Minor visual improvements +Level name can be seen in the level selection menu. The game itself looks relatively the same as before... so no need for a screenie.
ticalc.org is still aproving, so you guys might have to wait a few days before you can try it out
I wanted to add languge translating to my bot. Since google made all their APIs paid, using them is no longer an option. Therefore i tried to do what i did for the spellcheck bot: request the html for a google page with all the parameters in the url. There is a problem however, the google translate page relies on javascript to read the params in the url and [presumably] make the required http[?] calls to google servers. Therefore i cant just parse the returned hrml output for an answer. Could any one help with reverse engineering the page to figure out what the calls would be? To be truthfull, i dont even know how to use http calls; sorunome started explaining them to me a long time ago but i never had time to finish his lecture
Over the years I have made a selection of cool but useless programs. Rather then letting them rot, I decided to share the code. Some of them have evolved over time, some where lost iin ram clears before i even got a cable ect ect..
Tron (ti-basic) This was my "hello world" program for ti-basic. I have made some improvments to it over time. Note: this is a striped down version and does not contain score keeping.
ClrDraw Horizontal yMin Horizontal yMax Vertical xMin Vertical xMax 5->X 5->Y 26->Z Repeat pxl-Test(Y,X pxl-on(Y,X getKey If ans ans->Z X+(Z=26)-(Z=24)->X Y+(Z=34)-(Z=25)->Y End If you want "Minefield tron, add this line after "pxl-on(Y,X
" "->Str2 "This is 16 spaces Str2+Str2->Str1 Str1+Str1+Str1+Str1->Str1 While 1 randInt(1,15) sub(sub(Str2,1,Ans)+"*"+Sub(Str2,1,16-Ans)+Str1,1,128)->Str1 Output(1,1,Str1 Output(8,1,"Happy New Year!!" End If you want the snowflakes to fall straight down, replace
randInt(1,16) sub(sub(sub(Str2,1,Ans)+"*"+sub(Str2,17-Ans),2,16)+Str1,1,128)->Str1 ,as well as add two spaces to the string in the first line. In total it should have 18 spaces. Go make an obstacle avoidence game with that!
Static screen program (axe) This makes static... (Good axe coding style)
Repeate getKey(41) L6 While ->X rand->{X}^r X+2 End DispGraph End
Cursed circle drawing program (axe) This program draws cool circles using sin() and cos(). Use the arrow keys to operate. Also in axe 1.3.0 it compiles to exact 666 bytes, so yea... NB: THIS IS A POOR EXAMPLE OF OPTIMIZED AXE!!! I MADE THIS A LONG TIME AGO!!!
.A Fix 5 4->D 1->E TEXT() .NOT THE Text() COMMAND!!! 5->F Reapear getKey(41) If getKey(2) D-- TEXT() ElseIf getKey(3) D++ TEXT() ElseIf getKey(1) E-- TEXT() ElseIf getKey(4) E++ TEXT() End 0->X 30->Y Rot(A++//D) N->Y o->Y ROT(B++//E) Pxl-On(X+N+28,Y+O+32 DS<(F,100 DispGraph End End Return lbl ROT cos(r1)-> sin(r1->S X*C-(Y*S)//256->N X*S+(Y*C)//256->O Return Lbl TEXT Text(0,0,D>Dec Text(0,10,E>Dec Pause 100 Return
As time goes on i will post more. Feal free to ask if you have any question or comments!
Ps: gona add some tags so that beginner programers will have an easier time finding this (Idk if this will affect google search results but its a try anyway) Tags: ti-basic ti basic ti-84 plus ti-83 84 83 arcade source code demo pong Tetris snake tutorial packman graphing calculator games programs send
Finally a non ti-nspire page! I remember playing project M back in the day, and never realized how old it was. You should also consider (if the game is fast enough) to add some form of greyscale, best via runer's greylib. Btw, @annoyingcalc, how is the partial redraw coming?
I sticked, this. Hopefully people will see that something is going on here I will try to participate, but one question, it can be less than 140 chars, right?
Hello, as you might know, I am fairly new to asm. I would appreciate if someone could explain how an 8*8 sprite routine works, or axe's sprite routine in particular.
Axe's sprite routine: I would presume that the stack stuff in the middle is just to load the function's params (ie pt-off(x,y,p)) into certain registers.
Spoiler For Spoiler:
p_DrawOff: push hl pop ix ;Input ix = Sprite ld hl,plotSScreen ;Input hl = Buffer x_DrawOffEntry: pop af pop de ;Input e = Sprite Y Position pop bc ;Input c = Sprite X Position push af ld b,7 ld a,63 sub e jr nc,__DrawOffNoClipTop ld a,e add a,b ret nc __DrawOffClipTop: ; xor b ; ld e,a ; add ix,de ; ld e,d ; xor b inc ix inc e jr nz,__DrawOffClipTop __DrawOffNoClipTop: cp b jr nc,__DrawOffNoClipBot ld b,a __DrawOffNoClipBot: inc b ld a,c add a,7 cp 96+7 ret nc ld d,0 sla e sla e add hl,de rra add hl,de rra add hl,de rra ld e,a add hl,de ld a,c and 7 jr z,__DrawOffAligned ld e,c ld c,a ld a,e cp -7 jr nc,__DrawOffLoop inc d cp 96-7 jr nc,__DrawOffLoop inc d __DrawOffLoop: push bc ld b,c ld c,(ix+0) xor a ld e,$FF __DrawOffShift: srl c rr e rra djnz __DrawOffShift dec d jr z,__DrawOffSkipRight ld b,a or (hl) and e ld (hl),a ld a,b __DrawOffSkipRight: dec hl inc d jr z,__DrawOffSkipLeft and (hl) or c ld (hl),a __DrawOffSkipLeft: ld bc,13 add hl,bc inc ix pop bc djnz __DrawOffLoop ret __DrawOffAligned: ld e,12 __DrawOffAlignedLoop: ld a,(ix) ld (hl),a inc ix add hl,de djnz __DrawOffAlignedLoop ret
Just tested out the new version, the movement is much better in my opinion but still a bit off. Moving up and left seem fine, but moving right and down wait until the screen has finished scrolling to update the cursor's position. I think you should first move the cursor then scroll the screen, like with moving up/left. Though really i think keeping the cursor in the center of the screen at all times would look the best. The portals and the little flip things are pretty cool and make for some nice puzzles. Nice work
thank you for the motivation About curser movment, the wierd down/right curser movment is due to rounding errors. Basicly axe's division rutine always rounds down. Now, originally i had just a circular curser that stayed in the center of the screen, and movment was on a 2*2 grid. (it still is on a 2*2 grid but now 1 keypress scrolls you 2 pixels 4 times). having a circle in the midle of the screen made the selected tile a bit hard to see, so i replaced it with the system you saw in the original upload. Right now i am planning to rewrite the engine file, becouse right now it is basicly a big mess hacked together in sections over several months. I will nead to know the new curser mechanics before i start, as they will be important.