Gamestudio Links
Zorro Links
Newest Posts
Trading Journey
by M_D. 04/26/24 20:22
Help with plotting multiple ZigZag
by M_D. 04/26/24 20:03
Data from CSV not parsed correctly
by jcl. 04/26/24 11:18
M1 Oversampling
by jcl. 04/26/24 11:12
Why Zorro supports up to 72 cores?
by jcl. 04/26/24 11:09
Eigenwerbung
by jcl. 04/26/24 11:08
MT5 bridge not working on MT5 v. 5 build 4160
by EternallyCurious. 04/25/24 20:49
Zorro FIX plugin - Experimental
by flink. 04/21/24 07:12
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
1 registered members (PeroPero), 788 guests, and 6 spiders.
Key: Admin, Global Mod, Mod
Newest Members
wandaluciaia, Mega_Rod, EternallyCurious, howardR, 11honza11
19049 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 8 of 16 1 2 6 7 8 9 10 15 16
Re: TUST or "The community library" [Re: PadMalcom] #423073
05/23/13 19:31
05/23/13 19:31
Joined: Nov 2011
Posts: 274
de
lemming Offline
Member
lemming  Offline
Member

Joined: Nov 2011
Posts: 274
de
Originally Posted By: PadMalcom
I'd prefer a 100% working GSTNet or ANet solution. Just one network component is easier to maintain than 3 different ons.


But you'd have the advantage to maintain only 1 file, as you don't do direct calls anymore.

Example:
Code:
/// @brief (Server) Entfernt eine Entity im Spiel.
///
/// @param nethandle		das globale Handle der Entity
void net_EntRemove(var nethandle)
{
	#ifdef NET_USE_ANET
		enet_svent_remove(nethandle);
	#else
	#ifdef NET_USE_GSTNET
		GSTNet_ent_remove(net_GetPointer(nethandle));
	#else
	#ifdef NET_USE_ACKNET
		return;
	#endif
	#endif
	#endif
}



So if GSTNet would change its function to accept only handles or ANet changing to entity pointers, you'd have to change it for the whole code only one time. And someone having an ANet License could use it, where someone without could use GSTNet. That increases the potential user count for the libs.

Re: TUST or "The community library" [Re: lemming] #423076
05/23/13 21:41
05/23/13 21:41
Joined: Apr 2007
Posts: 3,751
Canada
WretchedSid Offline
Expert
WretchedSid  Offline
Expert

Joined: Apr 2007
Posts: 3,751
Canada
Quote:
So if GSTNet would change its function to accept only handles or ANet changing to entity pointers

Other people who didn't know about API design also bought "I built my first library and used naming conventions that no one else used (PS: I used tabs for alignment. They call me edgy)".

Seriously, why should I use a library whose author can't even get the pre-processor directives right? I'm not going to lie, this is useless. And I'm not even talking about the issue that you are going with the lowest denominator here. This is just asking for trouble and maintainability problems.


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] #423079
05/23/13 21:51
05/23/13 21:51
Joined: Jul 2001
Posts: 6,904
H
HeelX Offline
Senior Expert
HeelX  Offline
Senior Expert
H

Joined: Jul 2001
Posts: 6,904
@JustSid: I didn't followed this thread enough to know what you are talking about, but I would be interested into what you in particularily mean with those remarks about 1) tabs & alignment and 2) getting pre-processor directives right.

Re: TUST or "The community library" [Re: HeelX] #423082
05/23/13 23:40
05/23/13 23:40

M
Malice
Unregistered
Malice
Unregistered
M



@JustSid just so I don't get belittled on a public forum, can you tell a beginning coder(me) where I can learn these API design rules and the common naming conventions I should know?

EDIT_reply* Thanks JustSid. I'll learn the info.I have a question but will pm or new thread and stop hijacking.

Last edited by Malice; 05/24/13 00:38.
Re: TUST or "The community library" [Re: HeelX] #423085
05/24/13 00:16
05/24/13 00:16
Joined: Apr 2007
Posts: 3,751
Canada
WretchedSid Offline
Expert
WretchedSid  Offline
Expert

Joined: Apr 2007
Posts: 3,751
Canada
Originally Posted By: HeelX
@JustSid: I didn't followed this thread enough

Me neither. I was just commenting about the post above mine.
1) The documentation: Look at the param, it's aligned with two tabs. The problem is that tab width differs on systems, so while indentation is fine using tabs (and the way it should be done), aligning lines is not. Use spaces for that, and the code will show up fine on every machine no matter the tab width.

2) Look at the #ifdef, #else and #endif spaghetti blob there is in the function. It's not only lacking any kind of indentation.

@malice There has been a google TechTalk called "API design and why it matters" (or so). Pretty sure you can find the slides and the talk itself via google. And with naming convention I meant that he uses a naming convention that is neither compatible with Acknex nor either of the two libraries that's getting wrapped there. So now you have three different naming conventions for three libraries. Though to be fair, he appears to be consistent in ignoring the other naming conventions and sticking to his own (which in itself is already a mix of two naming conventions). There is no common naming convention, but the rule of thumb is to stick with whatever the environment you are in uses.


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] #423100
05/24/13 06:30
05/24/13 06:30
Joined: Mar 2012
Posts: 927
cyberspace
W
Wjbender Offline
User
Wjbender  Offline
User
W

Joined: Mar 2012
Posts: 927
cyberspace
If you ask me (i know you did not) but im amazed like that ,that i will cimment ..@justsid not to attack on a personal level but really ? oh cry me a thousand rivers .. You complain about nonsense and thats okay you guys get to choose what you want for the project wich i can agree on is fine to turn down based on whatever reasons but to be frank you sound like a ninny coder ..dude dont make love to the code


Compulsive compiler
Re: TUST or "The community library" [Re: Wjbender] #423101
05/24/13 07:01
05/24/13 07:01
Joined: Mar 2006
Posts: 1,993
Karlsruhe
PadMalcom Offline
Serious User
PadMalcom  Offline
Serious User

Joined: Mar 2006
Posts: 1,993
Karlsruhe
Sid says true things but he cannot put it (socially) into words wink Using tabs for distances between multiple expressions is not regarded as "good design".

Example:

Code:
@param[TAB]nethandle[TAB][TAB]das globale Handle der Entity



Instead you should write:

Code:
@param[SPACE]nethandle[SPACE][SPACE]das globale Handle der Entity



Because spaces look the same on all machines while tabs don't.



Nevertheless, I think lemmings idea is a good one and I'd like to see the solution in TUST.

(BTW what you do there technically is called a Fascade Pattern that hides multiple functions, libraries and versions behind static code. I like it a lot and we use it quite often at wort.)

Re: TUST or "The community library" [Re: Wjbender] #423102
05/24/13 07:01
05/24/13 07:01
Joined: Apr 2007
Posts: 3,751
Canada
WretchedSid Offline
Expert
WretchedSid  Offline
Expert

Joined: Apr 2007
Posts: 3,751
Canada
Originally Posted By: Wjbender
@justsid not to attack on a personal level

Go for it, sticks and stones may break my bones, but words... Nah, I have a pretty big ego, just go for it.

I think good API design is important, I'm not the only one who thinks so (yes, I would also jump from the bridge if my friends jumped from it. Because I would no longer have friends anymore). The problem is, arbitrary API design is going to bite you and your users in the ass at some point, and statements like "what if Anet changed from handles to pointers", simply shows that the one who made that statement has no idea of API design.

Not to mention that shims in general are just asking for trouble. There are a million out there, and the older they get the more broken they become. Look at the _stat() function in the Windows POSIX shim, it's broken beyond recognition because Windows ACL system just doesn't fit on top of the unix groups and user ideology. You are going for lowest denominator here, is that really desirable?

I'm sorry for saying that directly, but what do you want me to do? Pretend like it's super awesome and like baked awesomeness, "but..."? I wrote, and still do, awful code too, and if people didn't tell me, I would never learn.


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] #423103
05/24/13 07:26
05/24/13 07:26
Joined: Mar 2011
Posts: 3,150
Budapest
sivan Offline
Expert
sivan  Offline
Expert

Joined: Mar 2011
Posts: 3,150
Budapest
nearly offtopic sorry: does there any comparison exist in connection with atnet, gstnet and the default 3dgs network package? thanks.


Free world editor for 3D Gamestudio: MapBuilder Editor
Re: TUST or "The community library" [Re: sivan] #423109
05/24/13 08:34
05/24/13 08:34
Joined: Mar 2012
Posts: 927
cyberspace
W
Wjbender Offline
User
Wjbender  Offline
User
W

Joined: Mar 2012
Posts: 927
cyberspace
Agree on alot you say sid , you make good and valid points true , but isint that just a commented line with the tabs ? Really ? I dont get it ..simple comments wit tabs in them is an issue ? I think that could be easily corrected...

As for the technical stuff i wont take you on and no not on a personal level ..


Compulsive compiler
Page 8 of 16 1 2 6 7 8 9 10 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