My first library
I've created a library for a heads up display system.
http://www.byond.com/developer/Psmaun/HeadsUpDisplay
My first library...
http://www.byond.com/developer/Psmaun/HeadsUpDisplay
My first library...
Posted by Psmaun on Sunday, June 21, 2009 08:16AM
- 19 comments
(link)
/
Keywords:
display,
library,
up,
heads

Login to post a comment.
#19 Psmaun:
This library can serve similar purpose as Shadowdarke's HUDmeter library, but mine is sort of limited to simple meters. Also, the approach is completely different. Shadowdarke's library uses icons extensively, while mine just needs a single icon (32pxl wide/1 pxl tall).
Foomer wrote:
> Also, you should include brief examples in your documentation of how to write out the procs. Just because I find that it makes it easier for me to understand how they're supposed to be used.
That is a good idea, I will do that.
Monday, June 22, 2009 08:57AM
#18 Foomer:
Psmaun wrote:
> That said, I cant stand guys like Popisfizzy, I learn on my own and there is absolutely no way that I'll ask him for help after the type of response he has given.
Most people can't stand guys like Popisfizzy. Just consider that he seems to know what he's talking about, and ignore the fact that he tends to be a jerk.
Monday, June 22, 2009 08:47AM
#17 Foomer:
I'm under the impression that this library is intended to serve a similar purpose to Shadowdarke's HUDmeter library?
Also, you should include brief examples in your documentation of how to write out the procs. Just because I find that it makes it easier for me to understand how they're supposed to be used.
Monday, June 22, 2009 08:45AM
#16 Psmaun:
@Ss4toby
lol, I am glad you liked my library. I looked at the neverending list of demos in your blog and I especially liked the 3D Ball one.
@Obby
I am not exactly a beginner at programming, as a matter of fact, I have been programming for more than 5 years now (not Dream Maker). I have been in BYOND for more than 2 years and coding for more than 18 months.
I am open to constructive criticism, but you can hardly call Popisfizzy's comments constructive. I took seriously what Garthor wrote and fixed my coding accordingly.
Monday, June 22, 2009 03:51AM
#15 Ss4toby:
It looks goo to me.. And trust me, I'd know.. Just take a gander at my fancy list of library(more so demo) collections.
Monday, June 22, 2009 02:39AM
#14 0bby:
It looks like you can't take constructive criticism well, if I was a beginner at programming, I would be open to constructive criticism and try to improve what I was making, such as a library.
You really didn't need to get involved in this whole confrontation, because far as I'm concerned, it could of been one of those BYOND Veterans that flame you, and gave you negative critique.
Monday, June 22, 2009 01:38AM
#13 Psmaun:
Lord of Light, I know what you mean, I am not an arrogant person by nature, but the arguement began when Popisfizzy wrote a comment just on the bases of Garthor's comment, without even having a look at the coding it self.
By the way, the library which I've made is pretty consistant and it should not lead to errors down the line. I am not trying to argue.
That said, I cant stand guys like Popisfizzy, I learn on my own and there is absolutely no way that I'll ask him for help after the type of response he has given.
Sunday, June 21, 2009 10:43PM
#12 Lord of light:
Psmaun, let me break it down for you. My opinion of this matter is not biased in any way considering I usually can't stand PIF, but he's right. If your library isn't consistent and could lead to errors down the line which could cause the game to mess up, its not worth putting out as a library. Understand this, when someone puts a library in there game, they depend on it to work exactly as they read without any flaws.
If you have something that could mess up a game or a programmer with bad practices, you should keep it to yourself, maybe find someone like PIF to help you sort it out so you can fix your bad practices and become a better programmer.
I'm not the biggest fan of PIF but when he's right, he's right. He and Garthor are pretty intelligent programmers and you should listen to people like that. They help you become a better programmer, they've already helped me a lot.
Just don't be so quick to argue, listening is a great quality.
Sunday, June 21, 2009 07:30PM
#11 Psmaun:
Uh, all I did was upload a library,I am just trying to help out people by doing that, this is my first library (which I have mentioned quite a few times now), therefore chances are that I would not have known what 'Library-quality' is. I know you have written some libraries (though to be honest, i didnt think any of them made very nice libraries, but thats just me), I never questioned that fact. I also know that you have been here more than I have.
For the second part of your comment, had you read my replys to Garthor's comment, you wouldnt have had much problem in deciding wether or not the coding which I present qualifies to be a library or not (without getting the 'library-quality' factor in the picture). Even a guy new to BYOND wouldnt have had any problem in deciding that.
You just abruptly changed the subject from the 'coding being a library or not' to 'your library sucks'.
Oh and another thing, if you actually read all the libraries uploaded in BYOND resources, you would notice that about 50% of them are actually demos posted as libraries, off the remaining 50%, less than 15% quality with your 'Library-quality' mark (I dont know this for a fact, I am just guessing, but there is a very high probability that I am right).
Sunday, June 21, 2009 02:34PM
#10 Popisfizzy:
Uh, just so you know, poor programming is a legitimate reason for code not to be a library. Library-quality code is code that is very well-written, and problems like goto and obvious redundant operations are significant flaws. I have written more than a few libraries myself, and having been around for several years I know what library quality code is. Yours is not library-quality.
In addition to that, my first comment was made without having even downloaded your library, basing it entirely off of Garthor's remark and your reply.
Sunday, June 21, 2009 02:21PM
#9 Psmaun:
Heh, cant find any more reasons for my code to NOT be a library?
Just why are you changing the subject?
You write two comments without reading the code just on the bases of the critisism done by a person whom I totally agreed with AND fixed the problem he mentioned.
My code might have some poor practices, I never said I was the best coder, I just uploaded a library and wrote a post about it. My code might use 'goto loops in unnescesary locations', but atleast it works? To use a library or not depends totally on the person viewing it.
You say "You should probably not be writing libraries.", on the other hand I think I should have started writing libraries a long time ago. I might write more libraries in future.
This being my FIRST library, some people might have understood any newbish errors which I might have made in the process, but you just need a reason to criticise right? No problem, thanks for commenting, have a nice day/afternoon/evening/night whichever fits your situation :)
Sunday, June 21, 2009 02:14PM
#8 Popisfizzy:
Actually looking at the code this time, I see a lot of poor practices, like numerous pieces of redundant code in if statements, and the use of goto in an especially unnescesary location. You should probably not be writing libraries.
Sunday, June 21, 2009 01:57PM
#7 Psmaun:
1) It doesnot have the ability to display just three things, you are confusing the library with the demo.
2) i mention explicitly what use this library might have: "The main use of this library is in games which require statistical
bars with frequent updation."
You would have seen that had you even botherd to open up the main file.
3) i Say its Heads Up Display in my title because thats is the keyword which people would search for while looking for something like this.
For the most part of it, Heads Up Displays are used to show meters, and that is exactly what this library does.
Please actually 'read' the coding before posting another comment?
Thanks.
Sunday, June 21, 2009 01:47PM
(Edited on Monday, June 22, 2009 09:03AM)
#6 Popisfizzy:
You said that it's a Heads Up Display library, but it only has the ability to display three things. That's like going to see a movie billed as an incredible piece of cinema, but the film consists entirely of the opening credits looping for the next two hours.
Sunday, June 21, 2009 01:40PM
#5 Psmaun:
And how is that?
As Garthor said "A library provides a set of self-contained functions which can be used as needed for a wide range of projects, without having to modify the library."
My library is indeed a set of functions, and those functions can be used wherever needed. There is no need to modefy my library.
What part of it does my library doesnt qualify exactly?
Sunday, June 21, 2009 01:32PM
#4 Popisfizzy:
Based on Garthor's criticisms and what you've said, it still doesn't suit the criteria for a library.
Sunday, June 21, 2009 01:27PM
#3 Psmaun:
I have fixed the part which required library code modification by the user. The code is now 100% portable with no post changes to the main code.
My 'First Library' is a library now (hopefully) :/
Sunday, June 21, 2009 12:28PM
#2 Psmaun:
Yes i can understand your concern in the matter, i was wondering if i should put it under Demo aswell.
The code which i've written can be ported to any project which you want to use it in (with a little modification).
But yes, you are right.
I will shift my 'library' to Demos section if i cant figure out how to fix that small problem, thanks for the feedback.
Sunday, June 21, 2009 11:05AM
#1 Garthor:
That would be a demo, not a library. A library provides a set of self-contained functions which can be used as needed for a wide range of projects, without having to modify the library. A demo is just an example of code. Seeing as what you have is strictly limited to what only displaying hel, pow, and gol on the screen in a particular location, and would be destructive to any other attempts to use client.screen, you have a demo. Not a library.
In other news: you shouldn't be writing libraries unless you really know what you're doing. They have to be designed very well in order to be useful.
Sunday, June 21, 2009 10:58AM