Ender's Game revived once more

A forum where you can announce your awesome project(s).

Moderator: MaxCoderz Staff

tokijnct
Regular Member
Posts: 105
Joined: Sat 18 Dec, 2004 3:01 pm

Post by tokijnct »

You could change a few of the if-then booleans if they only contain one command from:

:If etc....
:Then
:X-8=>X
:End

to...

:If etc...
:X-8=>X
Projects:
Phantasy Star Dark Millenia - Put aside for the moment...

UnitedTI BASIC Competition
merthsoft
Extreme Poster
Posts: 496
Joined: Tue 21 Dec, 2004 6:49 am
Location: WI

Post by merthsoft »

Nothing I can think of to solve the error, but some mem saving:
Make 0->A into DelVar A
Make If [A](B+Y/8+1,A+X/8+1)>35 into If 35<[A](B+Y/8+1,A+X/8+1
Shaun
Toaster
Extreme Poster
Posts: 322
Joined: Tue 15 Feb, 2005 12:08 am
Location: Lost in a land of mysteries.....

Post by Toaster »

Invalid Dim usualy means that you went out side of the matrix. :P check to see what your matrix size is and than do a text command to show where you are at in the matrix. :)
Join me at:
http://nanotech.pcriot.com
or
http://emancipal.co.nr

Coming soon..
Rewrite 3D Level Editor - 55% done!!
Emancipal - The Creator 5% done
User avatar
dysfunction
Calc Master
Posts: 1454
Joined: Wed 22 Dec, 2004 3:07 am
Location: Through the Aura

Post by dysfunction »

Obviously it goes off the Matrix, what I'm trying to figure out is why. Well, thanks for the optimizations. I'm working very hard on fixing this bug(s).
Image


"You're very clever, young man, but it's turtles all the way down!"
Toaster
Extreme Poster
Posts: 322
Joined: Tue 15 Feb, 2005 12:08 am
Location: Lost in a land of mysteries.....

Post by Toaster »

With out seeing the map data or were you are on the screen in your screenshot I think it would be pretty hard for anyone to find the bug. :P
If you want to find the bug right down how large your matrix is on a piece of paper. Then you use a text command like this to display where your at in the matrix.

Code: Select all

Text(0,0,"X:",Where your at on the matrix X axis.
Text(7,0,"Y:",Where your at on the matrix Y axis.

I would think a basic coder like yourself would have tried this. :P I have used this simple debuging rountine to find many errors in my programs. :)
Join me at:
http://nanotech.pcriot.com
or
http://emancipal.co.nr

Coming soon..
Rewrite 3D Level Editor - 55% done!!
Emancipal - The Creator 5% done
merthsoft
Extreme Poster
Posts: 496
Joined: Tue 21 Dec, 2004 6:49 am
Location: WI

Post by merthsoft »

Instead of that, use

Code: Select all

Text(0,0,X,"/",Y
X where you are on the X, and Y being where you are on the Y (whichever vairable you use), then itlle return it as Xcoord/Ycoord, I think It's easier to understand that way.
Shaun
User avatar
dysfunction
Calc Master
Posts: 1454
Joined: Wed 22 Dec, 2004 3:07 am
Location: Through the Aura

Post by dysfunction »

Nevermind, I guess it's too hard to explain my bug. I know why it goes off the matrix, just not the other part. Normally it can't go off the matrix, there's code to catch that, but it does when values get screwed up. What's happening is as the cursor is brought over a lrge ship, the cursor becomes large and is moved to the top left corner of the ship. The problem is that in certain situations the coordinates aren't changed correctly and the cxursor ends up somewhere it's not supposed to- sometimes off the map, resulting in error.
Image


"You're very clever, young man, but it's turtles all the way down!"
DarkerLine
Calc Wizard
Posts: 526
Joined: Tue 08 Mar, 2005 1:37 am
Location: who wants to know?
Contact:

Post by DarkerLine »

tokijnct wrote:You could change a few of the if-then booleans if they only contain one command from:

:If etc....
:Then
:X-8=>X
:End

to...

:If etc...
:X-8=>X
Or X-8(condition -> X
example:

Code: Select all

If K=24:X-8->X
can be changed to

Code: Select all

X-8(K=24 -> X
Instead of that, use Text(0,0,X,"/",Y
or

Code: Select all

Text(0,0,"(",X,",",Y,")
Last edited by DarkerLine on Mon 02 May, 2005 11:30 pm, edited 1 time in total.
just try to be nice to people.
_________________
My TI Blog - http://mpl.unitedti.org/
User avatar
dysfunction
Calc Master
Posts: 1454
Joined: Wed 22 Dec, 2004 3:07 am
Location: Through the Aura

Post by dysfunction »

Fixed my bugs! Work is now progressing quickly, I'll have more updates after school.
Image


"You're very clever, young man, but it's turtles all the way down!"
User avatar
tr1p1ea
Maxcoderz Staff
Posts: 4141
Joined: Thu 16 Dec, 2004 10:06 pm
Location: I cant seem to get out of this cryogenic chamber!
Contact:

Post by tr1p1ea »

Cool, i cant wait to see progress ... and hopefully another screenie? :).
"My world is Black & White. But if I blink fast enough, I see it in Grayscale."
Image
Image
User avatar
DJ_O
Calc King
Posts: 2324
Joined: Mon 20 Dec, 2004 6:47 pm
Location: Quebec (Canada)
Contact:

Post by DJ_O »

Cool you fixed it! What was the problem that caused the bug? :)
Image Image Image Now active at https://discord.gg/cuZcfcF (CodeWalrus server)
User avatar
dysfunction
Calc Master
Posts: 1454
Joined: Wed 22 Dec, 2004 3:07 am
Location: Through the Aura

Post by dysfunction »

Essentialy a large number of arithmetic errors. That's what i suspected, the hard part was finding them all. however once I found two of them I knew where to look for the rest. Basically debugging it involved an hour of running the program, looking at the code in graphlink, and making changes to see what difference they made. Anyways, I've got it and I'll give an update in a few hours. Current size: 14673 bytes.
Image


"You're very clever, young man, but it's turtles all the way down!"
User avatar
DJ_O
Calc King
Posts: 2324
Joined: Mon 20 Dec, 2004 6:47 pm
Location: Quebec (Canada)
Contact:

Post by DJ_O »

WOW 14673 bytes!!! I can barely fit a BASIC game in less than 60 KB :o
Image Image Image Now active at https://discord.gg/cuZcfcF (CodeWalrus server)
User avatar
dysfunction
Calc Master
Posts: 1454
Joined: Wed 22 Dec, 2004 3:07 am
Location: Through the Aura

Post by dysfunction »

Yeah, this should fit in RAM (not including any external levels).
Image


"You're very clever, young man, but it's turtles all the way down!"
User avatar
dysfunction
Calc Master
Posts: 1454
Joined: Wed 22 Dec, 2004 3:07 am
Location: Through the Aura

Post by dysfunction »

Yay! An update! Parallax scrolling is now implemented, thogh buggy, as you can see in this shot, if you look closely:
Image
I think I know how to fix the bug, though, so I'll work on that (and maybe more) today.
Image


"You're very clever, young man, but it's turtles all the way down!"
Post Reply