123
-=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- (c) WidthPadding Industries 1987 0|573|0 -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=-
Socoder -> Blitz -> I... hate... this....

Sat, 12 May 2007, 14:25
Blitz3Dman
I'm about to tear my hair out. I can't figure out why when this saves all values as 28 (that's the default value) but it loads and half of the values as daggone word wrap -1 !!!

The worst part is, I CAN'T FIND OUT WHICH OF THE DAGGONE FUNCTIONS IS THE PROBLEM IN THE FIRST PLACE!!!!!!!

...
...





If you need the rest of the code tell me... I don't think it's necessary though.

-=-=-
There are 10 kinds of people in this world -

( Insert 16 remarks about to what extent people know hex here )
Sat, 12 May 2007, 16:27
flying_cucco
In the save function, you use Chr$() to change an integer code to a string character. But in the load function there is no Asc() to reverse this.

map(saverx,savery,ritex,ritey)=Asc(Mid(longdat$,place,1))

Probably wrong, but give it a shot. |edit| No, looks like it works |edit|
Sat, 12 May 2007, 16:28
bram32
You could try replacing writestring with writeline ? I've had some trouble with that a while back.
Sat, 12 May 2007, 17:18
Blitz3Dman
@flying_cucco
actually, I just forgot to change that before I posted the code. It was a dumb expiriment.

@bram
Hmm... you may be on to something there, let me check...
|edit| hmmm, nope... still does it. |edit|

-=-=-
There are 10 kinds of people in this world -

( Insert 16 remarks about to what extent people know hex here )
Sat, 12 May 2007, 18:23
flying_cucco
Ok, well how about in the Load when you've got

d=ReadShort(fil)

I can't see you use d anywhere. Might you mean

dimen=ReadShort(fil)

if it wasn't already set it might mean your data is not loaded.
Sat, 12 May 2007, 18:44
Blitz3Dman
Hmmm, I had the d for dump because the varying sizes weren't implemented yet.

I changed it anyway but no success.

-=-=-
There are 10 kinds of people in this world -

( Insert 16 remarks about to what extent people know hex here )
Sat, 12 May 2007, 18:45
bram32
And also, in the Load routine, after "For saverx=0 To dimen", you need to reset 'place' to zero.



Sat, 12 May 2007, 18:48
Blitz3Dman
Man, you are the greatest; it seems to have fixed. Thank you so very much!

Except, of course, now that I've fixed the loading, the saving is doing something odd. Either that or the loading is almost fixed.




now when it saves (I think it's the saving) it changes the position of tiles in an area and sometimes moves some of the tiles to a different area.

-=-=-
There are 10 kinds of people in this world -

( Insert 16 remarks about to what extent people know hex here )
Sat, 12 May 2007, 19:17
bram32
Hmm, I think the problem could be that for instance Chr$(0) breaks the line. If that is the trouble, then it would be best keeping the tile's index number 32 or above. (32=space ascii number) Maybe try adding 32 to it when writing to the file: Chr$(map(blabla) + 32), and substract it again when reading the file: Asc(Mid$(etc)) - 32
Sun, 13 May 2007, 06:15
Blitz3Dman
Tried, but no success.

Also, when I told it debuglog everything it was doing, I copied ad pasted one of the little rectangles and opened up an untitled and typed Asc(‡˜) - appears as a box in blitz - and it gave me the correct value - 28.

-=-=-
There are 10 kinds of people in this world -

( Insert 16 remarks about to what extent people know hex here )
Sun, 13 May 2007, 06:38
Jayenkai
Crap...

Sorry, my bad.. I could've sworn I'd updated my snippet when I found the bug, but.. Guess not.

Bug fixed version of JNKrunch

Version one : As above, but with it's teensy bug fixed.
Version two : Tweaked to only output things that can be neatly pasted into a forum, so long as the original input can also be pasted into a forum (that is, only use letters and numbers in your original level data, and it should be safe to post the compressed data straight in here!) You will need to change your writeshorts to writelines though, so that the numerical data also becomes forum postable.

-=-=-
''Load, Next List!''
Sun, 13 May 2007, 06:54
Blitz3Dman
Oops, never suspected it might be your functions! Thanks for the fix. I don't expect it to be forum postable because it's for the actual game world.

Just out of curiosity, what was the bug?



Anyway, WOOHOO now I can get on to coding the game!

All I have now is implement area changing and tile properties, because I already have a program to test updateplayer with movement and animation.

That is, after I make a test area to test collisions...

-=-=-
There are 10 kinds of people in this world -

( Insert 16 remarks about to what extent people know hex here )
Sun, 13 May 2007, 06:57
Jayenkai
On the line "If i=char Then..." the count is reset to 1, when it needed to be 0.



Is it working ok for you now?

-=-=-
''Load, Next List!''
Sun, 13 May 2007, 07:05
Blitz3Dman
perfectly. thanks.