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 ... 19 20 [21] 22 23 ... 153
301
« on: June 06, 2014, 12:21:26 pm »
One thing that bugged me slightly about the aiming system is that multiple angles produce the same aim guide line. This could be remedied by using a custom line drawing routine that, instead of taking integer inputs, takes fixed-point inputs. Such a routine written in Axe would possibly be in the ballpark of 3-5x slower than the standard line routine, but since the line being drawn isn't very long and you're not doing much other computation, the extra time consumed shouldn't be a problem.
Alternatively, you could probably just play with the length of the guide line and find the minimum length that gives a different endpoint for every allowed angle (of which I believe there are 64, so 16 per quadrant?).
302
« on: June 06, 2014, 08:51:39 am »
Edit: I just reseted the votes, removed lighting (doesn't work together with face-combining) and added minecarts (why not?)
I thought face combining was a fast rendering mode approach only? The standard rendering method still exists and would support lighting, no? I'll vote for caves, but my real vote is still for lighting.
303
« on: June 05, 2014, 04:23:28 pm »
What is BLOCK_SIDE, and why does it consume 8 bits?
304
« on: June 03, 2014, 06:29:51 pm »
One rather cheaty way to do it that would cost no rendering time (barring a one-time cost when changing the palette) would be to place a copy of all graphics in RAM, and when changing the palette, repopulate all the graphics data from the originals, but with palette adjustments made. Due to the potentially large RAM requirement, this may not be ideal/feasible.
A more traditional way would be to alter the perceived palette in the drawing code. If you use 3-level grayscale, you might do something like this:
Lbl Light 0→D Return
Lbl Dark 1→D Fill(L₃,768,-1) Return
Lbl PtOff Pt-Off(r₁,r₂,r₃) !If D Pt-Off(r₁,r₂,r₃+8)ʳ Return End Pt-On(r₁,r₂,r₃+8) Return
4-level grayscale is a bit trickier, but it could look something like this:
Lbl Light 0→D Return
Lbl Med 1→D Return
Lbl Dark 2→D Fill(L₆,768,-1) Return
Lbl PtOff !If D Pt-Off(r₁,r₂,r₃) Pt-Off(r₁,r₂,r₃+8)ʳ Return End !If -1 Pt-Off(r₁,r₂,r₃) Pt-On(r₁,r₂,r₃+8) Pt-Off(r₁,r₂,[FFFFFFFFFFFFFFFF])ʳ Pt-Change(r₁,r₂,r₃+8)ʳ Pt-On(r₁,r₂,r₃)ʳ Return End Pt-Off(r₁,r₂,r₃)ʳ Pt-On(r₁,r₂,r₃+8)ʳ Return
As you can see, the medium darkness logic is sort of tricky, and that may cause a noticeable slowdown in your program. I haven't looked into the other sprite drawing variants, but they'd probably have their own logical complications.
If it can be done without making them take substantially more time, the ultimate solution would be to go beyond Axe and to write a variant of the grayscale display routine for each palette. This would require no change in how graphics are drawn and little to no cost in rendering speed.
305
« on: June 03, 2014, 08:58:19 am »
You can insert the \ symbol in the middle of any multi-character token in TokenIDE to prevent its tokenization; for instance, if you wanted a label named End, you could do that by typing E\nd. If you take this approach, I highly recommend saving the file as a .txt file rather than a .8xp directly, as the text form retains the source as it appears in TokenIDE with the \ characters.
Alternatively, as others have suggested, you can simply edit the AxeTokens.xml file (or make a copy and edit that) to your liking.
306
« on: May 30, 2014, 09:04:26 am »
then you have to create it first. Just make a seperate prog like this to create it: getCalc("appvTest",2)
Why would you need a separate program to create it? You can simply create it if it doesn't already exist from your main program logic, like: "appvTest"→Str0 !If GetCalc(Str0) GetCalc(Str0,2) End →V
Then, you'd have a reference to the appvar in the variable V. Alternatively, a solution with a bit more robustness, which works if the appvar is archived and handles the case in which allocation failed: "appvTest"→Str0 UnArchive Str0 !If GetCalc(Str0) !If GetCalc(Str0,2) .Failed to create appvar, handle error somehow End End →V
Then you'd probably want to Archive Str0 before your program ends so it doesn't get lost in a random RAM clear.
307
« on: May 30, 2014, 08:58:07 am »
Is the purpose of this precisely to make an ASCII table? Or is it simply to convert the data into a more standard tabular format? Because you mentioned that converting it to CSV that can be imported into Excel would suffice, but I would like to point out that the input data can be imported into Excel just fine as-is, in which case my solution would be to do nothing.
308
« on: May 29, 2014, 10:42:15 pm »
What kind of restrictions are there on input format? Will the table always be nicely spaced already? Will every data cell contain a number? Will there always be at least one row of data?
And how about the output format? Can we pad lines to the end with spaces? Should there be precisely no extra table width on the left but one character of extra table width on the right, as in your example?
309
« on: May 28, 2014, 06:59:38 pm »
It looks like you haven't yet been made aware of the distinction between constants and variables in Axe. Tokens like GDB2 can only represent constants, which are evaluated at compile time and hold that value for the entire runtime duration of the program. To have a variable value, you need to use just that; a variable (like A-Z).
EDIT with more information: A common way to achieve the kind of multi-level logic you're aiming for might take advantage of the facts that (a) data in Axe is added in the order it is specified in the source, with no breaks in between, and that (b) each of your tilemaps is 6*7 bytes large. So you could specify the tilemap data like this:
.MAPSRC []→GDB0 .Level 1 [222222222222] [200000000002] [200020000002] [200000000022] [200000020002] [200020000032] [222222222222] .Level 2 [222222222222] [200000000002] [200000000002] [200000000002] [200000000002] [200000000032] [222222222222] .et cetera
And then you could access the Nth tilemap (0-indexed) with N*6*7+GDB0.
310
« on: May 28, 2014, 05:56:24 pm »
Axe does not recognize GDB2, or any variation of GDB1 as a token. Is that a bug report or an understood problem?
It most certainly does support them, in their correct context as part of the name of a constant. If you show how you're using it, I (or someone else) could potentially figure out what's going wrong.
311
« on: May 27, 2014, 07:56:15 pm »
I'm adding a shop now . Also I really need help with Appvars....
The best way to get whatever specific answer(s) you're looking for is to ask specific questions. And sorry for this slight thread hijacking that's been going on... which I will now continue! For example, if you want to create a game save, you just store the content you want in a list, such as L1->LSAVE. Of course you can't use appvars, but you can still create external files or read from them that way. As for reading from a save list, you do LSAVE(1) for element 1, LSAVE(2) for element 2, and so on (so you can do stuff like 18+LSAVE(2)->A).
With Celtic you can interface with appvars directly but the syntax doesn't look much better than in Axe. (IN axe, I think just making appvar save use a different token than appvar reading rather than have them use the same would already help).
You can basically treat external variables in Axe just like a zero-indexed, fixed-size list. For instance, if a variable's data pointer is in L, you could read the first 1-byte value with {L}, read the second 1-byte value with {1+L}, or write to the third 1-byte value with →{2+L}. You could also do the same operations, but treating the values as 2-byte values instead, about as easily: read the first 2-byte value with {L}ʳ, read the second 2-byte value with {1*2+L}ʳ, and write to the third 2-byte value with →{2*2+L}ʳ. Note that the *2 is because each element is 2 bytes. Also, there isn't really any special command to "save" external variables, barring archiving it with Archive "appvNAME". The two primary commands for interacting with appvars are to locate existing ones, GetCalc("appvNAME"), and to create them, GetCalc("appvNAME",SIZE). The former might be used like GetCalc("appvHiScores")→S to locate a high scores appvar. If it simply held 2-byte score values, the Nth high score could be read with {N*2+S}ʳ or written with →{N*2+S}ʳ. The latter might be used like GetCalc("appvHiScores",10*2)→S to create a high scores appvar with 10 2-byte score entries, which you would commonly do if the fetch attempt returned zero for S, meaning it wasn't found.
312
« on: May 27, 2014, 12:35:25 pm »
I still think the Getcalc syntax should have been changed to something else closer to TI-BASIC or xLIB ...
How do you interface with appvars with TI-BASIC/xLIB? I glanced at the BASIC third-party library page on the DCS wiki and couldn't see any function names that jumped out as interfacing with appvars.
313
« on: May 24, 2014, 10:13:57 am »
After comparison, I see what you mean. It's a bit choppier, although that gif is making it look choppier than it really is.
314
« on: May 24, 2014, 09:56:16 am »
I just tried it now. I have to say the graphics are awesome (/me runs ) but why are animations not that smooth ? They seem to move by 2 pixels each frame instead of one and they seem to be slower when more tiles move.
I'm assuming that was to remedy the previous issue with animations being much slower, to the point where they would probably interfere with gameplay. I'd rather have a slightly choppy animation that finishes quickly than one that's smooth but puts a significant limit on playing speed.
315
« on: May 19, 2014, 05:59:25 pm »
For walls at the side of the map, can't you really just get the worm *disappears* when it gets out? Dommage
Well, I tried, but my collision routines really make things too difficult. I gave up after 8 RAM clears.
If you could share the relevant bits of code, people (likely me) could try to help debug it and get it working.
Pages: 1 ... 19 20 [21] 22 23 ... 153
|