Omnimaga

Calculator Community => Other Calc-Related Projects and Ideas => TI-Nspire => Topic started by: Matrefeytontias on June 11, 2013, 11:20:24 am

Title: Matrefeytontias's various animations
Post by: Matrefeytontias on June 11, 2013, 11:20:24 am
Hallaw people,

In my free time I like to program some small animations on my calc, and I thought it could be cool to make a topic to show you the ones that I think should be shown :)

[Ndless C] Plasma (I know this already exists, but it doesn't use SDL anymore, for this I reused part of a library I'm writing to deal with screen and pixels). My library handles cross-compatibility, so you can use the same *.tns file for both CX and non-CX calcs :)

It takes ≈ 6 seconds to start because it has to compute and store 76800 * 7 sines and 76800 * 2 square roots in a table in order to get a decent execution speed :P
Title: Re: Matrefeytontias's various animations
Post by: Streetwalrus on June 11, 2013, 12:11:59 pm
It takes ≈ 6 seconds to start because it has to compute and store 76800 * 7 SINES and 76800 * 2 square roots in a table in order to get a decent execution speed :P
/me runs

Also *.* at the numbers.
Title: Re: Matrefeytontias's various animations
Post by: Matrefeytontias on June 11, 2013, 12:17:36 pm
Oops :P gonna correct that right now.

And yeah, that is high, but you can see that I'm right if you actually run the program :P
Title: Re: Matrefeytontias's various animations
Post by: Streetwalrus on June 11, 2013, 12:29:38 pm
Yeah it takes quite long to start but it looks AWESOME. :thumbsup:
Title: Re: Matrefeytontias's various animations
Post by: Matrefeytontias on June 11, 2013, 12:38:38 pm
Thanks :)

I just submitted a file at ticalc.org that contains this one, its source and a quick tutorial on how to write plasmas. It should pop up in a few hours/days :)
Title: Re: Matrefeytontias's various animations
Post by: DJ Omnimaga on June 11, 2013, 02:59:21 pm
Looks nice. It reminds me the other plasma demo by Hoffa I think. Those animations actually reminds me of battle backgrounds in Earthbound.
Title: Re: Matrefeytontias's various animations
Post by: Sorunome on June 13, 2013, 06:16:24 am
wow, that plasma is looking epic O.O/me pokes you to make a derpy hooves animation
/me runs
Title: Re: Matrefeytontias's various animations
Post by: Streetwalrus on June 13, 2013, 01:29:44 pm
/me wants a Rainbow Dash animation
BTW Rainbow Dash >> Derpy :P/me runs
Title: Re: Matrefeytontias's various animations
Post by: Levak on June 22, 2013, 09:00:49 pm
for this I reused part of a library I'm writing to deal with screen and pixels
Like ... nSDL ?
Quote
My library handles cross-compatibility, so you can use the same *.tns file for both CX and non-CX calcs :)
Like ... nSDL ?

In short, I don't really like the word "library" to describe bunch of code you reuse from one project to another.
This is most likely called "toolkit". A library is attended to be distribued and used by others and as far as I can see you're not willing to release it as a standalone library.


Quote
It takes ≈ 6 seconds to start because it has to compute and store 76800 * 7 sines and 76800 * 2 square roots in a table in order to get a decent execution speed :P
I haven't looked at the code, but this is too long for such calculation, do you know about fast sine and fast cosine ?
Do you know also that using C++ templates you can precompile such values ? (you can also directly put the tables in the source code)
Only sine from 0 to 45° are usefull, not the entire 360°. Then you can also define cosine from sine.
Title: Re: Matrefeytontias's various animations
Post by: Hayleia on June 23, 2013, 02:40:21 am
In short, I don't really like the word "library" to describe bunch of code you reuse from one project to another.
This is most likely called "toolkit". A library is attended to be distribued and used by others and as far as I can see you're not willing to release it as a standalone library.
Maybe the word "library" doesn't apply yet but it will apply when everything gets released, which willhappen according to this quote (and also according to the several releases we see in the quoted topic).

So I wrote this library which I named nRayC, because it's an Nspire lib about RAYcasting to be used in C ;D

Although this library is mainly focused on raycasting, it's not its only use : I also included a bunch of functions, like pixel, line and even triangle (why not) drawing, tile detection, bitmaps loading and stuffs.

Currently, the library features raycasting rendered by a unique function :

void nRC_rayCasting(int *map, Vector player, ScreenPoint mapDimensions, Vector dir, Vector planeVec, uint16_t *textures, char *buffer)

It also provides two structures as you can see, ScreenPoint and Vector. I don't release anything for now because I don't think it's ready to be released, but I attach a screenshot of what it can do :)
Title: Re: Matrefeytontias's various animations
Post by: Matrefeytontias on June 23, 2013, 06:06:42 am
What Hayleia said. How can you judge me when you know nothing about what I wrote ?

In short, I don't really like the word "library" to describe bunch of code you reuse from one project to another.
This is most likely called "toolkit". A library is attended to be distribued and used by others and as far as I can see you're not willing to release it as a standalone library.
It's exactly the contrary. I only use nRayC's setPixel function.
Title: Re: Matrefeytontias's various animations
Post by: Levak on June 23, 2013, 07:27:23 am
What Hayleia said. How can you judge me
Judging you ? Where is it question of judging people here ?

Quote
when you know nothing about what I wrote ?
I know about C programming on the TI-Nspire and the about the plasma demo, about your past projects and abut what you said in your post.
According to that I was able to determine the following without being able to look at the code :

Quote
It's exactly the contrary. I only use nRayC's setPixel function.
It is exactly what I'm trying to tell you, if you only use such a function, things are telling me you copy/pasted it in your code thus your not using a library but a tookit. There is a big difference between the two (copy/pasting vs compile time linking).

If you feel offended by my remarks where I'm trying to teach you good programming practice then I'm sorry and I promise not to help you in the future.
If, on the contrary, your using the proper to use a non-released-yet standalone library without copy/pasting your code from one project to another (since you're saying in a lot of projects that you're not using nSDL "because blablabla"), fine, but then please be more clear in the future, for example on how you managed to code a crossplatform setPixel that is not the Ndless nor the nSDL one ... (this caught my attention and was affraid you where boycotting nSDL for no reason).
Title: Re: Matrefeytontias's various animations
Post by: Matrefeytontias on June 23, 2013, 07:34:14 am
What Hayleia said. How can you judge me
Judging you ? Where is it question of judging people here ?
Well yeah, it's badly said, I meant judging what I'm doing. I don't like how you say :
In short, I don't really like the word "library" to describe bunch of code you reuse from one project to another.
This is most likely called "toolkit". A library is attended to be distribued and used by others and as far as I can see you're not willing to release it as a standalone library.
Without knowing that I only use a sole function of a whole engine that is already released.

And the reason why I'm not using nSDL (and not "boycotting", it's a great lib) is that I really like to know exactly what I'm doing, not only to make things work like I want them to, but also to understand concepts.
Title: Re: Matrefeytontias's various animations
Post by: Levak on June 23, 2013, 07:55:58 am
Well yeah, it's badly said, I meant judging what I'm doing. I don't like how you say :
In short, I don't really like the word "library" to describe bunch of code you reuse from one project to another.
This is most likely called "toolkit". A library is attended to be distribued and used by others and as far as I can see you're not willing to release it as a standalone library.
Without knowing that I only use a sole function of a whole engine that is already released.
This confirm what I was saying : you're calling "lib" the use (=copy/paste here) of a "sole function" from one project (nRayC) to another.
Since you did not corrected the other points of my previous post, I take them as true statement.

Quote
And the reason why I'm not using nSDL (and not "boycotting", it's a great lib) is that I really like to know exactly what I'm doing, not only to make things work like I want them to, but also to understand concepts.
For sure it is nice to understand on what your walking, but I'm not sure it is usefull to do it on every project you do, most likely wasting time.
Title: Re: Matrefeytontias's various animations
Post by: Lionel Debroux on June 23, 2013, 09:12:26 am
Understanding the concepts is indeed nice and even important, but it can get in the way of progress :)
If you want to become a professional software programmer some day, you'll have to switch to another mode, otherwise it will hamper your progress. I'm not saying that you should  completely quit trying to understand the concepts at some point, just that doing everything by yourself will slow you down too much by being too time-consuming ;)

EDIT the next day: for instance, I did lots of graphics routines on the TI-68k series as part of ExtGraph, and more recently, ported several TI-68k programs to the Nspire (Clickpad/Touchpad) series as verbatim as possible (= no libraries), but for computer programming as part of my day job, I use lots of libraries.

If what I'm writing is not clear, then I guess we can discuss it in French, on TI-Planet (although not necessarily right after I'm posting this message, I have to go for a little while).
Title: Re: Matrefeytontias's various animations
Post by: Matrefeytontias on June 23, 2013, 02:12:18 pm
I understand what you mean, but I'm walking this way just because I'm not yet that "professional software programmer" you said ;) when things will change, I'll change with them (or at least I'll do my best to).
Title: Re: Matrefeytontias's various animations
Post by: DJ Omnimaga on June 24, 2013, 01:18:32 am
Levak & Lionel although I understand (and agree with) your points, it would be best to leave him do what he wants if he is not willing to use an external lib. Insisting will not work. :P Of course I think it would be better to use an existing lib that is very good, but I see nothing wrong with trying to learn how things work first, in case this might help him code better or using new techniques in the future. :)

Also to Levak, this is Omnimaga. There is a difference between criticizing Matrefeytontias and being a total jerk to him. The former is perfectly fine and allowed on Omni, but the latter is not.

The second half of your first post, along with most of your 2nd and 3rd post (and the entire content of Lionel's posts) are fine, but the tone that you used in the following quote was totally uncalled for:
for this I reused part of a library I'm writing to deal with screen and pixels
Like ... nSDL ?
Quote
My library handles cross-compatibility, so you can use the same *.tns file for both CX and non-CX calcs :)
Like ... nSDL ?

From Omnimaga front page:
Quote
Our community goal is to provide a discussion environment free of any hostility for all coders wanting to learn, give or get help, showcase their work, discuss

We are trying to get people to learn, not trying in every way possible to scare them away from the forums or discourage them from coding. Granted, since the past few years we are a little less nice to school cheaters, community troublemakers and people who does no effort to learn, but Matrefeytontias is WAY better than that (some of his ticalc files made front page news, after all). If you are gonna criticize matrefeytontias, please keep it clean from any form of insults to his intelligence level.

Remember 2008 (http://www.ticalc.org/community/awards/poty/2008.html).

Thank you.

Title: Re: Matrefeytontias's various animations
Post by: Lionel Debroux on June 24, 2013, 01:41:03 am
I'm glad you edited to add "(and the entire content of Lionel's posts)", which was not there in the first version of your post... Without it, it felt possibly hostile to me, despite the fact my post was entirely hostility-free (and I edited it to provide examples). A note by aeTIos on #omnimaga last night felt hostile as well - seriously, we're only trying to help.

I'm certainly not going to insist that Matrefeytontias needs to program the way Levak and I advise him to. By now, we've made him aware (in case he wasn't already) that he could do things differently; trying to understand how things work is a laudable goal, as I wrote... if it does not drown him into detail and slows him down, letting schoolmates used to libraries race ahead of him.
I used to be too focused on low-level detail and too optimization-minded, both common traits of people used to program on the highly limited embedded platforms that TI-68k calculators, and even more so TI-Z80 calculators, are. I can tell you I had to change, as part of my professional software developer education at the university :)
I'm fully aware that hobbyist programming is different from professional programming, and that's part of what I was trying to point out.
Title: Re: Matrefeytontias's various animations
Post by: DJ Omnimaga on June 24, 2013, 01:50:45 am
Yeah I was implying at any time that your entire posts were fine (since I didn't quote any part of them, unlike levak), but I thought that I would specify it through an edit in case there were any misunderstoods.

And yeah I understand. It's kinda like when someone starts creating an RPG, but then spends 6 months optimizing a text routine he created himself when a good one is already available on ticalc.org, while people on forums are anxiously hoping that the game will even progress further.
Title: Re: Matrefeytontias's various animations
Post by: Levak on June 24, 2013, 06:31:54 am
Levak & Lionel although I understand (and agree with) your points, it would be best to leave him do what he wants if he is not willing to use an external lib. Insisting will not work. :P
Am I forcing him the way of using nSDL ?
I've just read the entire topic in order to see if I made a sentence in this way and I couldn't find any.
What I was trying to determine are
1) is he using a library (his liibrary !) the proper way, not like a toolkit (and, as far as I understood, he is not using it the proper way) and
2) why doesn't he use nSDL in that case ? (in the case he is indeed using a toolkit).

Quote
Also to Levak, this is Omnimaga. There is a difference between criticizing Matrefeytontias and being a total jerk to him. The former is perfectly fine and allowed on Omni, but the latter is not.
What ? Where have I been a total jerk to him ? Either you missread my posts, or I don't understand your's

Quote
The second half of your first post, along with most of your 2nd and 3rd post (and the entire content of Lionel's posts) are fine, but the tone that you used in the following quote was totally uncalled for:
for this I reused part of a library I'm writing to deal with screen and pixels
Like ... nSDL ?
Quote
My library handles cross-compatibility, so you can use the same *.tns file for both CX and non-CX calcs :)
Like ... nSDL ?

From Omnimaga front page:
Quote
Our community goal is to provide a discussion environment free of any hostility for all coders wanting to learn, give or get help, showcase their work, discuss
Is that rude or hostile ? If so, I guess it's a language barrieer, and even if french around here feel it rude, then here is my signature from TI-Planet :
Quote
I do not get mad at people, I just want them to learn the way I learnt.


Quote
We are trying to get people to learn
Me too.

Quote
not trying in every way possible to scare them away from the forums
May I shave myself then ?

Quote
discourage them from coding.
Bad coding style is not something learnt a lot on the web, and that really sucks.
We all started with a bad looking code, aren't we ?
Where did we learn how to fix this ? With dicussions like that.

Coding would be like drawing. Some will use a computer with pre-drawn stuff and magikal effects, but at least will only press "buttons".
In the artistic domain it is asked for them to draw by and understand the basics, learn good gestures. Why isn't that learnt through a community ?

From what I understand with this discussion is that, some people here are not willing to use comments in order to progress, are against the change.
Title: Re: Matrefeytontias's various animations
Post by: Adriweb on June 24, 2013, 07:06:32 am
I'd like to just say also that I absolutely don't find this as hostile :

for this I reused part of a library I'm writing to deal with screen and pixels
Like ... nSDL ?
Quote
My library handles cross-compatibility, so you can use the same *.tns file for both CX and non-CX calcs :)
Like ... nSDL ?

If this is indeed a languauge difference in interpretation, then... we can't do much about it.

Also, as Levak said about his signature on TI-Planet, it sums up his mind. Might not be an excuse, but it's his way of talking/teaching, and it can have advantages and drawbacks, but "harsh" sentences when teaching never killed anyone....

(believe me, I've lived with him or 2 months :P)



Also, Levak :
Quote
May I shave myself then ?
wat ?
Even in french it doesn't mean anything :P
(à la limite, "jpeux aller me brosser ... ?" )
Title: Re: Matrefeytontias's various animations
Post by: TIfanx1999 on June 24, 2013, 07:28:52 am
Apparently, everything is fine. No one intended to be rude and both involved parties are ok. Lets just move forward and get back on topic please. Thanks. :)
Title: Re: Re: Matrefeytontias's various animations
Post by: DJ Omnimaga on June 24, 2013, 02:07:51 pm
If it's language barrier then it's fine, but I speak from experience: In the past there are people who left other calc forums because of unnecessarily hostile comments then migrated to Omnimaga. Worse: there are potentially good coders who didn't find about Omnimaga then simply moved on to bigger platforms. So yes, there are people who have done it before, hence my Remember 2008 comment. Matrefeytontias won't leave, but we still have to be careful with who we are dealing with, in case.

As for what I sae in the comment I quoted, it seemed like you were trying to make Matrefeytontias feel or look stupid in front of other people. The way it was worded (or Google-translated?) and punctuated implied it at least. To avoid it in the future, you should probably say "Like nSDL?" Instead of "Like.. nSDL?", but also only ask it once instead of twice (just reply to both quotes at once).

As for your signature I understand, although remember that people may not be necessarily willing to learn/code the way you want, even if you are not fine with it.

Also if someone tries to sound harsh to people, it is often unnecessary and the person will have some troubles concentrating on the post content. It is only really necessary if for example someone asks help to install nLaunch because he's gonna fail his test, if he insists so that you give him code for an engine so he doesn't have to learn how to code it himself or if he's being arrogant or repeatedly breaks forum rules. Else it's like if in a math class you asked help to the teacher and he started yelling at you (he would lose his job fast) about how retarded you are for not being able to solve the problem yourself. Plus it might make some people label you as a troll.

In conclusion, while we want to help people coding better, we also want our community to remain as friendly as possible and being friendly while helping is not that hard.
Title: Re: Matrefeytontias's various animations
Post by: Streetwalrus on June 24, 2013, 03:22:32 pm
being friendly while helping is not that hard.
I suppose that being friendly and helping are somwhat related. If you're unfriendly then you're not helping the person because helping is partly being good to others, gently pushing them in the right direction and not forcing them on the right way. Kinda like when left handeds were forced to write with their right hand, and when adults attached a stick to children's backs so that they sit  straight. ;)
Title: Re: Matrefeytontias's various animations
Post by: DJ Omnimaga on June 24, 2013, 03:32:19 pm
Well it depends of people. Knowing Matrefeytontias I don't think it makes much of a difference except that he seemed a bit annoyed, but there are a bunch of people who will either leave, get extremely mad or never ever ask help again on the forums (like what happened before). I know myself that this happened on another forum way back in 2003-04 and I have only ever asked help there again once afterward (for someone else). I would just ask elsewhere afterward and even then I was reluctant to do it.

Besides, being rude for no reason has similar effects as trolling, in the way that it results into discussions derailing into off-topic arguments/debates. Anyway case closed I guess (if it ever gets bad we can always use the "report to moderator" link anyway), so we can go back to the original discussion. :P
Title: Re: Matrefeytontias's various animations
Post by: Levak on June 24, 2013, 03:55:10 pm
Else it's like if in a math class you asked help to the teacher and he started yelling at you (he would lose his job fast) about how retarded you are for not being able to solve the problem yourself. Plus it might make some people label you as a troll.
I am a bit concerned about what you said here... because it is exactly how I was thaught either maths or programming.
Okay, it was not "yelling", but kinda the same using french tournures. So maybe it's only a French aspect, or maybe it's only a matter of environnement where I live... but the fact is that it's a really motivating way to learn by yourself : Hard but Sucessful (see Adriweb comment).

Quote
As for what I sae in the comment I quoted, it seemed like you were trying to make Matrefeytontias feel or look stupid in front of other people. The way it was worded (or Google-translated?) and punctuated implied it at least. To avoid it in the future, you should probably say "Like nSDL?" Instead of "Like.. nSDL?", but also only ask it once instead of twice (just reply to both quotes at once).
As I said, it's maybe a language barrier, but I can't see any harmful part. The "..." are indeed here to mark a pause like "Are you kidding me ?", but not a "you are stupid ...".

May we close this debate then ?
Title: Re: Matrefeytontias's various animations
Post by: DJ Omnimaga on June 24, 2013, 04:10:09 pm
Ah ok. Over here I never saw a teacher yell, be rude or disrespectful towards a student unless he was disrupting the class by talking or breaking class policies often. If a teacher was like that students could report him and he could get in trouble if there were multiple reportings of him. But again if the student is causing trouble or is being disrespectful then expect the teacher to put him back in his place fast.

That said, maybe the way some forum sentences are worded may make them sound more rude than they are in reality may have played a role too (since text is like the worst medium to send emotions and sarcasm). Not that much can be done about it, though, unless someone uses smileys.

Anyway, since the only comment that you posted that was questionable (the one I quoted, since all your other comments were fine) seems like a language barrier issue, then I guess we can move on. You should maybe put your TI-Planet sig here too, though :P
Title: Re: Matrefeytontias's various animations
Post by: Matrefeytontias on June 24, 2013, 04:12:47 pm
Maybe it's only me, but this "are you kidding me" seems extremely offensive. Moreover, it's not the first time I say it, see the topic where I ask for help with raycasting.

Aaaanyway, let's forget that :P I'm sure that you only want to teach good practices Levak, but there's something "unpleasant" with your method ^^'

In any case, please get back to the subject, as Art_of_camelot said.