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 - Hayleia

Pages: 1 ... 122 123 [124] 125 126 ... 239
1846
Axe / Re: Clipped line routine ?
« on: November 17, 2012, 10:09:54 am »
What is the cause of the line being cut off at the right side of the screen?
What do you mean ? Do you mean that it gets clipped before reaching the edge of the screen ?
Well that is because I put a wrong number :P
Same for what happens at the bottom :P
I put 62 and 94 instead of 63 and 95, but that is not really difficult to change :)

1847
Axe / Re: Clipped line routine ?
« on: November 17, 2012, 10:06:40 am »
But that would be great to have one that supports clipping in all 4 directions.
Done :D
Code in spoiler.
Spoiler For Spoiler:
Lbl LINE
If r1<<0
 r4-(r2-r4*r3//(r1-r3))->r2
 0->r1
End
If r1>94
 r2-r4*94//(r1-r3)+r2-(r2-r4*r1//(r1-r3))->r2
 94->r1
End
If r2<<0
 r1-(r1-r3*r2//(r2-r4))->r1
 0->r2
End
If r2>62
 62-(r2-(r2-r4*r1//(r1-r3)))*(r1-r3)//(r2-r4)->r1
 62->r2
End

If r3<<0
 r4-(r2-r4*r3//(r1-r3))->r4
 0->r3
End
If r3>94
 r2-r4*94//(r1-r3)+r2-(r2-r4*r1//(r1-r3))->r4
 94->r3
End
If r4<<0
 r1-(r1-r3*r2//(r2-r4))->r3
 0->r4
End
If r4>62
 62-(r2-(r2-r4*r1//(r1-r3)))*(r1-r3)//(r2-r4)->r3
 62->r4
End
Line(r1,r2,r3,r4)
Return
However, after my recent fail, I decided to code this one like a complete noob, so there are lines that are the same and a lot of basic optimizations to do (and also less basic optimizations but I don't think I'll see them anyway :P). Feel free to optimize it :)

(Also, lol, I just double posted and quoted myself :P)

1848
Art / Re: [request] Logo, I have a design but need it done on the computer
« on: November 16, 2012, 03:48:33 pm »
Tried my hand at it :)
Sorry, not in vectors but in png.

edit new version with longer things at the bottom

1849
Axe / Re: Clipped line routine ?
« on: November 16, 2012, 12:47:36 pm »
// still the signed division (with two integer), isn't it ?

Yes, that's correct, you still need signed division.
So I need to put * and // ?
That is not very intuitive -.-°

see this one : http://ourl.ca/16928
(only for y>64)
Thanks, I'll try it :)
But that would be great to have one that supports clipping in all 4 directions.

1850
Axe / Re: Clipped line routine ?
« on: November 16, 2012, 12:41:03 pm »
It is indeed signed, but not treated as integers. Normal multiplication, on the other hand, works for any type of integer (signed or unsigned).
Ah. Yeah, I see it now in "the low byte as the decimal part" o.o°

But now that I changed all the ** and // into * and / in my program, it is worse :P

1851
Axe / Re: Clipped line routine ?
« on: November 16, 2012, 12:35:11 pm »
Why are you using the fixed ** multiplication ? I tought that it was only for 8.8 fixed number  ??? .
???
Isn't it for multiplication between two signed integers ?
"The signed multiplication is performed using the high byte as the integer part and the low byte as the decimal part returning a number in the same format."

1852
Axe / Clipped line routine ?
« on: November 16, 2012, 12:29:07 pm »
Hello everyone, as the title says, I need a clipped line routine (I mean a routine that still draws the line even if it is partly off-screen) that I can call with LINE(X1,Y1,X2,Y2) or that would use X1,Y1,X2 and Y2 as variables (there roles in the routine being obvious).

I saw this one by Darl181 but it is not a routine that I can call with LINE(X1,Y1,X2,Y2), it is a full program that includes line clipping, but only supporting one point and the other one always at the center :(

Then I saw this and tried to write it myself but failed miserably.
Here is the source in the spoiler if you see where the error is (note that it fails even though it is not optimized, I coded it noob-style to be sure that it would work but still failed D:)
Spoiler For Spoiler:
Lbl LINE
Y1-(Y1-Y2**X1//(X1-X2))->B
If X1<<0
 0->X1
 B->Y1
ElseIf X1>95
 Y1-Y2**95//(X1-X2)+B->Y1
 95->X1
End
If Y1<<0
 ~B**(X1-X2)//(Y1-Y2)->X1
 0->Y1
ElseIf Y1>63
 63->Y1
 63-B**(X1-X2)//(Y1-Y2)->X1
End
If X2<<0
 0->X2
 B->Y2
ElseIf X2>95
 Y1-Y2**95//(X1-X2)+B->Y2
 95->X2
End
If Y2<<0
 ~B**(X1-X2)//(Y1-Y2)->X2
 0->Y2
ElseIf Y2>63
 63->Y2
 63-B**(X1-X2)//(Y1-Y2)->X2
End
Line(X1,Y1,X2,Y2)
Return

So, anyone has a solution ?

1853
I believe it is an alternative, though this one is specifically for AXE.
I think the question was more "can sources produced with this IDE still be opened with the regular editor ?" ;)

1854
Other Calculators / Re: Calc prices on TI website... something wrong?
« on: November 15, 2012, 12:42:04 pm »
Because the teacher said you can't use an Nspire. Remember, although students buy graphing calculators, it's teachers that they advertise to. (Which means that free market economics doesn't apply to graphing calculators, which is why they're overpriced.)
That is true. This is also why so many people in France buy 82Stats.fr, because this is the one teachers talked about even though the 76.fr does the same for cheaper and the 83+ is far better (not even talking about the 84+).

1855
TI Z80 / Re: zStart - an app that runs on ram clears
« on: November 15, 2012, 12:39:46 pm »
Thanks, that is great :D
I'll try this whenever I have some spare time :)

1856
TI-Nspire / Re: Calling all Linux Kernel developers!
« on: November 15, 2012, 01:13:55 am »
Any ideas why Vogtinator's video got so many dislikes? O.O
I think they come from people who don't follow the Linux portage to the Nspire. Some might think it is fake, others might think that there is a typo in Linucx.

1857
Yup. I got this idea when I saw the dead XDE. I felt we need a better way to code on-calc.

What about zStart ???

I mean, I can think of lots of ways this could be better than zStart but the way you phrase your sentences makes me think that maybe you haven't seen it lol
Yes, that is what I thought too :P

The thing that is missing with zStart is that it still uses the original editor and it displays with the big font. So that would be great if an IDE used the small font to display tokens (so we can fit more on one line) :D

1858
Introduce Yourself! / Re: Streetwalker is in dah house ! (just kidding)
« on: November 14, 2012, 01:31:33 pm »
I believe I'm a Coder of Tomorrow because from time to time I think of a great idea that's probably gonna be a revolution, and I say to myself "Maybe tomorrow (read : a lot later)".
*.* I said the exact same thing in my introduction
I'm a coder of tomorrow because each time I have a program idea, I think "maybe tomorrow I'll code it".

Anyway ! Great to see French people invading Omnimaga :P
Welcome here, have some more of those !peanuts and enjoy your stay ^^

1859
Ash: Phoenix / Re: Ash: Phoenix- Reboot
« on: November 13, 2012, 02:01:20 am »
Hayleia, I'm curious as to how you do your chickens then, if you don't save the screen nor redraw every frame.
When the chicken is on the screen, I use pt-get to see what is beneath it, then I draw it and I use what I stored by the pt-get to erase it. And now you see why I can't draw the chicken if it is too close from the border of the screen because if the chicken just entered on the screen, the pt-get recorded some crap outside of the screen so erasing the chicken before drawing it will draw garbage.
I don't know if it is the fastest way but I am quite sure that it is faster than saving the screen or redrawing every frame :)

1860
Ash: Phoenix / Re: Ash: Phoenix- Reboot
« on: November 12, 2012, 01:12:51 pm »
How could chickendude not know about chickens????
Lol, didn't think about that one :P

I'm not sure how TinyCraft's mapper works, but the fact that it uses 8x8 tiles gives it a huge advantage over anything that I can come up with right now. 8x8 tiles are fast and flexible, making it easy to build a grayscale redraw-every-frame mapper that could easily support moving chickens. On the other hand, if you don't update every frame, it's still not too difficult to save the screen, draw the chickens, and recall the image (which is what I could theoretically do...only it would cause a very very noticeable speed drop, plus I have to change/write an unaligned 12x16 mask routine, which I don't want to do just for the sake of having moving npcs.
I don't redraw the screen at every frame (that would be too slow) and can't save the entire screen either, that would be too slow and wouldn't work with the greyscale interrupt.
But now that I think again about how they work, they have a drawback that will be very annoying for 16x16 sprites: they can't be drawn if they are too close from the border of the screen. Ideally, a border of 2 pixels would be needed (but since I code bad, I put a bigger limit :P).
So if there will be enemies in your game, not seeing them coming would be a huge issue :-\
Encountering enemies is gonna be Pokémon style, I don't see any problem about that.
Erm, I don't know at all how to say that in English -.-°
When an enemy comes, you should be able to see him as soon as he has a body part on the screen (then you see that said body part).
But in TinyCraft, even when the enemy could entirely be drawn on the screen, if he is too close from the border of the screen, he is not drawn. There is the problem.

But by Pokémon style, do you mean "non-moving enemies" ? Because if they don't move, there is no problem. But I think that enemies in A:P will move, so my method will not be appliable :(

Pages: 1 ... 122 123 [124] 125 126 ... 239