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.


Messages - BlackCode

Pages: 1 [2]
16
Axe / Re: Axe Q&A
« on: August 26, 2013, 06:13:32 pm »
Also, that doesn't solve any problem, but you may want to check the Fill command out instead of using a For loop to set a bunch of bytes at 0.
Now your code seems to work on Wabbit (once I put the quotes at the right place), I don't see any problem, it displays a 1 then zeroes.
Also be sure that the appv is the appv token, and not a "a" followed by a "p", ...

*Facedesk*. Realized in math today that I had been reading the code as I thought I wrote it, not as I actually did, silly typos fixed, and it works well now.  Thanks for attempting to help though :P

On an unrelated note, is there a better way to handle input from getkey than a bunch if if/elseif? 

17
Axe / Re: Axe Q&A
« on: August 26, 2013, 01:16:31 am »
Hmm... being able to see the real code could be helpful. I believe there are some copying errors in that code, like the size argument of GetCalc() being inside the quotation marks and the value outputs all overwriting each other. :P

If by outputs overwriting eachother you mean they all go to 0,0, than yea they do.  I just stuck a pause 500 in there so I could see each number.  As for the quotation marks, I just realized I didn't have them like that, not sure why I thought I did...

18
Axe / Appvars
« on: August 26, 2013, 12:53:03 am »
Alright, I need some help with appvars.  I don't actually have my calc right now, but this is about what my code looks like.
Code: [Select]
getcalc("appvMAP,10")->A
For(X,0,9)
0->{A+X}
End
1->{A}
For(X,0,9)
Output(0,0,{X+A}>Dec)
End

Obviously not complete or optimized, I'm just trying to get used to appvars.  My issue is that I've stored 0s and 1s to the appvar, yet it outputs values from between 0 and 255.  Any ideas why its doing this?  I assume I'm either writing to it incorrectly or reading incorrectly, but I can't figure it out.

19
Axe / Re: Map Data Storage
« on: August 25, 2013, 12:36:42 pm »
Alright, I get what you mean with copying.  As far as more information, I'll give you what I can.  I would expect most users to heavily modify tiles in a fairly concentrated area, and only do light changes in the rest of the map.  However, there is no way to predict where these heavy changes will take place, and it is entirely possible, although unlikely, they will heavily modify everything after a long time.  As for number of tiles, I would guesstimate under 64ish, with only about 16-20 being extremely common throughout the world.

Edit:  I've been thinking some more, and I feel like chunking the data into smallish appvars is the best route.  My map would consist of multiple appvars, of which, three would be loaded into ram at a single time: the chunk the player is at, and a chunk to either side.  If the player modified any of the tiles in a chunk, the new data would be saved to the appvar, and that appvar would be flagged as modified.  When the player changed chunks, the one chunk that will no longer be loaded is checked to see if it was modified, if it was, it is archived, if not, it is simply discarded.  If anybody has any feedback on this (completely theoretical) method, please share.

Note: I considered using a list of changes that took place, but quickly ran into too many obstacles.  For example: handling multiple changes to the same tile and preventing the list of changes from getting excessively large.

20
Axe / Re: Map Data Storage
« on: August 25, 2013, 11:45:16 am »
Alright, thanks for the help with handling available space.  But Shmibs I must be misunderstanding something...at somepoint the map data would need to be unarchived in order to alter it would it not?

21
Axe / Re: Map Data Storage
« on: August 25, 2013, 11:22:11 am »
Ok, that makes sense. Two questions in that case: 1. Is there any way to detect if the user has unarchived programs?  2. Is there a rule of thumb for how long unarchiving/archiving an appvar (based on its size) will take?

22
Axe / Re: Map Data Storage
« on: August 24, 2013, 11:45:05 pm »
How much exactly can fit into ram?  I've seen 4,000 bytes of free ram, but is this the only place in which map data can be stored?  I would assume more is available...

23
Axe / Re: Map Data Storage
« on: August 24, 2013, 11:34:59 pm »
Ahh yes, thanks for the reminder Runner.  I forgot it was the erases, not the writes.  Regardless, each archive writes to a new place, correct?  So chunking the map and archiving/unarchiving multiple times per session would fill up the memory faster than just archiving once at the end, which would result in more flash clears.  Of course, whether anybody should actually worry about this is questionable.

24
Axe / Re: Map Data Storage
« on: August 24, 2013, 11:02:05 pm »
But that would vastly increase the number of archive writes, would it not?  A fairly severe problem (after a while).

25
Axe / Re: Map Data Storage
« on: August 24, 2013, 10:47:39 pm »
Ah, thank you Xeda, that clears it up a bit.  If I were to do that though, I would still have to either archive the list of changes, or change the base map and archive that, which doesn't really seem efficient to me.  So, it seems, to me, that my best bet is using a single appvar to hold all the data, unarchiving it at the beginning, and archiving it at the end of the program.

And AngelFish, I am well aware of that, which is why I was suprised when shmibs suggested using multiple appvars as a better method.

26
Axe / Re: Map Data Storage
« on: August 24, 2013, 09:57:56 pm »
Shmibs, could you perhaps elaborate on the differences between those two methods?  I'm not seeing how they would vary.  Additionally, wouldn't chunking the map mean consistent slow downs throughout the game as certain chunks were unarchived and archived.  And it would compound the issue of wearing out flash (which I've seen as only happening after over 100,000 writes, something I don't forsee happening if it only writes to flash once, at the end of each program).

27
Axe / Re: Map Data Storage
« on: August 24, 2013, 06:36:33 pm »
Thanks for all the responses!  I've checked out those tutorials, and appvars do sound like what I need, however I still have a few concerns.  Because I would need to be able to write to the appvar at anytime, it would have to be unarchived throughout the program, so how much space would I actually have in an appvar and/or is there any way around this that would allow me to write to an archived appvar?

28
Axe / Map Data Storage
« on: August 24, 2013, 01:20:49 am »
Hello everyone, first post and all!  I just have some questions about the "best" way to store map data.  I've been playing around with Axe, and am starting to work on a map, but I'm not sure how to store data in a way that fits my needs.  I need to be able to change the map while the program is running.  Ideally, I also need a large space to store my data and/or a way of efficient compression (consider that maps will likely be highly detailed).  Any and all help is appreciated, even if it just consists of linking me to a resource I've missed.

Pages: 1 [2]