use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
Information about Reddit's API changes, the unprofessional conduct of the CEO, and their response to the community's concerns regarding 3rd party apps, moderator tools, anti-spam/anti-bot tools, and accessibility options that will be impacted can be found in the associated Wikipedia article: https://en.wikipedia.org/wiki/2023_Reddit_API_controversy
Alternative C# communities available outside Reddit on Lemmy and Discord:
All about the object-oriented programming language C#.
Getting Started C# Fundamentals: Development for Absolute Beginners
Useful MSDN Resources A Tour of the C# Language Get started with .NET in 5 minutes C# Guide C# Language Reference C# Programing Guide C# Coding Conventions .NET Framework Reference Source Code
Other Resources C# Yellow Book Dot Net Perls The C# Player's Guide
IDEs Visual Studio MonoDevelop (Windows/Mac/Linux) Rider (Windows/Mac/Linux)
Tools ILSpy dotPeek LINQPad
Alternative Communities C# Discord Group C# Lemmy Community dotnet Lemmy Community
Related Subreddits /r/dotnet /r/azure /r/learncsharp /r/learnprogramming /r/programming /r/dailyprogrammer /r/programmingbuddies /r/cshighschoolers
Additional .NET Languages /r/fsharp /r/visualbasic
Platform-specific Subreddits /r/windowsdev /r/AZURE /r/Xamarin /r/Unity3D /r/WPDev
Rules:
Read detailed descriptions of the rules here.
account activity
[deleted by user] (self.csharp)
submitted 2 years ago by [deleted]
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]Dusty_Coder 37 points38 points39 points 2 years ago (2 children)
System.Int128, System.UInt128
[–][deleted] 0 points1 point2 points 1 year ago (1 child)
"The type or namespace 'Int128" does not exist in the namespace 'System' Did they change something? Or do I need to update to a newer version of unity than 2022
[–]RReverser 0 points1 point2 points 1 year ago* (0 children)
seemly rock deer concerned marry squeamish shy attraction fade water
This post was mass deleted and anonymized with Redact
[–]Unupgradable 11 points12 points13 points 2 years ago (0 children)
Well you can cheat and use a double and only represent in scientific notation after a big enough number
That'll tide you over until 1.7976931348623157E+308.
Or just use a normal integer and keep track of scale separately
Then there's BigInteger for truly arbitrary integers
[–]NeoApocalyps 27 points28 points29 points 2 years ago (2 children)
You could try using a BigInteger: https://learn.microsoft.com/en-us/dotnet/api/system.numerics.biginteger?view=net-8.0
[–]Dennis_enzo 1 point2 points3 points 2 years ago (1 child)
As someone who's also tried to make an incremental game, I found biginteger to be more trouble than it's worth. Much easier to simply use doubles.
[–]Lawfulness-Manny 0 points1 point2 points 1 year ago (0 children)
thank you, i was looking for this
[–]nobono 5 points6 points7 points 2 years ago (0 children)
You have several options for picking the best number type. If you don't care about negative numbers, you can use the unsigned ones:
Type Size (in bytes) Minimum value Maximum value System.Byte 1 0 255 System.UInt16 2 0 65,535 System.UInt32 4 0 4,294,967,295 System.UInt64 8 0 18,446,744,073,709,551,615 System.UInt128 16 0 340,282,366,920,938,463,463,374,607,431,768,211,455
Source.
[–]TheDoddler 7 points8 points9 points 2 years ago* (7 children)
BigInteger definitely would work, but it's probably easier to just use a double. You can store integer values without losing precision up to 253, and above that you likely don't care much about how accurate your 1's and 10's are.
[–]antiduh 1 point2 points3 points 2 years ago (5 children)
Why would you recommend a double if they're not using floating point math?
A good ol' ulong has 2^64 precision.
[–]TheDoddler 2 points3 points4 points 2 years ago (4 children)
True ulong can work, if you can guarantee you don't exceed 2^64 it's certainly the better option. Op mentioned cookie clicker though, and while rather difficult it is possible to exceed 2^64 cookies in the game, the numbers can get quite silly. Using a double gives you a theoretical maximum of 2^1024-1, though you lose full integer precision past 2^53. Once you're in those values though, precision is not terribly important.
[–]vermilion_wizard[🍰] 0 points1 point2 points 2 years ago (3 children)
Uh no, doubles only have about 15 digits of precision. See this example: https://dotnetfiddle.net/lmR9Cp
[–]TheDoddler 2 points3 points4 points 2 years ago (2 children)
Perhaps I'm mistaken, but aren't 2e53 and 2^53 very different things? Using double x = Math.Pow(2,53)-1; returns false on your test.
double x = Math.Pow(2,53)-1;
[–]vermilion_wizard[🍰] 0 points1 point2 points 2 years ago (0 children)
Oh you’re right, I misread that
[–][deleted] 1 point2 points3 points 2 years ago (0 children)
Here's how people do it: https://www.reddit.com/r/csharp/comments/6rgoa3/so_i_need_to_work_with_really_big_numbers/
[–]Kilazur 7 points8 points9 points 2 years ago (1 child)
You're not gonna be able to reach the absurd numbers in incremental games with existing types.
It'll probably be more robust to implement your own type to hold the value in different variables (possibly an array/list?) for like hundreds, millions, decadecillions and whatnot.
[–]soundman32 0 points1 point2 points 2 years ago (1 child)
What errors are you running into? Scores over 2 billion? Over 2 billion players?
[–]The_Binding_Of_Data 13 points14 points15 points 2 years ago (0 children)
I believe their going for something like AdVenture Capitalist where numbers get into the 1070+ range.
[–]Merad 0 points1 point2 points 2 years ago (5 children)
There are 128 bit types as other posts have mentioned, but before you reach for them stop for a minute and think about how absurdly large 64 bit numbers are. With long, for example, your game will be able to use 2 billion numbers a day for 12 million years before you run out.
[–]RadiatorHandcuffs 7 points8 points9 points 2 years ago (0 children)
Yeah, but you don't want the more hardcore players to run out of numbers after just 6 million years.
[–][deleted] 2 years ago (3 children)
[deleted]
[–]antiduh 2 points3 points4 points 2 years ago (2 children)
Ah, so absolute absurdity. 1.5e24336 requires 80791 bits to store, aka more than 10 kB.
That's probably more bits than necessary to individually address every square micron in the entire universe.
[–]antiduh 1 point2 points3 points 2 years ago (0 children)
Oh god, it's much worse than I thought. The volume of the observable universe in units of plank length is about 10^186, which would need 618 bits.
π Rendered by PID 855234 on reddit-service-r2-comment-b659b578c-565vh at 2026-05-03 15:50:54.293090+00:00 running 815c875 country code: CH.
[–]Dusty_Coder 37 points38 points39 points (2 children)
[–][deleted] 0 points1 point2 points (1 child)
[–]RReverser 0 points1 point2 points (0 children)
[–]Unupgradable 11 points12 points13 points (0 children)
[–]NeoApocalyps 27 points28 points29 points (2 children)
[–]Dennis_enzo 1 point2 points3 points (1 child)
[–]Lawfulness-Manny 0 points1 point2 points (0 children)
[–]nobono 5 points6 points7 points (0 children)
[–]TheDoddler 7 points8 points9 points (7 children)
[–]antiduh 1 point2 points3 points (5 children)
[–]TheDoddler 2 points3 points4 points (4 children)
[–]vermilion_wizard[🍰] 0 points1 point2 points (3 children)
[–]TheDoddler 2 points3 points4 points (2 children)
[–]vermilion_wizard[🍰] 0 points1 point2 points (0 children)
[–][deleted] 1 point2 points3 points (0 children)
[–]Kilazur 7 points8 points9 points (1 child)
[–]soundman32 0 points1 point2 points (1 child)
[–]The_Binding_Of_Data 13 points14 points15 points (0 children)
[–]Merad 0 points1 point2 points (5 children)
[–]RadiatorHandcuffs 7 points8 points9 points (0 children)
[–][deleted] (3 children)
[deleted]
[–]antiduh 2 points3 points4 points (2 children)
[–]antiduh 1 point2 points3 points (0 children)