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.
Messages - Blue72
16
« on: September 18, 2011, 11:36:35 am »
True, but I like to prioritize speed over size. Though 6X is a very simple calculation, having it performed only once could see a minor speedup. As for the box corners, that seems like it would provide less speedup and trim little size. EDIT: That made it sound like I didn't appreciate its usefulness. It would be useful for manipulating boxes, but the sprites in my program are all the same size.
17
« on: September 18, 2011, 11:26:45 am »
I like that, but I think it would be better to do it as:
6X->U 6Y->V Line(U,V,U,V+5 Line(U,V+5,U+5,V+5 Line(U+5,V+5,U+5,V Line(U+5,V,U,V Since some of the sprites are more complicated, and require different amounts to be added and subtracted.
I still hope to find a way to only have to write the commands once, though.
18
« on: September 18, 2011, 10:59:13 am »
I thought about that, but I am a little reluctant to have it jumping around a lot, as that just contributes to the whole "time spent running over unused code" thing. I do appreciate the suggestion, however, and I may end up doing something similar. It's quite frustrating that one of the few situations where expr( would be ideal is also one where it doesn't work.
19
« on: September 18, 2011, 10:51:40 am »
Well, there are multiple places in the program where each sprite is drawn, and rather than have subprograms or repeat those large blocks, I'd like to have something short and clean.
These drawing events are also mostly nested in conditionals, and I imagine there would be some speed benefit from the program not having to run over large blocks of code it isn't using at the moment.
In general, it would make the main loop of the game much cleaner and somewhat faster, as well as some size reduction by shrinking repetitive code.
20
« on: September 18, 2011, 10:02:15 am »
I'm writing a BASIC program that does lots of sprite drawing with lines, and I was hoping to optimize it by putting the Line( commands for each sprite into a string, and then simply using expr(String wherever the sprite was needed. Unfortunately, the expr( command seems to not work with commands that don't return answers. It would be very useful if there were another way (Or if someone had a better idea) to achieve the desired result. (I would prefer to stick with using the Line( commands) Thanks! EDIT: Here's a more visual explanation: This bulky thing repeated multiple times: Line(6X,6Y,6X,6Y+5 Line(6X,6Y+5,6X+5,6Y+5 Line(6X+5,6Y+5,6X+5,6Y Line(6X+5,6Y,6X,6Y VersusAt the beginning: "Line(6X,6Y,6X,6Y+5):Line(6X,6Y+5,6X+5,6Y+5):Line(6X+5,6Y+5,6X+5,6Y):Line(6X+5,6Y,6X,6Y"->Str1 And then later in the program: expr(Str1
|