« first day (2860 days earlier)      last day (2457 days later) » 
00:00 - 21:0021:00 - 22:00

nwp
nwp
00:02
There seems to be a lot missing.
I could need a sql expert right now ...
each of my chunks got a unique x and y... just as a position... im trying to select all the resources and their x and y pos of the chunk they belong to...
SELECT resources.*, x, y FROM resources, chunks where chunk_ID in (SELECT ID FROM chunks where x between 1 and 20000 and y between 1 and 20000) group by resources.ID
but i get the same x and y for all of the resources... even if the chunk doesnt have those positions
 
3 hours later…
02:52
@nwp like what?
Well, I will try to upload it properly. Hold on...
Ok, that one is good!
 
8 hours later…
10:39
@genaray you're also getting way too many results, you're getting resources * chunks results, you need to add an inner join
@KevinvanderVelden thanks for your help ! Any idea how ? Just tried it quick and it tells me that "Not unique table/alias"... weierd..
SELECT resources.*, chunks.x, chunks.y
FROM resources
Inner JOIN resources ON resources.chunk_ID = chunks.ID
FROM resources Inner JOIN resources
ahhh i see... thanks ! :D
Does anyone know anything about collision detection
user92578
yes
10:51
I just was thinking should I use ellipsis or \SAT with convex decomposition
@Tyyppi_77 Do we have any bots here
user92578
yes
@Tyyppi_77 What are they called
user92578
GDSE Meta and Free Internet Points
@Tyyppi_77 What commands do they take
user92578
they don't have any commands
10:52
They're just feedbots
@TheMaskedRebel that depends on your requirements
11:12
@KevinvanderVelden What do they do
0
A: Getting the winding order of a mesh

DMGregoryThere is no way to automatically infer the winding order of a 3D mesh that will work for every possible input. For instance, if I give you the triangle (0, 0, 0), (1, 0, 0), (0, 1, 0) alone with no other context, you don't know whether it's meant to be wound counter-clockwise (so its front faces...

@TheMaskedRebel they post from rss feeds
user92578
@TheMaskedRebel They post new meta posts and questions with bounties
does gamedev have a sandbox
user92578
i dont think so, there's a global sandbox though
@Tyyppi_77 where
user92578
11:25
look it up
user92578
12:18
user92578
Minimap and experimenting with a glitched-look visuals
12:48
Looking good, @Tyyppi_77
user92578
Dashing that uses the glitch look
14:24
@genaray sql in a game? what are you doing with it
if it's something realtime and many times per second, maybe rethink that design choice
if it's actually a fitting choice I'd like to learn why
15:12
@Hakase I just store important data in the certain SQL tables for recovering them after a restart :) For example if the player builded a house... it will be pushed into the SQL table. And once the server restarted it basically loads the certain data sets ;)
nwp
nwp
Usually people use a savefile for that.
Its an mmo... the save files would be huge
nwp
nwp
Smaller than an SQL database.
But harder to manage... also in some cases slower.
nwp
nwp
Wait, why would they be huge? You save a bunch of stats and inventory items. Should be a couple 100 bytes per character. That's basically nothing.
15:17
Thats right... but i dont only store some stats and inventory... its a bit more complicated. I store buildings, chunks, resources, mobs, dropped items and much more.
nwp
nwp
Why?
I mean other games do that too to an extend, but using SQL seems like one of the worst ways of doing it.
Because they are persistent and i heard many games actuall do that... atleast the buildings and dropped items. The resources and mobs will refresh every 6 hours when the player revisits the area... I also check the tables every few minutes... if the player didnt visited a certain chunk in a certain time the resources/mobs in it will get deleted..
I created a lightweight wrapper around WebGL; I'm trying to get some feedback on it github.com/cyclonic-games/picasso/blob/master/readme.md
nwp
nwp
@genaray "the player"? Singular?
Oh sorry... players of course.. many ones :P
nwp
nwp
15:25
For an mmo I would expect that most areas are constantly visited. Dropped items typically disappear within minutes or when you change a level to avoid needing a huge data base.
I feel like you should try to avoid needing that data base instead of defending it.
I think the only thing that belongs in a database for an MMO would be a user's login credentials; their actual data should be serialized and saved on a filesystem, along with your other assets.
But I'm fairly new to game development, so I have no right answers, only guesses
I'm not a fan of saving all the stuff on SQL tables, but I guess you can save more than only credentials. Take a look at eAthena (Ragnarok Online Server) github.com/eathena/eathena/tree/master/sql-files
Honestly i try to defend it a bit... because i cant imagine its that bad xD otherwise my chunks are not constantly visited by players. Its hard to describe... but the world is nearly as big as the actuall earth.
It indeed save a lot more than just credentials. But IIRC, most of data is not important at realtime, but only for logging (money trades, auction trades, etc), keeping start values (which position/map was the player before he left, so we can place him there again when he logs in) and perpetual info (which hat is he wearing, etc)
nwp
nwp
@genaray That's a bug, not a feature.
(that last part)
15:35
@genaray The case here is, if you have data as big as the earth, depending on scale, you probably need a smarter storage than SQL can provide you.
Plain MySQL will give you single-thread locking access, and that won't scale to more than a few hundred (maybe thousand) players
And im too lazy to rewrite most parts of my server... Everytime i read stuff about mmo's ( before i actually started the development ) i read about mysql... sql... INNODB... NO-SQL and all that stuff... so i just started using mysql. But i kinda like it because its that easy to put all that data into tables.
Who even uses mysql willingly anymore?
suppose N players are editing a chunk X, and other K players are needing that resource. It WILL lock.
PostgreSQL or bust
@GustavoMaciel And what else could i use ?
15:38
Cassandra would be my choice if I was going to have a shit ton of throughput, but cassandra is nothing but headache to work with
I dunno, but as I said, eAthena does use MySQL for such things, but it doesnt do more than log-in/log-out and log stuff
@ndugger we share some thoughts bud
@genaray If I were you, I'd keep all my games resources and chunks right in memory. Just offloading to SQL for backup or something like that
In general, though, serializing your objects to binary and saving them to a filesystem is more efficient
And in games, every (nano|milli)second counts
Well... i never thought MYSQL would be such a bad choice... i also heard that eve online uses MYSQL and many more mmo's... Yep i already heard about just keeping it in memory... but i have no idea how i should do the typical querys than... for example looking what resource belongs to what chunk... Mysql does process this in literelly no time...
@ndugger I agree, but that may be harder if your server is living on the cloud and is scalable. You would have to share storage between machines and that most often than not is not worth it
@genaray I bet they do use, but not so often and on the core of their games
@genaray quadtrees, B-Trees, etc
nwp
nwp
@ndugger Do you actually believe that?
15:43
Not to the point of premature micro-optimizations, but if you can get easy wins here and there, yeah
nwp
nwp
I mean especially in games you don't care about every nano or millisecond. You get your 30 or 60 fps and that's good enough. Everything else is wasted effort.
Very valid point
if your game loop is waiting on mysql, something has gone terribly wrong. But if your "save entities" feature is asynchronous, it taking a bit long isn't the end of the world
Well thats exactly what happens in my game... First i generate those resources, send them to the player... and than i push it into the db ( asynchron )
@genaray Then that's already saving it in memory
15:48
that doesn't seem terrible. If it gets too slow, you can always figure out how to do it faster and it doesn't affect the rest of the game
I think the takeaway is that yes, you can continue to develop your game to save to MySQL, but there are suggestions to do it other ways that might help improve performance. Either way, it's your game, you get to do what you want.
@GustavoMaciel What do you mean ?
nwp
nwp
@genaray See if you can somehow skip writing to the db and reading from it again. That should be an easy win in performance.
@ndugger You are totally right... but its often a bit tricky. Some people say MYSQL isnt the best way to go... other ones say its a good way to go... For the first i stick with it... until i reach a point where i need to change xD
MySQL shouldn't even be a choice in 2018; you have access to a plethora of far superior SQL databases
15:52
prove there are superior databases
prove there aren't
different ones have different strengths and weaknesses
you are the one making the claim
burden of proof is on you
you're the one making the claim that I'm making a claim
and that's intellectually dishonest
Calm down :D
15:53
I'm very calm
I'm used to these sorts of arguments
People who say the world is flat for the moon landings were faked always shift burden of proof
Wait the moon landing wasnt fake ? :p
:D
It's not an argument; it was a suggestion based on years of experience. There are many articles out there detailing the performance differences between MySQL and PostgreSQL for example.
eh, it's kind of a wash
we found that for some workloads MySQL perf was actually better
Postgres has better SQL standard support
MySQL had, for a long time, better pooling and HA features, but I haven't used a recent version of Postgres that you didn't have to put behind a bunch of pgpool or pgproxies with so I probably don't have a complete comparison
@genaray If you are already working with your DB asynchronously, then you are already keeping your data in RAM. Where is all these data before it goes through the wires, anyway? :P
nwp
nwp
15:56
@GustavoMaciel What does asynchronously accessing the database have to do with keeping it in memory?
@GustavoMaciel Its my first mmo :D I bet i did many mistakes >.<
Let's suppose he's just enqueuing data, then sending stuff in another thread through mysql
(different conversation thread from Jimmy begins here)
how's not that queue in memory?
2 days ago, by FreezePhoenix
Hey, I use Three.js WebGl and I was wondering, whats the best way to put a button on the screen? Should I draw it on the canvas or should I put an html element or both or what?
@FreezePhoenix I just ran across medium.com/@WolframHempel_82303/… - you may be interested in that article
(/end different conversation thread by Jimmy)
15:58
I mean, that's order of magnitude better than waiting for MySQL on the game loop
nwp
nwp
@GustavoMaciel The queue is, but the database might not. And the queue is just overhead, not the database.
I told him this yesterday
21 hours ago, by Jimmy
your application server should probably also have some kind of in-memory cache of the chunk data so you don't have to roundtrip to the database just to send it to the client?
@Jimmy this is what I'm talking about
Redis used to be fast for stuff like that; not sure what the best caching solution is now, unless you just want to hold it in memory yourself
@ndugger If you already have the data on your program, just going through the hassle of serializing and deserializing it may not be worth the cost, unless you need to access that data from more than one point
Or you need to offload RAM to another machine
16:03
Right; I'm assuming multiple, load-balanced servers
I'd summarize my recommendations, in order of priority as 1) send data from the app server's memory representation instead of from mysql 2) improve the encoding to a non-relational binary blob storage 3) batch database commands so you're not waiting on 20 inserts before updating the database
I never noticed the table lock... is there some way to disable that in mysql =
?
where actually #2 is probably the biggest impact
nwp
nwp
@genaray What happens when 2 players access the same data chunk?
You're getting into "Here By Dragons" territory
you can set the DB to read a versioned row instead of locking to get the most current row
16:06
@nwp Well... at the same time ? ... last time two players jumped right into the same chunk nothing happened... but maybe the querys were fast enough... so they didnt locked
nwp
nwp
I think what bothers me is that the database thing is not really relevant to the game. Making a fun game is difficult. Which database you store data in you can decide later.
I suppose that's true
But we're developers, dammit. We'll argue until our faces are blue
nwp
nwp
@genaray That sounds like you have a very different understanding of "locked" than I do.
it's not the selects that are locking
it's your inserts
and they might be locking for any number of reasons, including your indexes are forcing table scans to insert
@nwp Ahhh... than i missunderstood that.
16:10
You can set your transaction level in your selects to "read uncommitted" to ignore the locks
but then you might just get garbage data read back
since the point of the lock is that the insert transaction isn't finished doing its thing
it's up to you whether "players see arbitrary partial chunks of objects" is better than "the select has to wait for the inserts to complete"
and your inserts are going to keep on having high contention until you stop inserting one gigantic row per block
Hmmm.... well ... thanks :) I need to check that promptly... at some points i actually insert a huge amount of data...
Last chance for a free RPG dungeon crawler C source code (so, ya know, you can try it)
nice
put it on github
nwp
nwp
@Jimmy But microsoft!!11one :shocked:
put it on €ithub
user92578
16:19
I get it's C but C can be clean too, right?
nwp
nwp
Clean no. Cleaner than that yes.
I think C can be pretty clean
nwp
nwp
@TheMattbat999 If you care about code improvements you could try codereview.stackexchange.com
uh oh. microsoft's acquiring github? :(
guys this is like his first C++ program ever don't panic
apparently so
16:22
@nwp oh, no I was intending people to actually play the game (I mean, they will have to compile the code...)
hooopefully they leave it alone to do its good things.
last thing i remember them acquiring was skype and they turned that from one of the best programs around to one that's garbage but grudgingly used because nothing else does video calls as well as it does.
nwp
nwp
Messengers work fine for video calls.
@Jimmy uhhh I just got GitHub, but how fo I actually post something?
@TheMattbat999 create a repository, then add your code to it
16:24
@TheMattbat999 there's a bit of a learning curve unfortunately. You'll have to "init a repo", "commit your code" and then "push it to github"
I don't use the Gibhub UI so I can't really tell you how to do that
nwp
nwp
@doppelgreener At least kakaotalk which admittedly isn't very common outside korea, but whatsapp probably supports it too.
oh yeah, whatsapp does.
nwp
nwp
I would expect that half the results for "whatsapp alternatives" do too.
ok, so, no longer true today :)
@doppelgreener where is the button for that?
16:27
on my profile page i see this
or on the homepage left hand side
nwp
nwp
Take some time to learn github even though it is super annoying and not at all what you care about. Having your editor commit and push to github at the press of a button is worth some pain.
Anyone know a good logging library for modern C++?
(please do not say Boost::*)
nwp
nwp
std::cout
Use std::clog to be cool.
I'm actually using cout and cerr for now, but the verbosity is killing me
nwp
nwp
16:30
Can you make an example of what you have now and what you would like to have instead?
Also I'd like to filter and add a file sink. Could be doing that on my own (would probably take less time than searching the internet for a good lib)
write to syslog :)
@genaray have you tried and compared not using a database vs using a database, I mean
std::cout << "File loaded " << ((const char*)resourceidentifier) << "; vertex count: " << model->vertices->length << std::endl;
debug("File loaded {s}; Vertex count: {}\n", resourceidentifier, model->vertices->length);
nwp
nwp
That C cast is a bug and not std::cout's fault.
16:32
if you just know from somewhere that a database approach for storing map chunks is superior to a custom compact binary format then I'd like to know the details of the game and comparison
@nwp It's not a bug, my resource loader has a identifier template that calcs hashes at compile time, and to get back the string used, there's this thing: constexpr operator const char *() const noexcept { return str; }
@doppelgreener ok, so where do I put code?
why not operator << (std::ostream&) then?
nwp
nwp
^
@TheMattbat999 Are you familiar with Git version control?
16:35
@Jimmy I could actually do that, hmm
@doppelgreener no, not at all.
If not I'll give you a dead-simple method
Ok
I can't even remember life before git
It changed my life
At the top of your repository's Code tab you'll see these buttons. Pick one of those.
If you create a new file, make sure to give the file name the .c extension as well
16:36
@doppelgreener I think those buttons only show up if there is already a file in the repo. I don't recall, though
life before git was a lot of SVN and before that CVS and before that "i hope my hard drive doesn't fail"
Oh, let me check then
wait don't use those buttons they're terrible
@ndugger if the repo is empty there will indeed be a "getting started" screen
@ndugger You are right
16:37
that makes you create files in github's UI
@Jimmy Right now it's just a copy+paste so that's enough
oh, that's true
Shoot, you can't just upload code that way. You need to set up a git repository, such as by using Github's desktop client to do so.
In which case you can just pot it as a gist: gist.github.com
Which is basically like pastebin except you still own the file and can modify it in place.
using their desktop app is extremely simple
Yeah it is
16:39
I'm 100% cli at work, but I like the desktop app when at home and working on my own projects
Not as simple as making a gist though :)
@doppelgreener if you create your repo with "init with a README" checked, that bypasses your UI issue
@Jimmy aha, awesome
nwp
nwp
@GustavoMaciel Maybe fmtlib. I have not used it.
double pointy arrow and red freehand circle
16:41
@nwp thanks
@doppelgreener ok, I put the code in there and made it a public Gist. Now what?
You can link that gist to people and modify it without expiration.
nwp
nwp
Who recommended a gist? That's barely better than pastebin.
16:43
It's definitely better than a pastebin, but I would still use a git repo
I do ask if anyone would try it and tell me what you think!
@nwp Me, I mentioned it as an option. It is better than a pastebin. It does not require learning how to set up a git repository, which is still a good option anyway, but that's up to how much @TheMattbat999 wants to do. (They were doing this at our suggestion anyway, I don't know if "now download and install these things and learn git" is reasonable to push someone to at that point.)
nwp
nwp
Github becomes fun when you have proper IDE integration and have the code automatically built by a CI service and get notified when something goes wrong.
I don't like when my IDE/editor tries to do my git for me; like bish, just let me add and commit my files on my own, thanks
But I love CircleCI in conjunction with git; it's fantastic
fully automated builds and deployments
@doppelgreener it was a lot easier to just to paste that than spend hours to figure out how to use Github on this dinky little phone!
16:46
@nwp Github's so good. I'm even happy using it from the command line.
Thanks tho
@TheMattbat999 Oh, goodness. If you're on a phone then that was probably your only option. @_@
That or the init with a readme
Incidentally, some newbie guides for Git (I figure different ones will work for different people):
- http://rogerdudler.github.io/git-guide/
- https://git-scm.com/book/en/v2/Getting-Started-Git-Basics
- https://product.hubspot.com/blog/git-and-github-tutorial-for-beginners
nwp
nwp
@doppelgreener By "github" you mean "git" here right?
Which brings up an interesting question for me: what would y'all recommend as a good way for someone to learn Git independently?
@nwp Both?
Both are good. :D
16:48
But yeah I got my wires crossed. I'm happy using git from the command line.
but I personally just stumbled through random resources to learn, so I dont' know of a good comprehensive resource
nwp
nwp
I'm not away of anything you can do with github from a command line, assuming "git push" counts as git only.
I learned git cli when I was working with a startup company. It was the most painful learning curve I've gone through, but now that I'm on the other side, I can't imagine writing code without it
@doppelgreener oh.
@nwp Yep, you're right, I done a mistake-up on that message.
16:49
there is a github command line utility somewhere
@Jimmy chances are good there would be...
(but like, surely you just use git at that point)
nwp
nwp
I think I never really use github, it just happens to host the project. If it was silently replaced by gitlab or bitbucket I wouldn't notice.
same
does a command line browser count as a github command line utility?
I've tried using github issues for internal project tracking, but it seems easier to do that in Trello/Asana/JIRA etc
16:51
Github's code review is actually pretty good, when you compare that feature to gitlab. But if you don't use that, then I guess every other git host will do.
oh yeah, its diff tool is pretty nice.
sometimes mainly when you add the secret no-whitespace option
@TheMattbat999 success!
39
A: How to ignore whitespace in github when comparing?

AnthonyOn github, you simply append the w=1 parameter to the URL for it to ignore whitespace. That would look something like: https://github.com/account_name/repo/pull/14/files?w=1

@Jimmy yay! Someone else other than me has played one of my games!
nwp
nwp
> cls: not found
:D
16:53
puts on attachable neckbeard emacs is the best git frontend removes neckbeard
but really tho
uh yeah, I didn't get very far :P
it doesn't crash at least
just shows an annoying message
@nwp system("cls") was to clear the screen at those wonderful "press to continue" things, but I think it is Windows only.
@Jimmy what does it say?
what nwp posted
PRESS ANY CHARACTER TO CONTINUE
sh: 1: cls: not found
Are you starting a new game, or loading an old one?
1. New Game. Previous progress will be lost.
see second line
@Jimmy Oh. Like I told nwp, I tjink it is a Windows specific function meant to clear the screen.
nwp
nwp
Replacing it with clear might work. Not sure actually.
Also, if you are low on HP, sleep after a battle (click 2 and enter over and over until HP is restored)
There are 50 rooms
Also a cheat code that can be easily done to get uber items
nwp
nwp
17:00
@doppelgreener :)
Anyone have any literature regarding the psychology of pricing models, like if you make your game free, less people will play it because of X, or something like that
3
If only there was a site where you could ask a question like this. But eh, it's a list recommendation
@nwp [screaming]
nwp
nwp
@ndugger I vaguely remember that some guy got a nobel prize for describing how increasing the price can make a product appear more desirable.
Right; and I know it works, because I keep buying these damn redbull drinks
17:24
Language.
Heckin redbull drinks
nwp
nwp
If I ever make a site where I can make the rules I will ban offensive people who say things like "Language".
It'll totally go well :D
> please no saying damn on my christian chat room
@nwp that'ed be corruption and would not be tolerated :P you'd lose visitors pretty fast
should be "damned" anyway to be grammtically correct.
17:33
Nothing I do is correct; why start now?
:D
nwp
nwp
@FreezePhoenix Would not be tolerated by people I'd want to get rid of, so it works as intended.
@nwp Stop being silly. I mean the people who let you put up the site.
nwp
nwp
Who would that be?
The service you would be using.
nwp
nwp
17:37
The ISP will shut down my site because I ban people for being offensive? That's silly.
@nwp the problem is they are not being offensive. They are trying to stop people from cussing cursing.
"offensive" is relative
@ndugger speaking of relative... what color is the sky?
nwp
nwp
@FreezePhoenix First telling people which words they can and cannot use is extremely rude. Secondly no ISP in the world will take down a site for that.
@nwp Cursing in public is extremely rude.
17:41
lol, no it isn't
shit
Is this 1950's Utah?
17:53
I don't think so.
hi @FreezePhoenix sorry that you find cursing rude. While keeping in mind most of the other regulars find it acceptable, I'll try to remember and limit my profanity output while you're around
;P thanks for understanding
I don't mind the occasional bit.
Clearly you do mind, or you wouldn't have mentioned it
@ndugger I take no offense, but if you could tone done the profanity around me it would be perfect.
I'm not going to walk on eggshells around you, no
18:05
@ndugger then I shall do my best to contain myself.
18:26
@FreezePhoenix I agree.
thanks :P @TheMattbat999
IMO excessive cussing is just a lack of self control
@FreezePhoenix you are welcome!
I can understand if ya let one slip if something bad happens (e.g. zombie eats friend), but just cussing to be cussing is silly.
Oops...
I fell for that one :|
desktop file configured to look like a folder
When you open those they execute right?
I'm still not sure what It's doing to my computer.
18:48
Just click it. See what happens.
nwp
nwp
Yup. Just run the malware. Don't allow it to gain power over you by altering your behavior. You have a right to click random stuff and no virus in the world can take that from you!
@FreezePhoenix if it was an executable file with a folder icon then yes, it's executing or has executed
Is there no easy user-based application sandboxing in windows? i.e. "run this program but without network or file system access outside its current directory"
nwp
nwp
VMWare/VirtualBox?
Security on modern systems is abysmal, but people like usability more than security.
there is not much sandboxing in windows, no
nwp
nwp
18:58
Unless the security issues cause usability issues I don't think that will change.
running in a VM like NWP suggested is about the only way to sandbox
I know this is probably a little silly, but just delete it!
If it's malware it's already done its thing and has embedded itself elsewhere in the system.
just run norton antivirus; should make things 1000x worse so you'll just forget about the original malware
19:28
Copy/pasting my question from a discrod I'm in...
> With glsl 3, renaming attribute -> in; are they still called attributes, or just generally referred to as an "input" now?
> User-defined input values to vertex shaders are sometimes called "vertex attributes".
I still call them attributes, old habits and whatnot
Interesting
19:47
@Jimmy ever try to get any father within Avelaroar?
The C game?
not too far
I grinded through like 10 rooms and found some swords and bows
20:44
Good. What class are you?
I tried warrior, seemed simple enough to just hit stuff
Remember that STR boost the use of an axe and DEX boost swords, ACR boost bows and POW boost staffs.
Acronyms...
download and run game.html for the game. feedback or bugs reports welcome. criticism welcome.
@FreezePhoenix fyi you could also set up a freezephoenix.github.io domain & set up a page which containst hat game
oh!! i see you already have the domain set up :P
20:56
@FreezePhoenix I can't tell what I'm able to do other than hit end turn
Oops.
Reload, hit end turn once, and show me a screenshot. It should look like this:
Oh, I see now I can click demon names to summon them
@doppelgreener or angels if it's the angels turn
(You should add a cursor:pointer style to things I can click on, to suggest they're clickable)
20:59
@FreezePhoenix Sometimes when I summon a card, the page doesn't update to put it in the summoned column, but it will update once I do anything else
(like summon a different card -- then both cards show up in the summoned column.)
Yeh that's not a bug on my part (I don't think)
I think thats a Vue.js bug.
00:00 - 21:0021:00 - 22:00

« first day (2860 days earlier)      last day (2457 days later) »