frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Open in hackernews

Ask HN: How to design DB schema for multiplayer exp/level system?

1•hnroo99•10h ago
I'm building a turn based multiplayer game where players can earn exp from playing matches and level up (levels will mainly be used for aesthetic purposes, although I might add restrictions such as "you must be level x to edit room names").

This is my first time designing an exp/leveling system though so I'm not 100% sure how to approach the database design. Is it best practice to store both exp and level? Or is it better to store only exp and derive level?

The latter sounds potentially nicer if I want to adjust the level curve later, although that implies that all users could see their level change hm...

Comments

cowboylowrez•9h ago
I'd store levels anyways, because each time tables change, you're going to have to determine what to store so you are writing the calculation code anyways in case it turns out storing wasn't a good idea, so you can fall back to deriving. either way you have to code the derivative value calculator. the reason I'd store tho, is that once someone levels up, I think it's be an odd expectation to be demoted somehow but then again depends on the game I guess. I get demoted back to moron often when I'm playing chess haha still they're not going to derive my rating each time so they store it.

Whenwords: A relative time formatting library, with no code

https://github.com/dbreunig/whenwords
1•todsacerdoti•1m ago•0 comments

Mossad urges Iran protests, says agents present

https://www.jpost.com/middle-east/iran-news/article-881733
1•ParentiSoundSys•3m ago•0 comments

21 years of IDE evolution in one chart (2004 – 2025)

https://twitter.com/willwangcc/status/2010259528391307510
1•will_wang•3m ago•0 comments

Annote: A Turing complete language using only Java annotations as its syntax

https://github.com/kusoroadeolu/annote
1•kushv•4m ago•1 comments

Things I've quit doing at my desk

https://justinjackson.ca/i-quit-my-desk
1•Tomte•4m ago•0 comments

A Unique Performance Optimization for a 3D Geometry Language

https://cprimozic.net/notes/posts/persistent-expr-memo-optimization-for-geoscript/
1•Ameo•12m ago•0 comments

Markdown Is a Disaster: Why and What to Do Instead

https://www.karl-voit.at/2025/08/17/Markdown-disaster/
1•todsacerdoti•12m ago•0 comments

Elon Musk says X's new algorithm will be made open source next week

https://www.engadget.com/big-tech/elon-musk-says-xs-new-algorithm-will-be-made-open-source-next-w...
1•O1111OOO•12m ago•0 comments

I hope to help you evaluate your GenAI App

https://github.com/shihongDev/evalyn
1•shloveai•21m ago•1 comments

After 20 Years, This Scientist Proved Birds Can Talk and Use Grammar [video]

https://www.youtube.com/watch?v=jmys2abx4co
1•theogravity•22m ago•0 comments

What do you think about a "linter" for code logic?

https://commitguard.ai
1•moshetanzer•23m ago•1 comments

Removing Tahoe's Unwanted Menu Icons

https://weblog.rogueamoeba.com/2026/01/10/removing-tahoes-unwanted-menu-icons/
1•dbushell•24m ago•0 comments

Gixy-Next: Nginx Configuration Security and Hardening Scanner

https://gixy.io/
1•mmsc•28m ago•0 comments

Debian Taco – Towards a GitSecDevOps Debian

https://blog.josefsson.org/2026/01/09/debian-taco-towards-a-gitsecdevops-debian/
1•pabs3•29m ago•0 comments

Netlify Is Down

https://www.netlifystatus.com
1•forgingahead•34m ago•0 comments

Linus is vibe coding

https://github.com/torvalds/AudioNoise
6•dhruv3006•37m ago•2 comments

80% of Rye in 20% of the Time [1/3]

https://ryelang.org/blog/posts/learn_80_rye_in_20_time_code/
3•todsacerdoti•40m ago•0 comments

Notes on Enterprise Architecture from Doing the Job

https://github.com/justinamiller/EnterpriseArchitecture
2•maverickeye•43m ago•1 comments

Instagram breach exposes data of 17.5M accounts

https://twitter.com/H4ckmanac/status/2009870969998049400
3•thunderbong•43m ago•0 comments

Côme, une ville italienne dénaturée

https://www.lemonde.fr/m-le-mag/article/2026/01/02/en-italie-la-ville-de-come-denaturee-pour-deve...
1•altro•44m ago•0 comments

A new type of microscope lets scientists observe life unfolding inside cells

https://www.thebrighterside.news/post/a-new-type-of-microscope-lets-scientists-observe-life-unfol...
2•01-_-•44m ago•1 comments

Practical .NET Coding Guidelines We Use Internally

https://github.com/justinamiller/DotNet-Coding-Guidelines
1•maverickeye•45m ago•1 comments

Steam Machine price leak shakes the console market

https://comuniq.xyz/post?t=696
3•01-_-•45m ago•2 comments

Iranian regime tries to shut down Starlink

https://www.timesofisrael.com/iran-appears-to-jam-starlink-after-shutting-down-comms-networks/
35•ukblewis•53m ago•16 comments

Backing the Backslash

https://shadycharacters.co.uk/2025/03/backing-the-backslash/
1•everybodyknows•59m ago•0 comments

Elon Musk on Tesla's summon – LA to NY in 2 years (2016 – 10 years anniversary)

https://twitter.com/elonmusk/status/686279251293777920
2•TheAlchemist•1h ago•0 comments

Show HN: Keyboard-first diagram editor in Rust with fzf-style command palette

https://github.com/joonho3020/sansuyu
1•archipelago123•1h ago•0 comments

Biological and artificial consciousness: A case for biological computationalism

https://www.sciencedirect.com/science/article/pii/S0149763425005251
5•galaxyLogic•1h ago•0 comments

We Put Claude Code in Rollercoaster Tycoon

https://ramplabs.substack.com/p/ai-plays-rollercoaster-tycoon
3•gwintrob•1h ago•0 comments

Words

https://justinjackson.ca/words.html
1•Tomte•1h ago•0 comments