Gamestudio Links
Zorro Links
Newest Posts
zorro 64bit command line support
by 7th_zorro. 04/20/24 10:06
StartWeek not working as it should
by jcl. 04/20/24 08:38
Data from CSV not parsed correctly
by jcl. 04/20/24 08:32
Zorro FIX plugin - Experimental
by jcl. 04/20/24 08:30
folder management functions
by VoroneTZ. 04/17/24 06:52
lookback setting performance issue
by 7th_zorro. 04/16/24 03:08
Zorro FIX plugin - Experimental
by flink. 04/14/24 07:46
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
3 registered members (7th_zorro, Aku_Aku, 1 invisible), 579 guests, and 1 spider.
Key: Admin, Global Mod, Mod
Newest Members
EternallyCurious, howardR, 11honza11, ccorrea, sakolin
19047 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 9 of 16 1 2 7 8 9 10 11 15 16
Re: TUST or "The community library" [Re: Wjbender] #423117
05/24/13 08:59
05/24/13 08:59
Joined: Apr 2007
Posts: 3,751
Canada
WretchedSid Offline
Expert
WretchedSid  Offline
Expert

Joined: Apr 2007
Posts: 3,751
Canada
I mentioned the alignment problem with just one sentence in my original post, and just clarified what I meant when Christian asked me. But I actually think it's an important issue, take a look at these two gists:
https://gist.github.com/JustSid/211378039a4d53a83848
https://gist.github.com/JustSid/14004276a0a6b27d342e

They both align correctly in my IDE and with my settings, but the second version with tabs breaks everywhere where users use different settings.

I just assumed that, if there are tabs in the comments, he also used tabs in the actual source (maybe I shouldn't jump to conclusions, but that would make flame wars much harder)


Shitlord by trade and passion. Graphics programmer at Laminar Research.
I write blog posts at feresignum.com
Re: TUST or "The community library" [Re: WretchedSid] #423118
05/24/13 09:28
05/24/13 09:28
Joined: Mar 2012
Posts: 927
cyberspace
W
Wjbender Offline
User
Wjbender  Offline
User
W

Joined: Mar 2012
Posts: 927
cyberspace
Agree that tabs could make code not easy to read or follow or display in a nice coherent manner ..totaly in agreement .

Perhaps it could be said that for future contributers that a standard has to be followed to somw degree , as for what precisily , you or a collection of the team could decide on a template to follow?


Compulsive compiler
Re: TUST or "The community library" [Re: Wjbender] #423120
05/24/13 10:18
05/24/13 10:18
Joined: Dec 2008
Posts: 1,218
Germany
Rackscha Offline
Serious User
Rackscha  Offline
Serious User

Joined: Dec 2008
Posts: 1,218
Germany
about GSTNEt/Anet: Used GSTNet before Anet arrived. GSTNet is quite good, but NFS is not around here anymore. So in case of (internal)problems, noone can help.

Anet has some more features iirc, too. I know you have to buy anet, but its worht it.

I'll just stick to Anet.


MY Website with news of my projects:
(for example my current
Muliplayer Bomberman,
GenesisPrecompiler for LiteC
and TileMaster, an easy to use Tile editor)
Sparetime-Development

Re: TUST or "The community library" [Re: Rackscha] #423135
05/24/13 11:36
05/24/13 11:36
Joined: Mar 2011
Posts: 3,150
Budapest
sivan Offline
Expert
sivan  Offline
Expert

Joined: Mar 2011
Posts: 3,150
Budapest
thanks. it's just a far plan to explore multiplayer possibilities of 3dgs.


Free world editor for 3D Gamestudio: MapBuilder Editor
Re: TUST or "The community library" [Re: sivan] #423137
05/24/13 11:56
05/24/13 11:56
Joined: Nov 2007
Posts: 2,568
Germany, BW, Stuttgart
MasterQ32 Offline OP
Expert
MasterQ32  Offline OP
Expert

Joined: Nov 2007
Posts: 2,568
Germany, BW, Stuttgart
@lemming:
i would split up your system into three files and make an include guard that just includes the one file for ANet, GSTNet or Acknex. So your code will be much better to read and maintain, but you should think a lot about your API before implementing it


Visit my site: www.masterq32.de
Re: TUST or "The community library" [Re: MasterQ32] #423141
05/24/13 14:51
05/24/13 14:51
Joined: Nov 2011
Posts: 274
de
lemming Offline
Member
lemming  Offline
Member

Joined: Nov 2011
Posts: 274
de
Wow, I didn't expected so many replies.

To clarify a few things:
Unfortunately it seems you thought this is meant to be some sort of plan. It is not. It is an IDEA. I posted the code just to show what I mean, not to show what great coder I am.
Here I want to quote myself:
Originally Posted By: lemming

At the moment it needs to be cleaned up and is very incomplete.


And because I made every mistake a programmer can make in my very little snippet, I shall comment on this, too:
Sid is right. Thank you for pointing on my mistakes (yeah really!). And I have no problems with his words, I grew up with the internet.
My code is poorly (if not horribly) written and I know NOTHING about API design.
That handle example was the very first I came up with and it even sounded stupid to me, but I had no better idea when I posted it. But Anet for example had an API change in some version that was not so minor.
The precompiler stuff is just that bad, because, well, I never did something that "complex" (more than one IF in a file) with precompiler commands. So I looked in the command list, "Ah, that might possibly work.", and it worked in the first test run. The rest was copypasta. I hate it when I do it Quick'n'dirty, but sometimes I fall for it.
Tabs? Well, dunno. Never thought about that. They are just easier to navigate than spaces.
Naming convention: Yeah, the code was written longer ago. I made several naming convention changes in my life just to find out which one just feels right to me. This one was very close to what I stick now (and believe is called "Camel Case") void prefix_someFunction(var someVar). (But for the CLTEXT lib I changed it to be compatible to the TUST convention.)
So much for my excuses.

About the lowest dominator:
Of course the lib covers only the stuff every other lib has in common. Everything else would be a pain to code. My intention was to ask "Does anyone need something like that?". And we are discussing about that. That's what I wanted.

Re: TUST or "The community library" [Re: lemming] #423149
05/24/13 15:51
05/24/13 15:51
Joined: Nov 2007
Posts: 2,568
Germany, BW, Stuttgart
MasterQ32 Offline OP
Expert
MasterQ32  Offline OP
Expert

Joined: Nov 2007
Posts: 2,568
Germany, BW, Stuttgart
I've added a small function: draw_font. It's usage is basically the same as draw_text, but allows you to render with custom bitmap fonts and some other features of TEXT
Code:
draw_font("Hello World", 16, 16, vector(0, 255, 0), font, SHADOW, 100);



Visit my site: www.masterq32.de
Re: TUST or "The community library" [Re: MasterQ32] #423151
05/24/13 16:32
05/24/13 16:32
Joined: Mar 2006
Posts: 1,993
Karlsruhe
PadMalcom Offline
Serious User
PadMalcom  Offline
Serious User

Joined: Mar 2006
Posts: 1,993
Karlsruhe
Code:
And I have no problems with his words, I grew up with the internet.



Haha, this made me laugth laugh

I just added a (strongly) customized version of mystymood to the templates which is absolutely easy to use with just a hand full of functions.

Re: TUST or "The community library" [Re: Wjbender] #423158
05/24/13 19:33
05/24/13 19:33
Joined: Jul 2001
Posts: 6,904
H
HeelX Offline
Senior Expert
HeelX  Offline
Senior Expert
H

Joined: Jul 2001
Posts: 6,904
I don't know why but somehow the tab- and the #define-thingy didn't caught my attention, for whatever reason - of course, I agree. Tabs are in a line a bad idea. Though, I still think that tabs are useful for indentation in if/else blocks, functions, and so on. It is just easier to use. On work, we have a coding policy which also requires whitespace as tabs. Since we use Eclipse as preferred IDE, you can still jump from indendation to indendation with just pressing a key, although they contain whitespace. For Lite-C, I use a pretty simple texteditor which doesn't support this (Programmer's Notepad; before that I used ConTEXT - but I found out that Notepad++ is neat, too). So in these cases, tabs make sense, because they are faster and easier to maintain than whitespace-tabs.

By the way, the slides of "How to Design a Good API and Why it Matters" of Joshua Bloch are to be found here: http://lcsd05.cs.tamu.edu/slides/keynote.pdf, thanks for the hint! There is also a short summary of all important points of the talk to be found here: http://www.infoq.com/articles/API-Design-Joshua-Bloch. --- But I guess it might be too abstract for most people - give them a coding guideline and they will read it; but give them a tech talk about API design, they certainly get questionsmarks raised above their heads. But you are absolutely right, the talk is great and the hints are very nice. Personally, I think the remark that "Code should read like prose" is the strongest one, it rings my bell.

Last edited by HeelX; 05/24/13 19:35.
Re: TUST or "The community library" [Re: HeelX] #423161
05/24/13 19:50
05/24/13 19:50
Joined: Nov 2007
Posts: 2,568
Germany, BW, Stuttgart
MasterQ32 Offline OP
Expert
MasterQ32  Offline OP
Expert

Joined: Nov 2007
Posts: 2,568
Germany, BW, Stuttgart
Quote:
Programmer's Notepad
Omg, i'm not alone!


Visit my site: www.masterq32.de
Page 9 of 16 1 2 7 8 9 10 11 15 16

Gamestudio download | chip programmers | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1