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 - Runer112
Pages: 1 ... 65 66 [67] 68 69 ... 153
991
« on: October 13, 2011, 09:44:10 pm »
* Runer112 has arrived on the scene! Here's the best I could do while fitting the exact constraints. It's 321 bytes, so it's 19 bytes smaller than the previous best attempt (by calc84maniac) and 37 bytes smaller than the original. Compile for no shell with Axe 1.0.5. Data(0ʳ)→°XPos Data(0ʳ)→°YPos
While 1 DispGraphClrDraw Pt-On(getKey(3)-getKey(2)+XPos→XPos,getKey(1)-getKey(4)+YPos→YPos,[FFFFFFFFFFFFFFFF]) EndIf getKey(15)
Return
The next block of code starts to stray from the original constraints a bit. It still draws the same sprite and it wraps at the boundaries, but it completely abandons regular sprite drawing to a buffer and then updating the screen in favor of using Bitmap() for a large size savings by completely removing the need for two routines. It also wraps much faster because frames when the sprite is offscreen are substantially faster. It's so much faster that the wrapping almost looks instantaneous, but it's not, so it technically wraps correctly. It's 183 bytes, for a massive savings of 138 bytes over my previous solution and nearly half the size of the original code! Again, compile for no shell with Axe 1.0.5. Data(⁻1ʳ)→°XPos Data(⁻1ʳ)→°YPos
ClrHome
While 1 If getKey(3)-getKey(2)+XPos→XPos+9^ᴇ100<105 If getKey(1)-getKey(4)+YPos→YPos+9^ᴇ100<73 Bitmap(XPos,YPos,[0A0A00007F807F807F807F807F807F807F807F800000]) FnOff .Sneaky optimized way to disable the run indicator End End EndIf getKey(15)
Return
Finally, the most optimized solution I was able to produce. This bends the rules in the same way as the last block of code, but it also stops the sprite at the edges of the screen instead of letting it wrap. Somewhat surprisingly, restricting the sprite's movement actually made the code smaller (due to lack of otherwise necessary clipping). This may be considered breaking the original challenge, or it may be considered adding a useful feature for free. It's 177 bytes, 6 bytes smaller than the previous solution and slightly less than half the size of the original code! Compile for no shell with Axe 1.0.5. Data(1ʳ)→°XPos Data(1ʳ)→°YPos
ClrHome
While 1 Bitmap(min(getKey(3)-getKey(2)+XPos(Bump()),89)→XPos-2,min(getKey(1)-getKey(4)+YPos(Bump()),57)→YPos-2,[0A0A00007F807F807F807F807F807F807F807F800000]) FnOff .Sneaky optimized way to disable the run indicator EndIf getKey(15)
Lbl Bump ReturnIf Return +1
992
« on: October 12, 2011, 10:44:41 pm »
1.0.3 (but I need to upgrade to 1.0.5)
Upgrade and watch the error magically disappear! My bro found the bug in new Axe: My bro tried to add some pics into appvar, and gave him a memory error. He had a good amount of RAM left, but still gave him it. He said it won't let him add more than 2 pics in 7680 bytes appvar. And he also said it worked well in previous version of Axe.
This sounds more like a coding error than an Axe error. Perhaps if you posted the culprit code some other coders could try to assist in finding the source of the problem?
993
« on: October 09, 2011, 10:52:48 pm »
That looks awesome. However I'm guessing many other people are going to run into the problem I did: it requires library files that most people probably don't have (e.g. QtGui4.dll). If these files are absolutely necessary, why aren't the files or a link to download them included? Because I'm finding downloads that are upwards of 200MB, and that hardly sounds right.
994
« on: October 09, 2011, 01:06:08 pm »
Because Axe is sorely lacking in constant argument optimizations.
995
« on: October 09, 2011, 12:47:17 pm »
It's only more optimized to use Text(Y*256+X) if the two coordinates are constant.
996
« on: October 08, 2011, 06:05:36 pm »
I'm pretty sure the problem is that your conversion factor is inverted. Degrees = radians * 180 / pi.
997
« on: October 08, 2011, 01:31:52 am »
Why line drawing doesn't have clipping is something that has baffled me and I think many other Axe coders for quite some time. I know of multiple great games just off the top of my head that don't look quite right because lines don't clip if partially offscreen. I know coding the clipping is definitely doable, so that's not the issue. The only issue might be the added size and speed overhead of the clipping. But even if this is a big issue, this could be solved easily enough by keeping the current line command as-is while adding a separate line command that clips and then calls the standard line routine. Either way, I'm sure many Axe programmers would be very happy to see line clipping implemented.
998
« on: October 07, 2011, 11:28:33 am »
I wouldn't think it's misleading. If you documented the correct way of doing it as ()r, I think this should solve most problems. New users wouldn't even think about using the old syntax because they wouldn't know it exists. And old users would be familiar with the change and would know that, since Data() used to work only with constants, you can only use the old 2-byte indicator syntax with constants. I would say that using () to specify 2-byte values carries its own problems anyways, since most programmers should know that a plain extra set of parentheses should do nothing to the code.
999
« on: October 07, 2011, 11:23:43 am »
Reverse the order of the height and width bytes.
1000
« on: October 06, 2011, 06:38:15 pm »
How about just using the r modifier still? Old things like Data(C1,C2r,C3) should still be allowed if the entry is a constant, but you would also allow for parentheses like Data(C1,(C2)r,C3), which would work for expressions. This seems like the best idea to me, as it not only provides backwards compatibility, but also still makes it clear that the value is to be parsed as 2 bytes. EDIT: In case you see this Quigibo, pre-processor conditionals would be super awesome sauce.
1001
« on: October 05, 2011, 01:20:16 am »
It should be easy to modify values like that. The map and tiles are your standard fare and should be easy to edit. I think the only important map dimension is width, which can be changed in Lbl TIL (currently 16). The player's/camera's x position (2 bytes) is in X, y (2 bytes) is in Y, Z (1 byte) is in H, and angle of rotation (1 byte) is in Z.
1002
« on: October 05, 2011, 12:51:52 am »
My progress with the raycasting Axiom never made it terribly far in the past for multiple reasons. Primarily, both my assembly skills and the Axiom system were still only half-baked. So I don't really have any useful old code to release in that respect. But I'll gladly release what I have from the Axe raycaster. I thought I had been posting source files when I posted screenshots in the YAAR thread, but aparently not. So I'll attach a zip file containing whatever I had for YAAR here. I'm not sure if it's that different from the code I attached in the first post in the YAAR thread, but it's whatever I worked on last. I also can't guarantee that it will still work with the latest versions of Axe, but hopefully either it will or it is easy to fix it so it does.
I do eventually plan to return to a raycasting project. I just don't know when as of now.
1003
« on: October 04, 2011, 11:15:25 pm »
You can store your picture as a bunch of 8x8 sprites, then draw 13x9 of them to the buffer. Like a tilemapper, except without the tile lookup.
Edit: This reminds me, why doesn't Axe support 8xN sprites yet?
For that matter, why doesn't Axe support m*n sprites yet?
1004
« on: October 04, 2011, 11:12:32 pm »
I do believe that direct keypresses do not work correctly in fullspeed mode. switch to normal before checking for keypresses
I'm pretty sure that Quigibo purposely added extra delay so it would work at 15MHz. Does Axe handle getKey(#) differently in Full speed mode? It keeps bugging on me whenever I try it..
I can only think of two things that could be causing this. Either Axe is having problems and parsing your code incorrectly, or your calculator is running substantially faster than 15MHz and the built-in delay isn't enough. I'm guessing that it's the second case, especially if you're using wabbitemu. If so, make sure that you didn't enable the option called "Emulate 20MHz and 25MHz calculators" or "Emulate proposed hardware speeds" because having this checked would certainly cause your problem.
1005
« on: October 04, 2011, 12:29:19 am »
Logical not is =0.
Pages: 1 ... 65 66 [67] 68 69 ... 153
|