« first day (839 days earlier)      last day (4475 days later) » 
00:00 - 20:0020:00 - 22:00

00:00
@ZackTheHuman yea I saw it, also thanks for the lnk todd
JavaScript Objects

An object is delimited by curly braces. Inside the braces the object's properties are defined as name and value pairs (name : value). The properties are separated by commas:

var person={firstname:"John", lastname:"Doe", id:5566};



hm... wonder if I should try that for my sharedObject class...
or if I should make another
basically, I have made this:
sharedObject = SharedObject.getLocal("sadMadScore");
which stores all the data from mmy game into thee user's hard drive
and I have been using it for everything
for the high scores, for the currency, for the character's speed, for the characteer's size, and more will keep piling up as I add code to the store's buttons..
am I doing it wrong? I mean... I have done most of it following a tutorial, but everything from the currency to the shop, the sharedObject containing more than just the high score... that has all been made from what I have experimented with, so there is a chance it migt not be the best way to aproach it...
any opinions?
The answer would be it depends
You are right that its going to keep piling up
@ToddersLegrande yea it will but I think I have to do something like that to make some "upgrades" in the game... or is there another way?
@Madcowe It sounds like you just need a storage format? Why not use JSON since it's basically serialized JavaScript.
silly question, there shouldnt be... it still needs to be saved
In general you want to separate out things into objects and pass the objects around as needed. There are many patterns that can be used to accomplish this and which one is "right" is up for debate
@Madcowe I honestly don't know much about deployable upgrades, but to "upgrade" your code - this could become a mess the bigger and bigger your project gets if you don't have something solid in place
00:07
another thing I thought is if I should make 2 classes, one for scores and currency, and another for sped and etc
Thats a big question
All in all the program design comes down to what works best for you
well... should I keep doing it like this and if a problem comes I try to ssee how to fix it? or think I should start looking?
Again, its whatever works best for you :P
I hate to say if what you are doing is working its good enough, but really it is that way
You just have to know that if you continue down a path that isn't very good, its going to become increasingly difficult to change and maintain
alright then, thanks a lot! I will keep coding it and IF I think of a better way of doing it I will, and if problems come, I will ask again =)
Unfortuntely I can't get too specific with answers here because there are literally limitless ways you could go about "doing it right"
All of which someone will tell you its the wrong way to do it and their way is better
00:12
it is a funny thing about programming:
-if your code doesnt work: God knows why!
-if your code works: God knows why!
@ToddersLegrande true
well brb, gonna go get noms
00:33
did anybody know if there is a photoshop filter equivalent of FXAA method used in games ? (which works using only pixel information thus should possible in ps)
00:44
no idea
Find edges into an alpha channel, load it as a selection, then gaussian blur? That's basically the process..
01:11
cya guys, time for bed
 
2 hours later…
02:49
hey every1, i have an engine class in c++ that when run either creates a server or client. i have some engine functions that iw oudl like to call in the server/client, but dont want to store a pointer back up to the engine. would it make sense for the server and client to inherit from the engine?
03:30
storing a pointer is usually the better way
but then that means the engine and client for exmple will be strongly coupled, because the engin creates a client and the client has to store a pointer to the engine that created it.... thats bad right?
"strongly coupled by composition" is still much weaker coupling than inheritance
or you mean, the user has to know this
in which case, you can hide the engine constructors behind some method that just gives "makeClientEngine" or "makeServerEngine"
i...........................c
the biggest issuei have right now is that from the client, you can create a new server in its own process.. like if you decided to host a game for example
but im not sure how to do that from the client... i would have to go back up to the engine and request it to be done right?
you can think of a full standalone single player as basically being one server + one client that are just holding hands
"requesting a server" is something like exposing a network interface to something you already have internally
03:45
my design was to start a client only, because if you want to join a dedicated server, i dont want to have a local server running all the time because it would waste resources... or can i make the server process sleep somehow and not take away any performance when im connecting the client to a remote server?
I don't mean you have to run the server as a separate process
i mean it was my choice to do so....
but what i wanted to know is if its possible to run say a client and a server process, but now have the server process eat up resources?
because if the server process doesn't eat up resources then i hav no problem having it running all the time while i play on some remote server...
what resources would it eat up?
well it will have its own continuous loop running eating up cpu i would guess
but it would have nothing to do
I presume the server process has some Start() method that you call to initialize "hosting a game" and some Stop() method to you call to dispose of everything.
03:54
o yes that is true
while your player is in the menus before jumping "into the real game"
your server shouldn't be doing anything
or you could start the server immediately but then stop it when the client joins a remote server
i wnat the server to pretty much identical to a dedicated server though... the dedicated server would just loop continuously looking for connections.. if my server isnt running then i have to figure out someway to start it before i can send connection packets to it right? this is assuming i put it in a seperat eprocess
the client just says "I'm going to play with someone else, you should take a nap and unload all your resources"
the reason being identical is so i dont have to change any code
"looping continuously looking for connections" isn't really that expensive
03:56
but it is not limited by any kind of sleep or anything... so it will run as fast as possible right? eatup allmy cpu?
especially since most "listen" type interfaces have aome kind of built-in timespan to wait
but i mean in a real game scenario the server will be doing all of its serving duties so it isn't sitting waiting for connections... it just polls for any connection requests when it has time to
no, it will not run as fast as possible. for example, the last parameter in select is a timeout value
couldn't you run the poller in another thread?
thats what i was trying to avoid lol
the loop for the server is like
while (true)
{
peek for any connection requests.. none? ok

process...
process..

}
so it doesnt wait at all it just checks to see if any request came in since the last time it checked
well
I wouldn't write it that way
but even if you do
while(true) {
    if (this.currentClientCount == 0)
        peek(50ms timeout)
    else
        peek(0ms timeout)

    process()....
}
04:01
hm
that sounds like a good idea
or, in your client, when you connect to a remote server, first you connect to your local server, send a "standby" command, and then go off and play
i will try doing that but just curious what way would u write it?
ok but then when my server gets a standby command how can i be sure that it is the local client that sent it and not a rogue user?
well, I'd use a separate thread ;) easier to reason about that way
lol
i will make a branch for both approaches
and then wheni finish both branches ill flip a coin
regarding anti-rogues: well, because your server has some method of authentication
04:04
ok good call
also, any kind of sanity check, such as "I will not standby if there's any players currently playing other than the player who ordered standby"
good idea
well thank you for the help youve given me a couple ideas on how to get started with this solution
how do i upvote your messages?
no prob
there's no reputation in chat
o :(
04:20
There's no numerical reputation in chat.
Reputations are still acquired in the usual way, though. See the comment about Snake, which is still starred in the sidebar, three weeks later. ;)
05:13
Grr. I have a persnickety problem that only happens when I'm not using the debugger...
05:24
@RavenDreamer Interesting; what happens?
 
3 hours later…
08:03
Mornings.
Howdy howdy
08:26
hooooodiiiiooooooo
08:43
Did anybody mentioned "morning" yet?
@Mr.Beast me
why?
i did something wrong mister?
oh, damn, I thought I would be incredibly clever and witty. but it appears someone else already though of "morning".
...
Okay...
Actually i don't what time it is for all of you guys so when i say "Mornings", it's mostly because , where i live, it's the morning.
09:05
It's always morning when someone enters the channel. UGT.
09:15
@TrevorPowell haha. I was not aware of this x)
you are now. :D
09:42
Yes i guess. I won't wonder anymore if i look stupid when i randomly say "Mornings!"
that's the great improvement in my internet user life
09:56
I wonder which exact moment was it when this suddenly was considered a problem: gamedev.stackexchange.com/questions/44131/…
by default, all data is accessible from everywhere
@snake5 maybe not in his pattern.
it seems like he is overcomplicating things.
indeed
10:12
Lot of people like to do super complex things will high level abstraction, modularity etc.
But sometimes i think they just go (or want to go) too far.
Over-thinking or i don't know..
Most games don't need a lot of complexity. :)
I mean like i don't understand people trying to think a lot of something flexible, reusable, with lot of generic features etc. It's great but i don't understand them, i can't do that, if i want to do a game, i do a game.
Not a framework, not an engine or whatever.
I don't mean i don't do reusable code or think a bit before start developing... But, i don't spend too much time on it.
Maybe not enough, but at least i made few GAMES.
And i'm not working on en engine since 5 years and have not made any game.
I've been working on my engine for four years. ;)
@TrevorPowell that's gay :)
Joking.
Maybe you are more into doing engine than games :)
Well, I've released about ten little games in that time, too. :)
10:19
Ha.
You work hard!
Able to work on an engine and few games...
Do you have a lot of free time? :)
Yeah me too... Maybe you are just efficient :)
i wish i'd be efficient on my coding session.
But the internet is an awful source of distractions.
I usually steal three or four hours on the weekend. And I might get almost that much in the evenings, during the week.
Yeah, internet is terrible for productivity.
I work all day long programming for a company.
So back home the evening, it's hard do to it again.
Even on my cute game.
Mm, same for me.
10:25
@TrevorPowell your engine? got some screenshots/webpage?
@snake5 if i remember well you do have an engine too, don't you?
someone that you qualified as really low level and not ready for being released
am i wrong?
@snake5 "Engage in a violent orgy of explosions[...]" :)
sounds fun
well, I suppose it is since I won a split 1st place in a local gamedev contest (6 games were submitted to it) :D
@snake5 haha
i love topdown games.
And winning against five other games is a great victory!
4.5, technically
:D
yep x)
Where do you live? What do you mean by "local gamedev contest"?
11:13
I live in Latvia, local=organized by a few local enthusiasts in the country's gamedev forums
@snake5 Just read the comments, have you tried using ANGLE?
(the comments on your page)
@Mr.Beast heh, where?
sgengine
ah
why should I use angle?
I don't want to emulate the GL API on Direct3D
it's a crappy API
It would be a pity to restrict yourself to MS platforms.
11:53
I don't
as a matter of fact, I originally had an OpenGL 2/3 rendering system implemented there
I moved away from it because it was a pain in the ass to support
thought I'd much rather work on D3D first and just fix up the GL port later
@TrevorPowell heh, is that all yours? for some reason I thought you were doing that for some company
well, with ANGLE you would have one code-base which is often better than half-assing some ports afterwards.
no, I'd have one codebase and some fake implementation under it
not cool
I'd much rather just use plain OpenGL than that
because it works as expected perhaps?
ANGLE is just another OpenGL implementation, you are writing plain OpenGL. You are just linking it to a different implementation.
11:58
...
no, it isn't
to prove this, just render a fullscreen quad with 0-1 texcoords and look at how the texels align
OpenGL is a API, nothing more.
no, it's a specification
a specification for a API
and ANGLE follows that specification
not exactly
it specifies some bits of the pipeline too
D3D cannot and will never strictly follow that
and I don't need another source of misunderstanding and confusion
especially since I know both D3D9 and GL2 quite well
12:23
@snake5 Yes, that's all me. :)
@TrevorPowell it looks awesome :)
Thanks. :)
@TrevorPowell you are working on a MMO? : )
@nathan No, I'm working on a game about MMOs. It's not actually an MMO.
just found this x)
12:30
Yep. I'm working on the next version of that. :)
Looks great. I think i'll give it a try as soon as i'm home.
Is there any big difference between object.property and object[property] ?
I would think that the latter is an array and might be more flexible for some stuff because of it, but I only just learned about these
JavaScript*
latter is more flexible but nothing to do with arrays
less restrictions on names
kk :) You mean no javascript syntax restrictions ?
probably
well, I'm not 100% sure but it should be logical to support all kinds of strings as keys
 
1 hour later…
13:52
@ZackTheHuman I'm rendering cubes. When the cubes are adjacent to each other, any interior faces shouldn't be rendered (because they're inside the polygon and won't ever be seen, anyway. When I add cubes to my scene in a particular order, one of the cubes does not properly turn off its interior faces. When I step through the same placement with the debugger active, the cube properly turns off its interior faces.
14:25
ohio
@RavenDreamer is each cube turning off its faces individually? could you just consolidate all cubes into one mesh and strip inside faces there?
14:41
@TrevorPowell Do you have anything playable yet? I remember getting excited about your game quite a while ago
15:00
@ZackTheHuman @melak47 I just found it, actually. I was failing to clear the faces after setting the flag, so every time it decided to draw a face, it didn't clear the faces from the previous placement.
The issue with the debugger was that in the act of pausing the game (to toggle the breakpoint), it refreshed the variable, neatly hiding the problem from me.
Heisenbugs; great fun.
2
15:22
indeed
well, not as fun as memory bugs though
I'm hunting a really interesting one currently
it managed to bypass my 128-byte fences and damage the heap anyway
or even 16kB fences
tracked it to freeing of an unregistered allocation
which either means that it was freed before or allocated differently
not sure how it could destroy the heap, though
user4704
16:07
Hm. I don't suppose anybody knows what the correct way is to obtain a function pointer to a thing from a DLL (for example, a GL extension) in OS X?
user4704
All the NSSymbol* APIs appear to have been deprecated. :\
user4704
(N.B. that GLEW et al is not really an option since I have to use the same code for non-GL functions, and also GLEW is calling deprecated methods anyhow)
never loaded stuff form a .dll myself :/
Never really used OS X outside of best buy :P
or developed for even
user4704
Looks like I might just have to use the low-level dlopen APIs.
user4704
16:18
Which is a bit unfortunate since I need to refer to the specific library path.
@JoshPetrie not enough if it's in the PATH?
mkay
user4704
Not all of these libraries would be, and I don't even think the default PATH in OS X includes directories containing the .frameworks anyhow
PATH? LD_LIBRARY_PATH? no idea if OS X uses that too.
I haven't touched anything apple since I played some flight sim on my neighbors first gen iMac with a puck mouse when I was a kid :p
PATH would just be executables
not libraries
well, I've no idea about it.
but there are said to be some parallels to Linux
user4704
16:24
Right, PATH is just executables generally and LD_LIBRARY_PATH is not for end-users.
user4704
Anyway, it works, I just need to dlopen("/System/Library/Frameworks/OpenGL.framework/Versions/Current/Libraries/l‌​ibGL.dylib, ...)
user4704
Which is gross, but whatever.
what prevents you from linking it directly?
user4704
In the case of OpenGL, it's OpenGL 3+ functionality (which isn't in gl.h and you can't #include gl3.h under Cocoa without a warning firing because of some antiquated CoreVideo header).
user4704
In the case of the non-OpenGL stuff, it's from a plugin system so the binary isn't available at compile time.
user4704
16:31
Hm, I wonder if the weak_import attribute would resolve this correctly too
user4704
looks like it does, for gl at least. yay
16:48
hey guys, quick question, how do you draw text like nameplates affected by perspective and depth?
i was trying just with
glRasterPos3d(0,10,0);
std::string s = "MyCat";
for(std::string::iterator it = s.begin(); it != s.end(); ++it) {
glutBitmapCharacter(GLUT_BITMAP_HELVETICA_10, *it);
}
but i guess it will always draw the text with size 10 =x
17:12
@GriffinHeart did you try setting different matrices?
I wonder why I feel the urge to optimize that code.. :P
oh hi there guys ,(^_^)/
like
const char* s = "MyCat";
while( s ) whatever( *s++);
user4704
Probably that iterator overhead is dwarfed by the cost of glutBitmapCharacter, though.
user4704
Which, I suspect, is extremely poorly-performing.
it depends
it should set a texture and draw a quad
all that shouldn't be that slow
well, there might be a few texture states to set, too, but I'm not sure if that would actually stay that way these days
user4704
17:23
It may need to paint the character to the texture if it doesn't have it in-cache; and still, one quad per character is rather inefficient. Does it render immediately?
immediately as in glBegin/glEnd? probably
user4704
Looks like it actually (1) explicitly doesn't use display lists and (2) uses glBitmap instead
user4704
so it's not as bad as I thought, but still not super great.
user4704
I don't know how well glBitmap is supported these days in terms of fast-path operations.
user4704
shrugs
17:26
iirc, some apps were still using interfaces like those
Blender, for example
not sure if in post 2.5, but definitely in pre-2.5 versions
user4704
@GriffinHeart In any case, yes, but there are also 12 and 18 point font variants in GLUT.
user4704
GLUT_BITMAP_HELVETICA_18 for example.
user4704
If you really want to draw 2D text "in 3D," so it has depth and scales smoothly, you'll probably want to draw them as billboarded quads. Unless you don't want the text to always face the user, in which case just render them as quads in 3D.
@ToddersLegrande of all the sites , why did you choose to link the the worst possible one !?
and who the hell stared it to boot
let me guess.. is that about w3schools?
17:32
yeah =/
well, it might be slightly imprecise but it's also undeniably handy
partly because it's always on top of google search results
@snake5 .. i would love to see your reaction when surgeon describe his study materials this way
@GriffinHeart By not using glut and any other of that horribly outdated stuff?
@tereško I'm more afraid of the unexperienced ones
and seriously ... why would you post first google result? If someone found this place he/she already can use google.
17:37
if a surgeon has experience and he isn't fired from anywhere, I'd trust the guy regardless of how he learned things
it's not like he doesn't have assistants
@tereško who says they found this place? friends can point people to websites too
and the ability to find something with google isn't as widespread as one might think
i will have to concede that point
Google? Who needs that if you have StackExchange.
that said, I don't support helping people who can't google myself
but even then , should you try to point people to good materials , instead of just picking the top result
well, you have any suggestions on that?
everyone's smart about web development so the first developers get to be most rated
17:43
@JoshPetrie so i have to draw the text to a texture?
btw :P performance is not important atm
same way you are uploading a image to the GPU.
just that you feed it with the rasterized text instead of the content of the image
Freetype is quite good at rasterizing text, but Bitmap fonts might be a simpler alternative
(Bitmap fonts = Load a image with all the characters already rasterized then drawing text is just a matter of drawing quads with the correct texture coordinates)
"all the characters"? let's see what UTF-8 has to say on this... >_>
hmmm....in anyway i can't do that with just glut* stuff right?
you'll need to use gl* stuff
:D
glut* is a subset of gl*
17:52
glut is nothing but convince functions. There is nothing you can do with glut but not with plain gl.
depends on skill level
and glut is horribly outdated, so I wouldn't recommend it.
freeglut
still horrible
anyway, is it hard to generate the bitmap and then get the bits to assign into a texture?
17:56
with Freetype it's fairly simple, but will probably require some debugging
how simple is it? I'm interested too
:P just want to use nameplate like text, that gets smaller with z
is the info that my implemention for loading, storing and rendering is 150 lines of code enough info?
dunno, first time dealing with font rendering, but yeah if you don't mind i would appreciate it
@Mr.Beast could be :P
18:32
i'm still chocked...
18:45
my horse is amazing!
hmm
looks like something is regularly pissing on my memory allocations
god dammit... does anyone here know a lot about networking?
I have a home wireless network but it keeps failing!
fixing these sorts of bugs makes me feel like a police officer :P
since the heap is thoroughly checked, what's left is going through all memory writes and checking things myself
19:02
@snake5 good luck
thanks
UE3: GWorld->FarMoveActor. Any way to access this from script?
cam
can't find much info online about farmoveactor
19:44
@tereško the person I was talking to really had very little background on JavaScript and the w3schools link actually wasn't the first one I posted but I chose to post the w3schools one in addition to that because it explains things in a manner that a beginner can easily pick up on
@Almo never heard of it
@tereško the point of the link was to provide a high level overview of the data types JavaScript has and nothing more.
ugh, finally found the problem
*yay! finally found the problem!
turns out it was like in games - you have 3 lives and then there's horror
discarded my rule of "have single point of object initialization" once, nothing bad happened
looks like FarMoveActor is completelyhidden in script :(
well, I'll just have to make it available, or do this natively
19:49
@tereško that link has nothing to do with what we were talking about. At least not the linked section
assumed I obeyed the rule at all times, everything broke
I wasn't at my best shape two times and everything crashed
that's how it is with C code
one has to be prepared to write it >_>
@tereško The point was to show JavaScript just has a few basic types (numbers, strings, arrays, etc.)
Not a whole bunch of number types like integer, double, float, long, etc.
That was all
.. and to do that, you picked a site which is harmful
Yeah not really
I'll admit the star on the comment is definitely unwarranted but the site served its purpose just fine
@tereško harmful how exactly? and where's the better alternative?
19:56
It's probably bad because there's not enough jquery in it.
-1 No jQuery.
woa something i said got some stars! that's a first, I think
@snake5 as to "how exactly harmful" : w3fools.com
19:59
for some reason this "bad education" actually helped me get a job
go figure..
00:00 - 20:0020:00 - 22:00

« first day (839 days earlier)      last day (4475 days later) »