Join us on Discord!
You can help CodeWalrus stay online by donating here.
Menu

Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Show posts Menu

Messages - c4ooo

#886
Games / Re: [TI-83+/84+] Lazer 2 [axe]
October 18, 2015, 11:00:18 PM
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 lasers 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 :P
+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 ;)
#887
I have been playing guitar on and off for about four years. I am not exceptionally good because, as i said, i have have times where i play for like every day for a month, and times when i never pick up my guitar for months at a stretch :P
#888
I dont have solid plans, no  :-\
#889
Gaming / Re: (split) CodeWalrus Minecraft Server
October 13, 2015, 10:52:58 AM
* c4ooo chucks a ram stick at DJ
* c4ooo runs

The best servers are those where you play with a few close friends in vanilla and stuff  8)
#890
Quote from: DJ Omnimaga on October 03, 2015, 04:49:17 AM
Some of those are good ways to learn programming. Starting with large projects is often not a good idea. As for Tron with mines, I think I made such game before but it used Lbl/Goto for loops.
Thanks DJ!  ;D

I added two more, now in axe. : P :D

Edit: that smily ninja'd me! :P
#891
@DJ Omnimaga VLine(x) draws a vertical line from y=0 to y=63 at x. Vline(x,Y1,Y2) draws a vertical from y1 to y2 at x. Repacing 'V' with 'H' will make it draw a horizontal line, and the 'W' or 'I' prefix tells it to draw a white or inverted line.

@ben_g since you wanted to look at obfuscated axe code, this is the most obfuscated thing i have ever written: (note, to prevent confusion hexadecimals are writen with leading "0x")
[spoiler]

Lbl loadlevel
{strSelected}->A
0->M->X->E
While 1
{X+++Y1}->B
!if M
  if B=0xFF
   !if A--
    {str1Levelptr}^r-1->A
    Select({X++++Y1},/16->W*8+52->N) and 0xF->H*8+36->O
   End
  End
ElseIf M=1
  B->{A++}
  !if {A}
   2->M
  End
ElseIf M=2
  if B=0xFF
   A+1-({A}=0xF)->{StrLazers}^r
   Return
  End
Select(B, and 0xF0/16 Parse()) and 0xF
Parse()
End
End
Lbl Parse
->D->{A++}
If E
For(D)
  0->{A}
  A++
End
A-2->A
0->E
Else
!If D
  1->E
End
End
Return

[/spoiler]
It basicly loads and uncompresses the levels in lazer. Its made comfusing becouse it first has to find a pointer to the reqested level, extract width and height data(and pre calculate some stuff), copy the name with excactly, then finaly uncompress the level, which uses 4-bits per tile, plus if there is a zero in the compressed level data, that means that the  next four bits dictate how many air tiles to insert. So yea :P
#892
Quote from: DJ Omnimaga on October 11, 2015, 07:03:36 PM
Well my reasoning is that for many calculator programmers, TI-83+ BASIC is their first ever venture into programming. My guess is that when they stick with TI-BASIC for so long, they gain bad habits of thinking that every other language will work or look the same way, because the syntax is way smaller, probably due to the screen only showing 16x8 characters.

And while Axe works differently than BASIC, some of the syntax allows you to do the same thing on the surface. For example, if you want to erase the screen content then display a pixel at (27,43) coordinate, then all you need to change in Axe is swapping both coordinates then adding a DispGraph command at the end. It,s more the internal stuff overall that is different, like how in BASIC you store stuff into variables, while in Axe they are pointers.
Well, as long as you remember that cars are a number from -2^15-1 to 2^15, and that 2^16-1=-1, and that there is no floating point operations, then you could just program as you would in basic. Albeit you will never get far :P

Originally I considered axe as a faster version of basic, but then I changed my mentality to thinking of it as a slower and less optimized version of assembly, and got better results ;)

Quote from: DJ Omnimaga on October 11, 2015, 06:22:57 PM
An Axe language for the 84+CE would definitively need a new name, since some stuff would be different (due to screen differences and perhaps different RAM areas forcing code syntax to change a bit).
I don't think so. The CE is still pretty similar to 84 :P

Edit:
Quote from: Streetwalrus on October 11, 2015, 06:47:55 PM
Axe can be more confusing than C for beginners because C has much stricter syntax, Axe is extremely loose on what it allows as shown by the many hacks that were made. You can write an instruction that is impossible to understand yet it will still do something useful.

WHLine(Y/8*8-Y+31->E,X/8*8-X+47->D,+9)
WHLine(E+9,D,+9)
WVLine(D,E,+9)
WVLine(D+9,E,+9)

:trollface:
#893
"Mod give me diamonds please" :P
(reference to Minecraft n00bs)
#894
Quote from: SiphonicSugar on October 11, 2015, 05:41:46 PM
Wait, would this mean that you would be able to play TI-84 Plus games on the TI-84 Plus C SE?
No, it would mean that someone will be able to, in theory, compile to the SE, SCE, and CE calculators from relatively the same source code.
#895
Then i guess you wont mind if i just send a video of me playing music on a calc real time? The most shore way for me to make some good music is to record myself playin a program i wrote that makes a sound based on which key you press.
#896
Can the deadline be extended to give ppl like me (who never made music with a sequencer before) a better chance? I am still working on my own sequencer, one specifically customized for my needs and wants.
#897
Basicly. for excample if you want to go right, you dont do increment x and redraw the whole screen. Instead you shift a specifed buffer to the left and draw the rightmost column.

In the beginning, you will have to render the whole map onto a draw buffer, and every from you will have to copy that buffer onto the main draw buffer, and then render the ui onto the main buffer.
#898
If you want help with interupt greyscale, i guess i could send / explain how to use runer112's Greylib. My version is a bit modified, though and just contains what i need. (Basically do to axe's long compile time it was impossible for me to sit and watch the giant lib got compiled :P ) Also, i presume you are using partial redraw, right?
#899
Well.. as long as you allow the program to be destroyed after run then it wont be so hard, but its almost imposible to do (My brain auto-corrects to "do to" :P ) byte-by-byte SMC in axe. You could however swap out something like Goto XXXX with goto YYYY quiet easely if you know a thing or two about how axe works under the hood. Yet once again- not all people know that much. Further more, SMC will basicly prevent basic users from competing.
#900
You generally dont want to use SMC, if you use it to store high scores or something, then you will have to do program write back, which isnt even suported in no stub programs, IIRC. Plus writing the program back will take extra time, as well as saturate your archive faster. Lastly you cant even do SMC in apps. SMC is good however for small optimization in programs - where the code modification is destroyed after the program exits (no write back)
Powered by EzPortal