Welcome, Guest. Please login or register.

Login with username, password and session length

 
Advanced search

1411511 Posts in 69375 Topics- by 58430 Members - Latest Member: Jesse Webb

April 26, 2024, 03:07:10 PM

Need hosting? Check out Digital Ocean
(more details in this thread)
TIGSource ForumsDeveloperTechnical (Moderator: ThemsAllTook)General thread for quick questions
Pages: 1 ... 54 55 [56] 57 58 ... 69
Print
Author Topic: General thread for quick questions  (Read 135438 times)
qMopey
Level 6
*


View Profile WWW
« Reply #1100 on: June 23, 2017, 05:55:34 PM »

Just read the whole naming discussion.


This is one of the things I like about C#. There is an official standard for naming etc and it's pretty much used everywhere so you don't have to have these silly discussions about how to use a language.

Only really works though because MS backs C# with Visual Studio and those Microsoft Dollars $$$.
Logged
BorisTheBrave
Level 10
*****


View Profile WWW
« Reply #1101 on: June 24, 2017, 12:32:59 AM »

Imho the larger the standard library, the more consistent naming conventions is.
Logged
InfiniteStateMachine
Level 10
*****



View Profile
« Reply #1102 on: June 24, 2017, 10:25:14 AM »

Just read the whole naming discussion.


This is one of the things I like about C#. There is an official standard for naming etc and it's pretty much used everywhere so you don't have to have these silly discussions about how to use a language.

Only really works though because MS backs C# with Visual Studio and those Microsoft Dollars $$$.

Yup. That's one the benefits when you have a strong single force driving a standard. I don't see how visual studio comes into play with that argument though. What do you mean?

Contrast that with a more open developed standard like C++. When I think of all the hours I've seen people waste on arguments like m_ vs _ .......... Sad

At least they have some standards like MISRA, orthodox etc but I've never worked at a place where they were used.


EDIT : I don't have much python experience but is there not a pretty hard standard for python? I feel like on the few projects I worked with python my superiors would always make me adhere to "idiomatic python"

Here's the standard btw https://docs.microsoft.com/en-us/dotnet/csharp/programming-guide/inside-a-program/coding-conventions
« Last Edit: June 24, 2017, 10:36:41 AM by InfiniteStateMachine » Logged

oahda
Level 10
*****



View Profile
« Reply #1103 on: June 24, 2017, 12:54:24 PM »

At my last (current, but probably not for much longer) workplace the rule was basically just "be consistent within your own files, but you don't have to match your colleagues exactly".
Logged

oahda
Level 10
*****



View Profile
« Reply #1104 on: June 25, 2017, 04:52:53 AM »

Read just now that C doesn't have references, but that those were introduced in C++. Only pointers. Is that true (or maybe used to be true but no longer is in the latest versions of C)?
Logged

JWki
Level 4
****


View Profile
« Reply #1105 on: June 25, 2017, 05:37:44 AM »

Read just now that C doesn't have references, but that those were introduced in C++. Only pointers. Is that true (or maybe used to be true but no longer is in the latest versions of C)?

It is true. Why does that surprise you?
Logged
oahda
Level 10
*****



View Profile
« Reply #1106 on: June 25, 2017, 06:01:49 AM »

It just "felt" like one of the things inherited from C for some reason.
Logged

JWki
Level 4
****


View Profile
« Reply #1107 on: June 25, 2017, 08:33:48 AM »

It just "felt" like one of the things inherited from C for some reason.

Nah it's part of the redundancies that c++ added.
Logged
Photon
Level 4
****


View Profile
« Reply #1108 on: June 26, 2017, 06:50:33 AM »

So I'm hoping to put out a beta/demo version of my current project soon, and I was wondering what one might use for packaging it up. That is, in particular, I want to protect the game assets so that they aren't just sitting out there for anyone to copy and use. I'm totally new at this sort of thing so I'm not sure where to start or if I have to make some sort of concession in the actual game code itself for this.
Logged
Polly
Level 6
*



View Profile
« Reply #1109 on: June 26, 2017, 07:30:07 AM »

So I'm hoping to put out a beta/demo version of my current project soon, and I was wondering what one might use for packaging it up. That is, in particular, I want to protect the game assets so that they aren't just sitting out there for anyone to copy and use.

One easy way to go from a folder containing PNGs to something that's a bit more difficult to copy for the average-Joe is to concatenate them into a single file with a address LUT stored at the beginning of the file. Alternatively you can ZIP ( and encrypt ) them, but this would require adding a ZIP library / DEFLATE decoder to your binary and adds a bit of loading time for decompression.

Anyway, just keep in mind that anything that ends up in memory can be intercepted, so when somebody wants to copy assets .. they'll find a way.
Logged
oahda
Level 10
*****



View Profile
« Reply #1110 on: June 27, 2017, 01:38:11 PM »

Seems the old SDL_net for the old SDL worked as a standalone, but SDL_net 2.0 requires SDL 2.0 itself, is this true?
Logged

ferreiradaselva
Level 3
***



View Profile
« Reply #1111 on: June 27, 2017, 03:01:01 PM »

I think it was a separated project even on SDL 1.0 (https://www.libsdl.org/projects/SDL_net/release-1.2.html). Just like SDL mixer.

So I'm hoping to put out a beta/demo version of my current project soon, and I was wondering what one might use for packaging it up. That is, in particular, I want to protect the game assets so that they aren't just sitting out there for anyone to copy and use.

One easy way to go from a folder containing PNGs to something that's a bit more difficult to copy for the average-Joe is to concatenate them into a single file with a address LUT stored at the beginning of the file. Alternatively you can ZIP ( and encrypt ) them, but this would require adding a ZIP library / DEFLATE decoder to your binary and adds a bit of loading time for decompression.

Anyway, just keep in mind that anything that ends up in memory can be intercepted, so when somebody wants to copy assets .. they'll find a way.

ZIP is the good to go, imo. I use password protected ZIP, which is good enough to stop just the majority of players to modify stuff and change gameplay. @Photon If you are using C or C++, Minizip is a good library for that.
Logged

oahda
Level 10
*****



View Profile
« Reply #1112 on: June 27, 2017, 03:31:04 PM »

I think it was a separated project even on SDL 1.0
It was indeed, but it doesn't seem to be in 2.0, that's the thing. :c

From the website:

Quote
Requires:
   The latest stable release of SDL 2.0
Logged

ferreiradaselva
Level 3
***



View Profile
« Reply #1113 on: June 27, 2017, 04:06:00 PM »

Ohh, now I understand what you meant! Sorry. Yep, that seems to be the case, SDL2-net requires SDL2 (at least tested here on Linux).
Logged

ferreiradaselva
Level 3
***



View Profile
« Reply #1114 on: June 27, 2017, 06:26:34 PM »

Any of you nerds ever used libuv (https://github.com/libuv/libuv)?

My current option for network (in pure C) is ENet, but ENet is only for UDP and only support IPv4 (and all efforts to make it support IPv6 seems to fail).

I found libuv, which seems to provide all that (and more), but I never used. Any bad experiences? Good ones?

Edit:

Ok, the unicorn tyrannosaurus rex logo does justice to what libuv is. Not just does the above (UDP/TCP IPv4/IPv6), but also manages threads (tinycthreads, bye bye), a bunch of I/O stuff. And the library isn't even bulky (which I thought it would be).

There's this amazing documentation to learn from: https://nikhilm.github.io/uvbook/index.html

« Last Edit: June 27, 2017, 07:44:14 PM by felipefsdev » Logged

JWki
Level 4
****


View Profile
« Reply #1115 on: June 28, 2017, 01:59:19 AM »

Looks nifty. Still a bit to bulky for my taste but could be nice for like Tools.
Logged
oahda
Level 10
*****



View Profile
« Reply #1116 on: June 28, 2017, 02:22:32 AM »

I'll still use SDL_net for the game end since I'm using SDL anyway (and SDL_net claims to work on all platforms SDL 2 supports, which hopefully also includes the mobile platforms) but it would've been nice to use it in the tools end as well without bringing SDL which I wouldn't be using there in as well. Sad But I guess it'll be simple enough so I guess it won't be too much work to use a different lib in the tools.
Logged

JWki
Level 4
****


View Profile
« Reply #1117 on: June 28, 2017, 06:56:43 AM »

I'll still use SDL_net for the game end since I'm using SDL anyway (and SDL_net claims to work on all platforms SDL 2 supports, which hopefully also includes the mobile platforms) but it would've been nice to use it in the tools end as well without bringing SDL which I wouldn't be using there in as well. Sad But I guess it'll be simple enough so I guess it won't be too much work to use a different lib in the tools.

TCP communication between game and tools?
Logged
oahda
Level 10
*****



View Profile
« Reply #1118 on: June 28, 2017, 07:01:02 AM »

Yeah. I've relatively little experience with networking so whatever you'd recommend, if TCP is a bad choice. I've only ever done a little bit of TCP/IP and RPC stuff.
Logged

Photon
Level 4
****


View Profile
« Reply #1119 on: June 28, 2017, 07:15:02 AM »

@Photon If you are using C or C++, Minizip is a good library for that.
I should have been more specific. I'm using Haxe and OpenFL. It has a C++ export to Windows but I'm not sure if that would work with what you are suggesting.
Logged
Pages: 1 ... 54 55 [56] 57 58 ... 69
Print
Jump to:  

Theme orange-lt created by panic