#bitfighter IRC Log

Index Search ←Prev date Next date→

IRC Log for 2013-08-18

Timestamps are in GMT/BST.

00:02:49Nothing_Much Quit (Quit: bye)
00:09:59qwebirc519782weird bug i laoded the level and the grid didnt show till i zoomed
00:10:24qwebirc519782either that or it was hyper zoomed in on the 0 0 start
00:11:29qwebirc519782minor but if you play a level and add like 7 bots quicly leave then join a server death spray can be seen on teh laod screen
00:11:40qwebirc519782in the level editor
00:12:49qwebirc519782is the werid symbol toggleing normal on matches next to your ship
00:12:58qwebirc519782that it loops
00:13:31qwebirc519782ok werid bugt my evel loads zoomed in farther then nortmal on 0,0 when i load the level
00:14:58kaenit zooms in as far as it can while still showing the whole level
00:15:14kaenand the symbol is looping so the testers can see all the insignias
00:15:23kaen(it's a rank symbol)
00:15:41qwebirc519782so that wont be looping normaly
00:16:18qwebirc519782uh BF.exe disaperred from my file
00:16:51qwebirc519782found it
00:17:28kaenright
00:17:44qwebirc519782umm error uploading level to DB
00:17:59qwebirc519782thats not good
00:18:45kaencheck the console
00:19:02qwebirc519782oh heres a little bit of info if there is nothing but a spawn on 0,0 when i level laods is zoomed in super far
00:19:13kaenthat's normal
00:19:27qwebirc519782it shouldnt be =p
00:19:38qwebirc519782error 403 good idea XD
00:20:48kaendoesn't print anything else?
00:21:05qwebirc519782it says name is used
00:21:11kaenwell there you go :P
00:21:26qwebirc519782oh foudna real bug
00:22:03qwebirc519782i mnamed a level LOLZABC and tried to upload it it said " the name untitled is to similer to hte name untiltiled by amgine pelase be more creative"
00:22:15qwebirc519782thats concerning
00:22:54kaenthe name is based on the name in Level Parameters
00:22:57kaennot the filename
00:24:09qwebirc519782chanced name same error
00:24:23qwebirc519782oops neverm ind
00:24:44qwebirc519782ok it works
00:24:50kaen:)
00:25:00qwebirc519782but that should be changed as that could be confusing for users
00:25:23kaennoted
00:25:23qwebirc519782mabye force level name to be file name
00:25:29kaenno
00:25:33qwebirc519782force level name to be file na,e?
00:26:08qwebirc519782maybe put a error saying you must name your level
00:26:16qwebirc519782i n the level parameters
00:26:17kaenI think that's a good idea
00:26:55kaenthanks :)
00:28:02qwebirc519782hmm maybe add a outline to text black text is unreadable
00:28:31qwebirc519782msut ;eave now goodbye
00:28:34kaenlater
00:28:36qwebirc519782more testing later
00:28:42qwebirc519782 Quit (Quit: Page closed)
01:03:41Nothing_Much has joined
01:03:41Nothing_Much Quit (Changing host)
01:03:41Nothing_Much has joined
01:07:41Nothing_Much Quit (Read error: Connection reset by peer)
01:09:06Nothing_Much has joined
01:09:06Nothing_Much Quit (Changing host)
01:09:06Nothing_Much has joined
03:25:38Quartz has joined
03:35:13QuartzYEAAAAHHHH!!
03:53:24QuartzYEEEAHAHAHAHAH!!
03:53:58Quartz Quit (Quit: Page closed)
04:36:53LordDVG has joined
05:13:26LordDVG Quit (Ping timeout: 240 seconds)
12:51:41Little_Apple has joined
13:10:16Flynnn has joined
13:27:15LordDVG has joined
14:09:05Little_Applekaen: just found the rating system on pleiades
14:26:42kaenhow is it?
14:26:46kaenLittle_Apple?
14:26:55kaentoo subtle?
14:31:48Little_Applei think its pretty good
14:32:00Little_Applesmaaaaaall suggestion
14:32:16Little_Applemaybe make a way to rate levels from the main page as well?
14:32:38kaenhmmm
14:32:46Little_Applejust a suggestion
14:32:53kaenI feel like it would encourage mass voting ...
14:33:14Little_Applebut hey! more votes!
14:33:36kaenI like the idea that you have to at least click through and see the large screenshot first.
14:33:59Little_Applewill there be a way to vote in game?
14:34:05kaenthere is
14:34:09kaen/rate up
14:34:10Little_Appleoh cool
14:34:11kaen/rate down
14:34:16kaenwhile playing a level
14:34:31kaenthere's an icon on the scoreboard that tells you when a level file is from the DB
14:34:44Little_Appleoh nice
14:34:46kaen(which is the only time you can rate the level)
14:35:15Little_Appleand the author cant vote for his level in game as well?
14:35:49kaencorrect
14:35:55Little_Applecoo'
14:35:59kaenit should tell you that when you try it
14:36:20Little_Appleyea
14:36:55Little_Appledoes the level have to be actually downloaded from the db to vote for it?
14:43:33kaenit has to have a LevelDatabaseID line
14:43:45kaenthe database automatically adds those as needed
14:44:13kaenalso
14:44:16kaenif you have a map
14:44:22kaenand upload it to the db
14:44:23kaenthen
14:44:46kaenit will save the DBID with the file
14:45:04kaenif you were to then work on an old version (without the line) and try to "upload" it
14:45:13kaenit would fail, asking you to use a different name
14:45:51kaenbecause without the line, it would think that you were uploading a new level with the same name, and it won't let you overwrite levels like that
14:47:01kaenbecause `/dlmap little_apple_butt has` to refer to exactly one map
14:47:07Little_Applelol
14:47:14kaenincidentally, if there were a use named "little"
14:47:22kaenand he made a map titled "apple butt"
14:47:31kaenit would also not allow him to upload that
14:47:37Little_Applegotcha
14:47:41kaensince it would also be mangled to little_apple_butt
14:47:54kaen> dat edge case
14:48:29Little_Appleoh just thought of something...
14:48:45kaenfire away
14:48:52Little_Applewill there be a section on pleiades that lets you see only the levels that you uploaded?
14:48:59Little_Appleso you could update them or something?
14:49:31kaenif you click your username, it takes you to a search for levels that you are credited for
14:49:42kaennot exactly the same as levels that you uploaded
14:49:51Little_Appleoh ok
14:49:52kaenbut effectively the same for non-admin users
14:50:20kaen(admins can manually set the map's author, for uploading classics for authors who are no longer with us)
14:50:38Little_Applethat sounds dark..
14:50:49kaenhehe
14:51:38Little_Applesearch for: maps with late authors
15:02:16BFLogBot Commit: 873ea4e8baf6 | Author: kaen | Message: Refuse to upload levels without names
15:25:27BFLogBot Commit: c59f186f943d | Author: kaen | Message: make module indicators red when modules are active
15:27:22kaenhmm. I need an elder dev
15:27:56kaenback shortly!
15:28:12Little_Applekbai
15:28:13kaen Quit (Read error: Connection reset by peer)
15:49:05raptor has joined
15:49:05ChanServ sets mode +o
15:49:10raptorgoo dday!
15:49:18raptorgoo you say? yes.. goo..
15:58:48Little_Apple Quit (Ping timeout: 250 seconds)
16:11:02Little_Apple has joined
16:11:35Little_Applegoo dday to you too!
16:17:36kaen has joined
16:17:54Little_Applehello
16:18:16kaengreetings.
16:19:39kaenraptor, do you know the name of the "roman" font, or where to get it in TTF format?
16:19:54kaenI want to try grafting it onto a fleshed-out utf8 font
16:20:41kaenso we could have the roman stroked for the interface, with a fallback for skulls, hearts, etc.
16:20:59kaenit would be nice if we could just use system fonts
16:21:28kaenone step at a time, though.
16:28:32Little_Apple Quit (Quit: Page closed)
16:30:54kaen Quit (Ping timeout: 246 seconds)
17:21:15Little_Apple has joined
17:32:04Flynnn Quit (Quit: This computer has gone to sleep)
17:33:10raptorhello
17:34:16Little_Applehello
17:34:37raptorlooks like i missed kaen again..
17:34:43Little_Appleyup
17:40:02raptorLittle_Apple: do you think the quick-enery-regen-while-standing-still needs to be adjusted?
17:40:23Little_Applei personally think its fine as is
17:41:14Little_Appleit makes a nice bonus, but at the same time has a risk element where you are extremely vulnerable to cloakers while recharging
17:41:20Flynnn has joined
17:46:03LordDVG Quit (Remote host closed the connection)
17:46:44Little_Applei mean.. it could be adjusted.. but i dont think it really needs it
17:52:56raptorfootloose thinks you need to wait longer, but failed to give me a reason why
17:53:11raptorso... I'm thinking of leaving it as is..
17:54:12Little_Applei dont think it should be longer...
17:57:48raptorok, i'll leave it.. sorry footloose
17:58:48raptoralso, what is your honest opinion of the regenerating turrets/ffs having a fillid in triangle, etc..
17:58:52raptor*filled
18:04:42Little_Applei think its ugly!
18:05:00raptorgreat! i like that feedback
18:05:03Little_Applebut cant think of another way of indicating that something is recharging..
18:05:16raptorsomeone requested to somehow show it is a regenerating one
18:05:27Little_Applemaybe a great big R inside of the turret.
18:05:39Little_Appleim half joking.
18:05:43Little_Appleer.. more than half.
18:06:05raptorhmm... but maybe *some* symbol in the area?
18:06:11raptorinstead of just shading it..
18:06:11Little_Applethree quarters.
18:06:14raptorheh
18:08:37Little_Applemaybe it could have a chat bubble saying "I regenerate!"
18:08:57raptorideas are going the wrong way!
18:09:15Little_Applerats.
18:09:18raptormaybe just a thicker triangle?
18:10:03Little_Applei think that would still be hard to see...
18:11:04Flynnn Quit (Quit: This computer has gone to sleep)
18:11:11Little_Applecould it possibly make the repair sound effect when it starts regenerating?
18:11:36raptorit could...
18:11:57Little_Appleso you would have some way of knowing it was regenerating without having to look at it all of the time
18:12:10raptorbut usually a sound is associated with some sort of movement or visible change...
18:13:32Little_Applemaybe the turret/forcefield could have a small + symbol?
18:13:37Little_Applethats somewhat universial
18:13:49raptorgood idea!
18:13:52raptorlet me try that..
18:14:10Little_Applehooray!
18:24:06Little_Applehow ugly is it?
18:24:15raptoruhh... still coding...
18:24:26Little_Applegotcha.
18:24:33raptorcome here: http://www.twiddla.com/1272693
18:33:29raptorok, back to code..
19:16:58raptorwhy is this forcefield geometry so difficult..
19:19:00Little_Appleit had a rough childhood.
19:51:09raptorstubborn, stubborn child
19:52:56Flynnn has joined
19:53:58raptorok Little_Apple in editor: http://i.imgur.com/QRZDBig.png
19:54:12raptorin-game: http://i.imgur.com/boyquez.png
19:55:03raptorseems... unnoticable, still
19:55:03Little_Applenot bad..
19:55:09raptoryou think?
19:55:12raptorlet me add one of color
19:56:09raptorok, teams: http://i.imgur.com/4DGTLA2.png
19:56:13Little_Appleyou're using imgur now?
19:56:18raptorsam's server died
19:56:27Little_Appleaw
19:56:30raptori find imgur to be easy to use, even if the community is stupid
19:56:36Little_Appleyea lol
19:56:43raptoroh wait! sam's server is back!
19:56:48Little_Applehey!
19:57:08raptormaybe he'll show up again soon..
19:57:11Little_Appleany idea where he went?
19:59:09raptorno - probably lost interest
20:00:49Little_Applemaybe if we bribe him...
20:01:01fordcars has joined
20:01:05Little_Applehello
20:01:38fordcarsHi
20:02:13Little_Applealso, raptor, do you know where ZoombeR went?
20:05:25raptorhe went to some musician's school
20:05:35raptorin vegas, i think
20:05:37raptorlas vegas
20:05:44raptorand dropped off the radar
20:06:19fordcarsReally?
20:06:22Little_Applemaybe he lost all of his money playing roulette
20:06:37raptorfirst rule of living in vegas: never gamble
20:06:39Little_Appleor texas hold 'e,
20:06:46Little_Apple'em*
20:07:10Little_Applefirst rule of vegas in general: dont go to vegas
20:07:28fordcarsI went to Las Vegas once
20:07:29Little_Appleunless you look alot like elvis.
20:07:31raptorman, I used to work with my brother there
20:07:35raptorin the summers
20:07:44fordcarsNice
20:07:44Little_Applefun!
20:07:49raptorand you would not believe how good it felt to leave that place...
20:07:58Little_Apple:P
20:08:02fordcarsheh
20:08:28Little_Applemaryland is pretty nice.
20:09:09Little_Appleif you can handle the politicians...
20:09:39Little_Applerain tax! its brilliant!
20:09:45raptorwhoa - I just found out that there is code to render the turret ranges
20:09:49raptorin the editor
20:09:53Little_Applehaha
20:09:57raptorbut it's broken somehow... should I enable it?
20:10:02Little_Appleyes!
20:20:42fordcarsWhere is kaen when you need him
20:21:22fordcarsRaptor, you could probably answer my question, do you mind?
20:22:39raptorhi
20:22:41fordcarsIn javascript, I want to add objects to an array
20:23:43raptorhmm... i'm not sure I know JS that well
20:23:58Flynnnarr.add(item); should do the trick
20:24:19fordcarsI know, but do objects have to have diffrent names?
20:24:26raptorcan't you just do:
20:24:28Flynnnthey do not :)
20:24:34raptorvar someArray = new Array();
20:24:37raptorthen
20:24:41Flynnnjs arrays are not sets -- they are arrays of object "pointers"
20:24:44raptorsomeArray[0] = someObject
20:24:53Flynnnyou can even add the exact same object twice, and it will work
20:24:55raptorsomeArray[1] = someOtherObject
20:25:02Flynnn(there will be two items pointing to the same object)
20:25:13FlynnnIn fact, editing one of those two items will change the other one! unless you set that index to something else.
20:25:17fordcarsYes, I would of done that(raptor)
20:25:21raptorFlynnn to the rescue!
20:25:31fordcarsHahah yeah
20:25:34FlynnnxD sorry
20:25:40FlynnnI did not mean to butt in
20:25:47fordcarsBut flynn, I would make new objects automatically
20:25:49Little_Appleuhh... quartz eating carrots! http://i.imgur.com/L2sh0Tu.gif
20:26:17Flynnnfordcars: can you please elaborate?
20:26:17fordcarsThanks la
20:26:26Little_Applec:
20:26:28Flynnnhaha Little apple
20:26:33raptorhaha
20:26:40fordcarsHaha ok, I am making an Air Traffic Controller Simulator in Js
20:26:54Little_Appleso like.. watching movies?
20:26:57fordcarsand I want to make random planes showing up
20:27:25fordcarsEach plane would be an object and they would all be in an array
20:27:33FlynnnIs this Unity3d?
20:27:40fordcarsNo...
20:27:44Flynnnalright, just making sure
20:27:46Flynnndo continue
20:27:50fordcars:P
20:27:53fordcarsIt<s cnavas
20:28:00FlynnnI see
20:28:02fordcars*it's cnavas
20:28:09fordcarswell that's it
20:28:26fordcarsI want to make new oibjects randomly
20:28:27Little_Applecanvas?
20:28:30FlynnnI see
20:28:34fordcarsan html5 element
20:28:39fordcarsthimng
20:28:43Flynnnwhat part of that process is triping you up?
20:28:59FlynnnTiming, Instantiation, Tracking, Post-Instantiation use?
20:29:05fordcarsWhen I would make the object for a new plane,
20:29:30fordcarsthey would all be plane.something right?
20:29:41fordcarseven if there are 10 diffrent planes
20:29:49fordcarsplnae.x plane.y
20:30:11Little_Apple Quit (Quit: Page closed)
20:30:57fordcarsand all planes (objects) would be in one array
20:32:27Flynnnah
20:32:29FlynnnI see now
20:32:36FlynnnDo you understand what a class is?
20:33:09fordcarsI guess not
20:33:17fordcarsPLease explain :)
20:33:19FlynnnWell, what do you know about them?
20:34:11Flynnn(or would you like me to just explain regardless of what you know?)
20:34:16fordcarsThey are speeled c.l.a.ss
20:34:20fordcarsthat is all
20:34:22fordcars:)
20:34:22Flynnnoh okay, I see
20:34:43FlynnnWell! I'd like to welcome you to object oriented programming then! I'll see what I can do to explain
20:34:47FlynnnFirst and foremost
20:34:54FlynnnJS is... messed up
20:35:02Flynnnfunctions, classes, objects... they are all the same
20:35:10Flynnnoh, variables too
20:35:35Flynnnso I'm going to explain classes from the perspective of a java user, not a JS user
20:35:41Flynnnbecause in Java, it is all well defined
20:35:50FlynnnSo, do you know what an object is?
20:36:30fordcarsYes I know that strings are objects, variables are objects...
20:36:43FlynnnOkay! That's not quite teh case, but I think you understand
20:36:48fordcars:P
20:36:55FlynnnBasically, a class defines a type of object
20:36:59Flynnnand an object can be of a type
20:37:07FlynnnIE, an object is of type, whatever its class is...
20:37:08fordcarsnew String()
20:37:09Flynnnfor instance,
20:37:10Flynnnyes
20:37:15fordcarshehe
20:37:17Flynnnnew String() creates an object of the class String
20:37:22fordcarsonline tutorials are useful
20:37:25Flynnnhehe
20:37:48fordcarsOK so class is the type of object
20:37:51FlynnnRight
20:38:00Flynnnnow, sometimes in a class you have static functions and static variables
20:38:20Flynnnbut I'll explain those in passing, they are not relavent (or even required, really, just convenient)
20:38:31fordcarsok
20:38:39FlynnnA class is defined as such:
20:38:47FlynnnIt contains a set of functions, and a set of variables
20:38:57Flynnnfor instance,
20:39:08FlynnnWhat kind of objects do you know about? I'll use one as an example
20:39:21fordcarsArray for example
20:39:25Flynnnhmm
20:39:32FlynnnYeah, okay
20:39:35FlynnnI can do it with Array
20:39:40FlynnnDo you know how to get the length of an array?
20:39:50fordcarsarray.lenght?
20:39:53Flynnnyes!
20:39:58fordcarshehe
20:40:02Flynnnlength, in this case, is a variable
20:40:07Flynnnarray.Add(object) is a function
20:40:18fordcarsyes
20:40:38Flynnnyou define those variables in the class, but each object has its own copy of the functions and variables defined in your class (this is not quite true in JS, but I'll get there)
20:41:20fordcarsok
20:41:24Flynnnalright
20:41:42Flynnnstatic variables and functions are just functions that don't belong to any object
20:41:48Flynnnso, if I created a class named "Foo"
20:42:00Flynnnand gaving a function named "bar"
20:42:03FlynnnI could do:
20:42:13Flynnnvar whatever = new Foo(); whatever.bar();
20:42:23Flynnn"and gaving a"
20:42:26Flynnnwtf brain
20:42:45Flynnnanyways
20:42:56fordcarshaha
20:43:12FlynnnI need to see if gaving is a word, one moment xD
20:43:29FlynnnNope xD
20:43:30FlynnnOkay.
20:43:38fordcarshahahhh
20:43:49FlynnnSo, let's say "gaving" the class a STATIC function, named goober
20:44:08Flynnnthen, if I tried to do: whatever.goober(); nothing would happen
20:44:15Flynnnbut, I could do: Foo.goober();
20:44:36Flynnnthere is only ONE Foo. There can be objects of TYPE Foo, but there will only ever be one foo
20:44:45raptorhttp://sam6.25u.com/upload/8screenshot_3.png
20:44:49fordcarsok
20:44:52Flynnnso you can think of classes with static functions as "objects" that are accessible everywhere
20:44:55raptorhttp://sam6.25u.com/upload/8screenshot_4.png
20:44:57fordcarsnice!
20:45:08Flynnnme gusta, but what are the plusses?
20:45:13raptorthat's the new indicator for regenerative turrets/ffs
20:45:17raptorany good?
20:45:18Flynnnoooh
20:45:38FlynnnI like! You could also make little pulses come out of them every time they regenerate a bit of health
20:45:59Flynnnbut that's just a silly idea xD
20:46:45BFLogBot Commit: 5acecff06304 | Author: buckyballreaction | Message: Try Little_Apple's idea for rendering if a turret/ffp is regenerative. What do you think?
20:46:47Flynnnanyways, that's pretty much what a class is
20:46:55fordcarsnice!
20:48:13fordcarsoh would you do foo.goobar(whatever)
20:48:56fordcarswll why wouldn't whatever.goobar work?
20:49:02fordcars*well
20:49:27fordcarssorry for typos my screen has a really tiny resolution
20:49:38fordcarsit's a portable DVD player ._.
20:52:35Flynnnit is because goobar is static --
20:52:45Flynnngoobar is a part of the Foo class its self, not of any object of type goobar
20:53:11fordcarsbut how would goobar() affect whatever
20:53:18FlynnnIt wouldn't affect whatever
20:53:58Flynnnwhatever is merely an object of type Foo. Foo, is not only a class, but also an object of type "nothing"
20:54:40Flynnn(technically, Foo is an object of type class, on some implementations, but that gets into metaprogramming and reflection)
20:54:52FlynnnIt's better to think of Foo as being an object of type "nothing"
20:55:03Flynnnbut in any case, Foo *is* technically an object, and can therefore have its own functions
20:55:08fordcarsOh ok, it's empty
20:55:14FlynnnFoo is not empty
20:55:17fordcarsapart for goobar()
20:55:22FlynnnIt can also have variables, if we add then to Foo
20:55:29Flynnnstatic variables, that is
20:55:55fordcarsbut what is whatever in this!
20:56:00Flynnnbut Foo, and all of its static variables and static functions server as one object. And all objects of type Foo use the nonstatic functions and variables, and are seperate objects
20:56:12Flynnn** serve, not server
20:56:33FlynnnFoo is sort of like a hub
20:56:37Flynnnwhen you say new Foo();
20:56:41Flynnnwhat you are really doing is saying:
20:56:57fordcarsOH I see where this is going
20:57:06FlynnnMr. Foo: I know about you. I want you to give me an object that has the nonstatic functions and variables that you define in it
20:57:13FlynnnFoo.goobar() is saying:
20:57:27FlynnnMr. Foo: I know about you. You have some functions and variables of your own (they are static) can I just use them directly?
20:58:54FlynnnDoes that make sense?
20:59:43fordcarswhat are the nonstatic variables?
20:59:57Flynnnthey are the variables that go inside the objects of *type* Foo
21:00:26fordcarsnormal variables?
21:00:37Flynnnnonestatic variables are normal variables, aren't they?
21:00:43fordcarsokokokoko
21:00:46fordcars:)
21:00:59FlynnnGreat :) so does that make sense?
21:01:01fordcarsand how do you access them?
21:01:09FlynnnWell they have to be put into something
21:01:28Flynnnnew Foo() creates an object with all of the nonstatic variables and functions inside Foo in it
21:02:02fordcarsok
21:02:14Flynnnso whatever.nonstaticvariable = something
21:02:23Flynnnbut Foo.nonstaticvariable = something won't work
21:02:31Flynnnhowever Foo.staticvariable will work
21:02:38Flynnnand whatever.static variable won't
21:03:27fordcarsok! But what are non static variables for then?
21:03:45FlynnnAll objects have variables
21:03:52FlynnnFoo is not an object of type foo
21:04:04FlynnnFoo is an object all on its own, off a totally different type
21:04:12fordcarsyes
21:04:24FlynnnThere can only ever be ONE foo
21:04:30Flynnnbut you can have multiple objects of type foo
21:04:43Flynnnthe objects of type foo don't use the static variables
21:05:11Flynnnthey each use their own copies of the NONstatic variables defined in Foo
21:05:24fordcarsok
21:05:33fordcarswhatever.nonstatic
21:05:42Flynnnworks
21:06:58fordcarsbut what are thhe static variables for then?
21:07:44FlynnnTechnically, you can live without them
21:07:58Flynnneverything you can accomplish with static variables can be accomplished by passing a nonstatic object through the command structure
21:08:08Flynnnhowever, they are convenient
21:08:12FlynnnClasses are static
21:08:18fordcarsyes
21:08:25Flynnnwhen you define the class "Foo" foo can be accessed everywhere
21:08:28Flynnnand there is only one foo
21:08:34fordcarsare static variables useful to make complex objects?
21:08:47Flynnnno, they are useful when creating complex systems of objects
21:08:48fordcarsof typew foo
21:09:00Flynnnfor instance, if all of the objects of type foo needed to communicate
21:09:11FlynnnFoo could have a static variable of type array
21:09:19Flynnnand each individual object of type Foo could add its self to Foo
21:09:23Flynnnto Foo's static array
21:10:33fordcarsohhhhhhhhhh ok!
21:10:46Flynnnit gets even better though
21:10:54FlynnnLet's say we ahve two classes
21:10:57FlynnnFoo,
21:10:59Flynnnand FooRegistry
21:11:07FlynnnFooRegistry could be the object with the static array
21:11:13Flynnnand Foo could have *no* static objects
21:11:18Flynnn** no static variables
21:11:28fordcarsok
21:11:47FlynnnEvery object of type Foo could add its self to *FooRegistry*'s list instead of Foo's list, and it would work just as well!
21:12:35FlynnnWhich makes static functions useful as a programming device, as you could, for instance, create a class called MathUtils with a bunch of static math functions that you use all throughout your code
21:13:28fordcarsOh I get it!
21:13:34Flynnnthis would be much easier than the alternative, which is having a copy of all of those functions inside each of your other classes
21:14:01FlynnnThis is not as much of a concern in JS, because you could just define a classless function outside of your other classes and it would be just fine
21:14:28Flynnnbut that would be messy -- wouldn't you rather have all of the math functions grouped up in a class named accordingly?
21:14:39Flynnnthat way they are organized, and programmers know where to look when they want to see where they fit in the picture
21:14:50fordcarsyeah
21:14:52Flynnnand an experienced programmer will know instantly that what they want is not inside the class they are looking at
21:14:59fordcarscool!
21:15:18FlynnnNow, I'm not 100% familiar with how JS handles its classes/functions/objects
21:15:22Flynnnbut I know they are all the same
21:16:01FlynnnSo, if I understand correctly, technically when you define a classless function like that, it's actually being put inside the "global" class. Every single variable that you define that's not inside a function is technically a static variable, relative to that global class
21:16:21fordcarsyeah
21:16:22Flynnnand any function you put inside that global class is also a global function
21:16:34Flynnnand in JS you can put classes inside other classes
21:16:34fordcarsyes
21:16:45fordcarsI guess
21:16:46Flynnnand have those other classes themselves have static functions which are only global to the classes they are inside
21:16:50Flynnnand it gets super-meta
21:17:03FlynnnI tend to steer clear of that kind of programming xD but it is certainly interesting
21:17:04fordcarsYes
21:17:25fordcarsMe tto :)
21:17:35Flynnnpersonally, I think that it gets confusing for the programmer to keep track of that much heirarchy... Code is supposed to be simple and clean :D
21:17:52fordcarsokYeah :P
21:17:57Flynnnthere are a few other features in programming that are often not used, such as multiple-inheritance, for the same reason
21:18:15Flynnnhowever, I personally feel that while those features get complicated, they are uniquely useful for creating complicated dynamic systems of object types and classifications
21:18:23Flynnnwhich is why often times alternatives such as interfacing crop up
21:18:30Flynnnbut multiple inheritance is very useful
21:18:40fordcarsNIce
21:18:43Flynnnfortunately, interfaces are becoming very similar to multiple inheritance in languages liek c# 3.0
21:18:55FlynnnThough I find their use rather clunky
21:19:14Flynnnanyways, I don't see the multiple-level classes-inside-other-classes thing as being very useful
21:19:36FlynnnI can think of a couple situations where it'd be good, but those are very high level programming situations and would only be used in very complicated systems
21:19:46Flynnnand you'd want to use it as sparingly as possible
21:20:13Flynnnthe more you use it, the more closed off your code becomes. That can be good, but it can also be bad as it can sometimes make expansion *harder*, and the whole *point* of it is to make expansion easier
21:20:26fordcarsHeh, I won't use them in my projects for a few years
21:20:29FlynnnxD
21:20:33fordcarsBut wait
21:20:53fordcarsIf I make a new class
21:21:03fordcarscalled plane
21:21:07fordcarsplkane()
21:21:11fordcarsplane()
21:21:14Flynnncareful
21:21:18FlynnnIt's not called plane()
21:21:22Flynnnit's just called plan
21:21:26fordcarse
21:21:27Flynnn"new" is technically a function
21:21:31Flynnn** plane sorry
21:21:36fordcarsok :)
21:21:40Flynnn"new" is actually an operator, but all operators are actually functions
21:21:47Flynnnbut anyways, when you say new Plane()
21:21:50Flynnnyou are actually saying:
21:21:54FlynnnPlane.newObject();
21:22:02Flynnn(which is a... STATIC FUNCTION! :D)
21:22:22Flynnnwhich is why Plane acts as a hub
21:22:26fordcarsokokokokokokokok
21:22:31Flynnnanyways, continue
21:22:55fordcarswell I want to make allot of planes, but automatically
21:23:04fordcarsrandomly actually
21:23:09fordcarsI need diffrent whatevers
21:23:27fordcarsone=new PLane()
21:23:31Flynnnclasses are right up your alley then, and are considered the "proper" way to do it. but you can do it without classes if you want
21:23:48FlynnnJS is the only language I know of though that will let you do it without classes
21:23:49fordcarstwo=new PLaane()
21:24:02fordcarsthree=new PLane()
21:24:29fordcarsI neew diffrent variable names for the objects
21:24:37fordcarsobviously
21:24:39Flynnnright
21:24:50fordcarsand then I put all planes in an array
21:25:02Flynnnyessir
21:25:23fordcarsso do I just write a normal global function to create the names for the planes?
21:25:32fordcars1, 2, 3, 4, 5, 6, 7,
21:25:36fordcarsfor example
21:25:42Flynnnobjects don't have names
21:25:45fordcarsor var1, var2...
21:25:59Flynnnvar1 is just a number that points to some location in memory that contains the object
21:25:59fordcarsI mean var1=new PLane()
21:26:02Flynnnvar1 is not its name
21:26:13fordcarsOKokokok
21:26:19Flynnnfor instance:
21:26:23Flynnnvar1 = new Plane();
21:26:26Flynnnvar2 = var1
21:26:33Flynnnvar2.x = "blah"
21:26:39Flynnnprint(var1.x);
21:26:41fordcarsyes!
21:26:45Flynnnoutput: "blah"
21:26:56Flynnnneither var1 or var2 are names for the object of type Plane
21:27:06fordcarsthey are vars
21:27:08Flynnnyes
21:27:12fordcarscool!
21:27:23Flynnnaka variables
21:27:33Flynnnand they "point", to put it in programmer jargon, to the actual object
21:28:02fordcarsSo I guess to make var names for the planes, I would do var1, var2, var3
21:28:11fordcarsin a normal global function
21:28:16Flynnnyou could even just do:
21:28:21Flynnnvar1 = new Plane();
21:28:25Flynnnarr.Add(var1);
21:28:29Flynnnvar1 = new Plane();
21:28:34Flynnnarr.add(var1);
21:28:39fordcarsHUH?
21:28:48fordcarsreall?
21:28:51Flynnnvar1 is just a number that points to an objects
21:29:05Flynnnso when you say var1 = new Plane(); you are just telling it to point to a different object
21:29:10fordcarsthe aray will have var1.plane[0], var1.plane[2]
21:29:14Flynnnyou aren't changing the object that var1 originally pointed to
21:29:38fordcarsbut var1.coordX
21:29:56fordcarswell I put nonstatic variables to var1
21:29:57Flynnnthe difference between var1 = new Plane, and var1.coordX = 0
21:30:27Flynnnis that the "dot" (.) in there is telling JS to modify that object that var1 points to -- instead of var1 its self
21:30:49Flynnnin fact,
21:30:59Flynnnvar1.coordX tells js:
21:31:31Flynnnfind the variable var 1. Now find what object it points to. Now find the variable coodX inside that object. Now cause that variable to point to the constant value zero
21:31:39Flynnnnow, it gets complicated
21:31:48Flynnnbecause sometimes variables are actually values, and don't point to anything
21:32:12Flynnnthis only ever happens with numbers and booleans, though
21:32:39Flynnnints, bytes, longs, floats, doubles, and booleans (and a few others depending upon programming language) are all value-types
21:32:43Flynnnso if I say:
21:32:50Flynnnvar1 = 10;
21:32:54Flynnnvar2 = var1
21:32:58Flynnnvar1 = 11
21:33:12Flynnnprint(var2) will output 10, and print(var1) will output 11
21:33:30fordcarsvar1=new PLane() -------- var1.coordX=100--------arr.Add(var1)----var1=new Plane()----var1.coordX=200-----arr.Add(var1)
21:33:33fordcarsok
21:33:55FlynnnYep, that'll work, you'll have two planes at different locations
21:34:00Flynnnit might even be simpler to just say:
21:34:16Flynnnarr.Add(new Plane);
21:34:27fordcarsbut why are they diffrent?
21:34:28Flynnnarr[arr.length-1].coordX = 100;
21:34:31Flynnnyes, they are different
21:35:07fordcarseven if they are both var1
21:35:21Flynnnthe easiest way of thinking aobut it is this:
21:35:24Flynnnevery object has a name
21:35:30Flynnnthe "name" of this object is some weirdass number like:
21:35:34FlynnnEEFGK
21:35:45Flynnnoops, hexadecimal numbers don't have G or K
21:35:48FlynnnI mean...
21:35:53Flynnn10FAE
21:36:34Flynnn10FAE is a hex number, and is the same as the number: 69550
21:37:44Flynnnthe names of these variables are just like normal numbers
21:37:50Flynnnremember that if I say var1 = 10;
21:37:53Flynnnand var2 = var1
21:38:06Flynnnand var1 = 11 ,var 2 will still be 10?
21:38:30fordcarsok, but if you would do var1.coordX=10, just like that, it will change both objects?
21:38:46fordcarsif you have two var1.plane
21:38:51FlynnnI ahve to walk the dog
21:38:54fordcarsI mean ar1=new PLane()
21:38:59fordcarsHaha
21:39:35fordcarsok, one last question, if you have two var1=new PLane()
21:40:00fordcarsand you do var1.coordX = 10, it will change both?
21:42:41Flynnnno
21:42:48FlynnnI'm trying to explain why so that you understand xD
21:42:56Flynnn** understand why
21:44:13fordcarsI know that each var1 is diffrent!
21:44:20fordcarsfor the computer
21:44:30fordcarsbut fore me, both are the same
21:44:55Flynnnvar1 is always the same
21:44:59Flynnnit points to somethign different each time
21:45:47fordcarsbut how could there be two diffrent var1.coordX
21:45:57Flynnnvar1.coordX is not a name
21:46:17Flynnneach object of type Plane() has its own .coordX inside of it
21:46:47fordcarsit'syes
21:46:49Flynnnso when you make var1 point to a different object
21:47:01Flynnnvar1.coordX accesses the .coordX of a different object
21:47:44fordcarsok
21:49:38Flynnnmakes sense?
21:50:20fordcarsbut I still don't get how you would modify only one var1
21:50:26fordcarscoordsX
21:50:34Flynnnvar1 only ever points to one object
21:50:44Flynnnas soon as you make it point to a new object, it stops pointing to the old one
21:51:01bobdaduck has joined
21:51:31fordcarsoh ok
21:51:47fordcarsyes of course
21:51:49Flynnnnow, I think if I explain it to you, it will make much more sense :)
21:51:59Flynnnare you okay with me doing that?
21:52:07fordcarssure!
21:52:10Flynnnokay.
21:52:14FlynnnIf I say:
21:52:17Flynnnvar1 = 5
21:52:20Flynnnvar3 = var1
21:52:23Flynnnvar1 = 10
21:52:30Flynnnwhat is the result of print(var1)?
21:52:35fordcars10
21:52:39Flynnngood
21:52:44Flynnnand what about print(var3)?
21:52:47fordcars5
21:52:51Flynnngreat!
21:52:56Flynnnnow,
21:53:01Flynnnevery single object has a "name"
21:53:09Flynnnthat name is really more of an ID code
21:53:22Flynnnits name is just a number that the computer creates and never lets you see
21:53:37Flynnn(however, programming languages like C or c++ will let you see the actual ID code)
21:53:49fordcarsok
21:54:00Flynnnthe official name of that ID code is the "address" of that variable
21:54:04Flynnn** of that object
21:54:18fordcarsok
21:54:20Flynnnso when someone says the address of an object, they mean the name, or ID code of that object
21:54:27fordcarsyes
21:54:30Flynnnit's called the address, because that ID code is actually the location in RAM that the object is stored
21:54:33bobdaduck Quit (Remote host closed the connection)
21:54:57bobdaduck has joined
21:55:00Flynnnbut that gets into low level memory stuff, so it's not important truely to know this. the knowledge won't even help you unless you use c or c++
21:55:14Flynnn(or any derivation of those languages -- or any languages older than c++ and obj-c
21:55:30fordcarsHehe I already know that actually, well a little of it
21:55:34bobdaduckI WENT TOOOO THE DANGER ZONEEEEEEE
21:55:38Flynnngreat :)
21:55:39bobdaduckRIDIN' TOOOOO THE DANGER ZONNEEEEE
21:55:40FlynnnNow,
21:55:41fordcarsGood
21:55:50Flynnnnow,
21:55:57Flynnnlet's say that 5
21:55:58Flynnnand 10
21:56:04Flynnnare actually the ID codes of two objects
21:56:07fordcarsok
21:56:11fordcarswait!
21:56:19fordcarsis an object var1
21:56:26bobdaduckwhazzup guise?
21:56:32fordcarsyes ok do go on :)
21:56:34Flynnna variable is not an object
21:56:43fordcarsI know sorry
21:56:47FlynnnxD sorry
21:56:49Flynnnanyways
21:56:57Flynnnwhen you say "new Plane()"
21:57:12fordcarsbob, FLynn is teaching me object thingnines
21:57:13bobdaduckIf I've learned anything from trying to teach footloose programming, variables are much more like penguins....
21:57:32fordcarsok
21:57:42FlynnnI think he's joking lol
21:58:01fordcarsI know hahahaha
21:58:08Flynnnlol
21:58:21Flynnnanyways
21:58:25Flynnnif you say: new Plane()
21:58:26bobdaduckbecause she names her variable "penguin" and has it hold the numbers for her....
21:58:56fordcarsWow
21:59:29Flynnnbobdaduck: just curious, do you do any programming outside of lua?
21:59:41fordcarsI don't think so
21:59:45bobdaduckabsolutely not!
21:59:48FlynnnxD
21:59:49bobdaduckdo you BATHE in MUD?
22:00:21Flynnnnot usually. that's why I don't usually program in lua!
22:00:40bobdaduckbut seriously though: I know some C#, some C++, some html, even less javascript and php, and even less anything else.
22:00:45FlynnnI hate lua because it's not technically object oriented lol
22:01:05Flynnnit has "objects" sort of
22:01:09Flynnnbut you aren't allowed to define your own classes
22:01:19fordcarsLua is the first language I learned :P
22:01:20Flynnnand static anything doesn't exist!
22:01:24fordcarswell after BASIC
22:01:52Flynnnthe first language I learned was a JS syntax remapping to Mono C#
22:02:01fordcarsheh
22:02:06Flynnnabout the most nonstandard-pretending-to-be-standard language you can get
22:02:17Flynnnit's name is "UnityScript" but everyone calls it JS
22:02:23Flynnn** its
22:02:27kaen has joined
22:02:32Flynnnanyways.
22:02:32bobdaduckHIKAEN
22:02:43Flynnnif you say: new Plane()
22:02:47fordcarsyes
22:02:55Flynnnthat basically returns a number -- the ID code of the object you just created
22:03:11Flynnnso in the example with var1, and var2, you can effectively replace 5 and 10 with new Plane()
22:03:18Flynnnfor example:
22:03:26Flynnnvar1 = new Plane();
22:03:30Flynnnvar3 = var1;
22:03:34Flynnnvar1 = new Plane();
22:03:58Flynnnjust like print(var1); gave you the second number in the first example, print(var1) will give you the second OBJECT in the second example!
22:04:05kaenhi guys :)
22:04:10Flynnnhello, kaen :)
22:04:22kaenoh god I see `new`
22:04:27bobdaduckthat's my version of kamehamehah, except its more of a short-bursty thing than a full out energy burst. A full out energy burst would be more of a kamehamekaen sort of thing
22:04:34FlynnnI'm converting a lua programmer to OOP :D
22:04:50kaen"OOP" :P
22:05:00fordcarslo
22:05:02fordcarsl
22:05:03Flynnnobject oriented programming xD
22:05:06kaenI know
22:05:16FlynnnI dun't understand why it is funny xD
22:05:19Flynnn** don't
22:05:35bobdaducksay it outloud. Not as an acronym
22:05:35kaenI was making a joke because prototypal inheritance is just barely oop in the traditionaly sense
22:05:45kaentraditional
22:05:51Flynnnthat's true xD
22:05:52bobdaduck"oooooohp"
22:05:55Flynnnbut he's working in JS
22:05:57kaenyeah
22:06:03Flynnnso prototypal inheritance is all he's got xD
22:06:11kaenpoor guy :/
22:06:12Flynnnbut I'm really explaining java to him instead of js
22:06:17Flynnnjs is fupped up
22:06:25Flynnnand yet fascinating at the same time
22:06:48kaenyeah
22:06:55Flynnnlike, it's freaking brilliant
22:07:05kaenI'd have to disagree there
22:07:12kaenit has brilliant parts, mostly on accident
22:07:15Flynnnwell, I mean from the perspective of how simple its definition
22:07:19Flynnnlike...
22:07:23Flynnnall it has are basically functions
22:07:31Flynnnand they are recursively structurable into "classes" and all of that rot
22:07:42Flynnnit's the simplest way I've ever seen of creating a language that has "OOP" in it
22:07:45kaenyes, but it's all very fragile and inefficient
22:07:51FlynnnI agree with you on that
22:07:53kaenyou should look at Go's OOP-ishness
22:08:10Flynnnin the end, it generally just makes things more complicated than they should be
22:08:14fordcarsok, so var1 points to the address of plane
22:08:20Flynnnfordcars: yes!
22:08:27kaenwhoa whoa
22:08:33kaenit's a *reference* to an object
22:08:41fordcarsOKokokok
22:08:42Flynnnoh whoops, right
22:08:49Flynnnit doesn't "point to the address"
22:08:50fordcarsI gues it doesn't have an adress
22:08:53Flynnnit *is* the address
22:08:58Flynnnits value, is the address
22:09:03kaenlord forbid he should try to malloc() something ...
22:09:04Flynnnand because its value is the address, it points to the object
22:09:21Flynnnyou must be careful with your wording xD
22:09:23fordcarsyeah
22:09:23FlynnnI misread what you said
22:09:36fordcarshahaha sure :)
22:09:39Flynnnbecause yo uactually *can* program what you just said in c++, and it comes out completely different than what you meant
22:09:56Flynnndouble pointers are fun hehe
22:10:10fordcarsbut if you store var1 in an array
22:10:19Flynnnyou aren't storing var1
22:10:25Flynnnyou're storing the address that var1 contains into the array
22:10:26fordcarsand then do var1=ne PLane()
22:10:33fordcarsYOU ARE??????
22:10:33fordcars~
22:10:36Flynnnyes
22:10:52Flynnnwhich means you can add the same exact object twice -- just like you can add the number 10 to an array twice :)
22:10:57fordcarsOh thanks for telling me that before, it would of saved us like an hour :)
22:11:10Flynnnyou didn't understand what addresses were until about 15 minutes ago....
22:11:18fordcarsokokok
22:11:25Flynnnand an hour ago you thought variables and objects were the same thing
22:11:26fordcarsThanks :)
22:11:35Flynnnso *your welcome* for taking the time to clarify things for you!
22:11:35Flynnn:D
22:11:51fordcarsvar contains the address of object
22:11:56Flynnnyes
22:12:01fordcars#var contains value
22:12:12fordcarslike 1 or 2 sometimes
22:12:17Flynnnyep
22:12:23Flynnnthe address of an object is a value, just like 1 or 2
22:12:25Flynnnor true or false
22:12:26fordcarsand var contains boolean
22:12:37Flynnntrue and false are sometimes just 0 and 1
22:12:42Flynnn(internally)
22:12:52Flynnnthey can also be the binary numbers 00000000 and 11111111
22:12:58fordcarswhen you do var1=new PLan()
22:13:07Flynnnof course in much the same way they "can" be 1234 and 3215
22:13:11fordcarsthe address of plane is made right there?
22:13:18Flynnnyep!
22:13:21Flynnnwell no
22:13:22fordcarsoh!
22:13:25fordcarsoh
22:13:27Flynnnwhen you do:
22:13:33Flynnnvar1=new Plane()
22:13:37Flynnna new object is created right ther
22:13:43Flynnnand then a new address is allocated for it
22:13:49Flynnnwell to be super specific
22:13:55Flynnna new address and memory space is allocated for it
22:13:59Flynnnthen it gets created inside that space
22:14:04kaen(and the constructor is applied to the object)
22:14:04Flynnnand then the address of the space is returned
22:14:14Flynnnrighto
22:14:25Flynnnthough he's not used to objects, so I haven't explained constuctors to him
22:14:31kaenI hate you, `this`
22:14:43Flynnnhaha, obj-c woes?
22:14:53Flynnntbh I hate the obj-c constuctor system
22:15:07kaenI actually meant in the context of js
22:15:18Flynnnreally!
22:15:24kaennot sure if you've ever accidentally done `var obj = ClassName()`
22:15:32Flynnn._.
22:15:41kaenthen find for some reason your global window object has .x and .y properties
22:15:49kaenand obj is undefined
22:15:56Flynnnto be honest with you, Kaen, asides from arrays and strings, I've steered clear of object oriented js programming altogether. but for the past four years I've done nothing but c#
22:16:33kaenI've been writing a js replication/serialization lib for a few months
22:16:36Flynnnwait, whaaat, it can get that bad, Kaen?
22:16:41Flynnnoh ouch
22:16:41kaenuh, yeah
22:16:46kaennot only will that call not error
22:16:50Flynnnyou really get to know a language when you do serialization
22:16:57FlynnnI did a serialization engine for lua a while back
22:17:09kaenbut `this` in a function called without new refers to the global scope ...
22:17:13FlynnnI got used to how limited the damn thing was reaaal quick
22:17:31kaensee, I'm actually starting to like lua over js
22:17:37Flynnnat least lua is simple
22:17:39Flynnnand defined
22:17:43Flynnnit's just not powerful
22:17:53kaenit's specifically undefined when it comes to OOP though
22:17:55FlynnnAt least in the applications I've used it with, you aren't allowed to define your own classes
22:17:58Flynnnright
22:18:01Flynnnand I love my OOP
22:18:10kaenyou can define your own classes in bf
22:18:11Flynnnidd though that i generally use js without OOP xD
22:18:17Flynnnkaen: that's epic!
22:18:18kaenI just found that out like last week :P
22:18:22Flynnnhaha
22:18:28FlynnnI was using Roblox lua
22:18:36FlynnnI wrote the serialization because Roblox didn't have a networking system
22:18:45Flynnnbut Roblox let you send text by creating a new object with a name
22:18:52Flynnnso I was serializing everything in lua into strings and back xD
22:18:56Flynnnas a communications system
22:19:02kaenheh
22:19:02Flynnnbut all you got in roblox lua was a global variable
22:19:17kaenI wanted to write a fast replication engine for node/browser games
22:19:22Flynnnso you'd have to do things like _G.Whateverclass.GlobalFunction = function();
22:19:30kaenyep
22:19:42kaenlooks like Class decorations in js
22:19:42Flynnnoh that's pretty cool
22:19:48Flynnndid you serialize to bytecode, or text?
22:19:54raptorhowdy folks
22:19:58Flynnnhey, raptor :)
22:19:59kaenI actually have it 90% as performant as bitfighter's network engine, tnl
22:20:10Flynnndamn, in JS?
22:20:14kaenuh, it can serialize to any arbitrary thing
22:20:15kaenyeah
22:20:24raptoroh good, bobdaduck is here
22:20:27Flynnnwell right, but you can make a string into bytecode
22:20:30bobdaduckHI
22:20:33Flynnnand you can make abitrary bytecode into a string
22:20:34kaenit's using these native uint8 arrays
22:20:35bobdaduckATCHERSERVICE
22:20:39kaenyes
22:20:42raptorturn on critic mode please
22:20:42kaenit's pretty fast too
22:20:44Flynnnkaen: ooh interesting
22:20:50kaenhttps://github.com/kaen/wasabi
22:20:55kaenhas some early bnechmarks
22:21:08bobdaduckCRITIC MODE ENGAGED
22:21:17kaenit's also faster and more bit-efficient than the two most popular serialization/replication libs for node
22:21:21bobdaduckBFBuildBot:
22:21:24kaenjust not API complete yet
22:21:28raptorbobdaduck, kaen: I thought to try a different mark for showing regen turrets: http://sam6.25u.com/upload/8screenshot_3.png AND http://sam6.25u.com/upload/8screenshot_4.png
22:21:54FlynnnI see
22:22:00fordcarsok ONE last thing, when I have all plane objects in one array, and I iterate through them, how do I write the object.coordX
22:22:05fordcarsreplacing object
22:22:13Flynnnarr[0].coordX
22:22:17raptorthoughts? better/worse than the filled-in version?
22:22:17Flynnnor,
22:22:23Flynnnarr[i].coordX
22:22:27bobdaduckdoesn't show how MUCH the turret regens by
22:22:46kaenIts till like it better
22:22:57bobdaducka little better looking than the filled in, though the filled in could use work on its own
22:23:01fordcarsarr is the array's """"""name"""""?
22:23:07kaenI don't really care how much they regen by once I know whether or not they regen
22:23:10Flynnnyes
22:23:11Flynnnso,
22:23:18Flynnnvar arr = new Array();
22:23:24fordcarsI know, it's not a name
22:23:26raptorsuggestions for improvement?
22:23:28Flynnnarr.add(new Plane());
22:23:40Flynnnthat's okay, I got your hint with the six quotation marks :)
22:23:47Flynnnarr[0].xCoord = 200;
22:23:48raptorit was actually Little_Apple's idea
22:24:01fordcarsits's a variable that contains the addres of the array
22:24:05fordcarsALRIGHT!
22:24:20fordcarsarr[0].coordX=100
22:24:24raptorFlynnn / fordcars: you guys still at JS?
22:24:29fordcarsarr[1].coordX=230
22:24:39FlynnnI just finished giving him a crash course in OOP
22:24:47fordcarsDOne!
22:24:49FlynnnI didn't teach him about constructors though xD
22:25:01fordcarsI know a little about those
22:25:03Flynnnthey are simple though
22:25:06Flynnnbasically,
22:25:08fordcarsI read about them
22:25:13Flynnn(except in obj-c, where it is weirdass)
22:25:25Flynnn(obj-c has a special place in hell for its constuctors)
22:25:40Flynnnbut in any other *sane* language,
22:25:46raptorhahaha
22:26:13Flynnna constuctor is just a nonstatic function that gets called on an object when the object is first created
22:26:22fordcarsok
22:26:23Flynnnits point is literally to construct the object, and give everything default values
22:26:31Flynnnand, the constuctor accepts arguments from the new operator
22:26:32Flynnnfor instance:
22:26:36fordcarsso var1.coordX
22:26:37Flynnnnew Plane(10, 100);
22:26:52fordcarsfunction PLane(x,y)
22:26:55Flynnnyour constructor would receive two variables, which you could place into coordX and coordY
22:27:04Flynnnbut be wary
22:27:12fordcarsyes?
22:27:27Flynnnwell, remember how I said that JS is not exactly OOP?
22:27:34fordcarsSure
22:27:48Flynnnjs constuctors are not like the constructors in any other language
22:27:53Flynnn(that I know of)
22:28:02fordcarsok
22:28:09raptorkaen: which way did you mean that you liked better?
22:28:12Flynnnin the class Box, for instant
22:28:14Flynnn** instance
22:28:31kaenwith the + sign
22:28:35raptorok
22:28:36kaenfilled in looks terrible
22:28:43raptori'll leave it for now, then..
22:28:57kaenfordcars, http://eleventyone.done.hu/OReilly.JavaScript.The.Good.Parts.May.2008.pdf
22:29:07Flynnnin most languages, you would write: public Box(){}
22:29:08Flynnnor
22:29:13Flynnnfunction Box() {}
22:29:18Flynnnbut in JS,
22:29:19kaenthe best book on applied javascript in complex systems, written by the man best qualified to do so
22:29:19Flynnnyou write:
22:29:36Flynnnfunction Whatever(){} whatever();
22:29:45Flynnnoh wait
22:29:46Flynnnhmm
22:29:48FlynnnI wonder
22:29:57Flynnnoh! funny
22:30:07FlynnnI'm actually learning OOP in js as we speak
22:30:11raptorooo... maybe
22:30:16fordcarsheh
22:30:26fordcarsThanks kaen, I'll check it out!
22:30:27Flynnnyou know what, as you reaserach OOP in js, and learn about constuctors, classes, etc, and their translations to JS, you'll come across this
22:30:31raptormaybe I draw a smaller arc for the turret, and a small chevron for the ffp
22:30:38Flynnnbut the funny thing is..
22:30:43Flynnnin JS, since everything is basically a function
22:30:46kaenthat sounds like a good idea, raptor
22:30:51Flynnn(objects, functions, and classes are all the same, that is)
22:30:53raptorlet me try that..
22:31:09Flynnnyour class IS your constructor
22:31:16Flynnnbecause your class is actually not a class -its a function!
22:31:21fordcarsyes!
22:31:28Flynnnhahaha oh my god wtf js
22:31:34fordcars:P
22:31:42Flynnnbut yeah, that's a constuctor for you, you already knew what it was xD
22:31:56Flynnnnow in obj-c...
22:31:56fordcarsYay!
22:32:05Flynnnconstructors actually force you to set this equal to something
22:32:21Flynnnso in your constuctor, you have to set this = Constuctor_of_superclass
22:32:26Flynnnor it will all go to hell
22:32:33kaenwait, what?
22:32:37Flynnnyep.
22:32:46Flynnnand at the top leve, you say:
22:32:48kaenI'm positive that's wrong
22:32:51Flynnnthis = new Object (basically)
22:33:10kaenyou should never explicitly assign to this in the constructor
22:33:17Flynnnin obj-c you are forced to
22:33:19kaenit gets a new Object implicitly
22:33:23Flynnnnope
22:33:24kaenoh
22:33:24Flynnnnot in obj-c
22:33:31kaensorry, thought you were still in js
22:33:33Flynnnhence why I hate obj-c constuctors :D
22:33:36Flynnnoh, no
22:33:48FlynnnI went on a tangent about obj-c haha sorry
22:34:07fordcarsHAha
22:34:09Flynnnbut the best part is
22:34:21fordcarsI never really planned to do anything in obj-c though
22:34:24Flynnnyou sometimes don't know if the constructor of your superclass even set this!
22:34:31fordcarsbut it's useful
22:34:35Flynnnso you have to CHECK if this is already set before you do anything with it!
22:34:41Flynnn(it won't be set in the event of an error)
22:35:03fordcarswow
22:35:09FlynnnYeah, it
22:35:11Flynnnit's sad
22:35:21Flynnnall the compartmentalization of OOP is lost with obj-c initializers
22:35:22fordcarshah
22:35:37Flynnnhere's an example of a constructor:
22:35:38Flynnnhttp://pastebin.com/bHPnGRqS
22:35:56kaenjs's constructor nuances are evil, too
22:35:58Flynnntaken from http://stackoverflow.com/questions/7999104/what-is-the-objective-c-constructor because I can't even remember all the rules for it off the top of my head
22:36:09Flynnnkaen: I agree completely
22:36:21Flynnnwhy the hell is JS the standard web language
22:36:31kaenah, the history of js ...
22:36:39FlynnnI always say to muyself "I hate js, but it's standard so I'll suck it up"
22:36:42kaenaccidents, hype, and the dotcom boom
22:36:44Flynnnand then the standard never gets changed!
22:37:01Flynnnhaha I love that they piggybacked on java
22:37:10bobdaducknightguise
22:37:14bobdaduck Quit (Remote host closed the connection)
22:37:16Flynnngoodnight!
22:37:24Flynnntoo late :(
22:37:40kaenECMA5 was a good step
22:37:46kaenHarmony just might set us free ...
22:38:02kaenjs might even be enjoyable to people without self-inflicted brain trauma
22:38:19FlynnnI'm afraid I've lost you
22:38:27FlynnnI'm not really that great of a web developer when it comes to JS and the like
22:38:37kaenECMA5 is a recently released update to js
22:38:37FlynnnPHP, I love
22:38:42Flynnninteresting
22:38:44kaenharmony is the next one (in progress)
22:38:51Flynnnoh my
22:38:56kaenharmony will have a traditional class syntax
22:39:02FlynnnOH MY FUCKING GOD
22:39:05kaenalso, small ironic note:
22:39:05Flynnnahem
22:39:13kaen`class` is a reserved word in javascript
22:39:21Flynnnhahahahahahaha
22:39:23kaenthough it is not used.
22:39:29Flynnnso what you're saying is...
22:39:39Flynnnthe JS programemrs were in such a rush to get js pumped out
22:39:42Flynnnthey never added JS
22:39:46Flynnn** they never added classes
22:39:53kaenindeed
22:39:55Flynnnand instead forced us to implement it for them every time we code
22:40:08FlynnnIE, js is still a WIP
22:40:34kaenmost definitely
22:40:50Flynnnwell at least there is hope
22:40:52fordcarsHah
22:41:07Flynnnkaen, you're like a JS pro!
22:41:09Flynnnjust saying
22:41:18kaenheh thanks
22:41:27Flynnnwell I'm pretty sure you *are* a js pro
22:41:28kaenmaster of self-inflicted brain trauma :)
22:41:33Flynnnhah
22:41:40FlynnnI need to become a master of jS
22:41:43Flynnnlest I be left behind
22:41:55FlynnnI want to be one of those old men who can say "I remember when JS didn't have classes"
22:42:03kaenstep one: grab a large rock
22:42:20Flynnnthis JS book I have is the size of a rock... it should do
22:42:35kaenthat book I linked fordcars to is the best I can recommend
22:42:38kaenhttp://eleventyone.done.hu/OReilly.JavaScript.The.Good.Parts.May.2008.pdf
22:43:00fordcarsoh anmd kaen
22:43:00FlynnnOh that's cool!
22:43:10fordcarsyou were right
22:43:12kaenit's written by douglas crockford, one of the guys responsible for people writing sane modern javascript
22:43:27fordcarsw3shcools is really crappy
22:43:45kaenI know, fc :<
22:43:46FlynnnI loved w3schools D:
22:43:51kaenI had to learn that one the hard way
22:43:56Flynnnthough tbh they really don't have any information at all
22:44:03Flynnnand they start getting crappuy with cookies and PHP
22:44:32fordcarsThey had one page for objects
22:44:33Flynnngood for beginners though! when I was first learning to program (and really, google) they were right there answring all of my completely idiotic questions :D
22:44:43Flynnnoh god, I never even saw objects on their website
22:45:06kaenthe real danger is that they are often subtly wrong on intermediate to advanced topics
22:45:13fordcarsand it said like"Everythiing is an object, deal with it"
22:45:17Flynnnbtw http://shop.oreilly.com/product/9780596805531.do is the book I have
22:45:19kaenand they are the highest ranked js/html reference :/
22:45:32Flynnnkaen: oh I see
22:45:38fordcarswow
22:45:55Flynnnby the time I got into such topics, I had stopped using w3schools
22:46:04Flynnnand started taking a real programming course / using stack overflow haha
22:46:21kaenah, that's another classic
22:46:35Flynnnthough stakc overflow is remarkably accurate
22:46:39kaenmuch more indepth than The Good Parts, but it's a good treatment of the advanced topics
22:47:00Flynnnoh you meant the book xD
22:47:11FlynnnI'll read that PDF before I start on the in depth one xD
22:47:26Flynnnall the pages are marked 1 and 2 xD
22:47:31fordcarsIt's getting late
22:47:49fordcarsI should go to bed :(
22:47:51Flynnnbut it seems to be only 30 pages, so that's actually a reasonable read! (xD I have actually never read a book to its completion, except for one which I can't remember the name of)
22:47:56FlynnnGoodnight, fordcars!
22:48:08fordcarsII say Thank you milion of times to Flynn and Kane
22:48:14fordcars*kaen
22:48:17FlynnnNo problem, fordcars :)
22:48:25FlynnnWelcome to the wonderful world of OOP!
22:48:30fordcarsHehe
22:48:49kaenmy pleasure :)
22:48:49Flynnnaand feel lucky that you happen to play pretty much the only game on the planet that has OOP lua
22:48:50kaenrest easy
22:48:58Flynnnkaen, can you please teach me lua OOP real quick?
22:49:20fordcarsTwomorro I'll try to make my little project make planes :)
22:49:27FlynnnI've googled it up and down the yin yang and have found nothing
22:49:33Flynnnbut maybe I'm just bad at google
22:49:39Flynnnhave fun, fordcars!
22:49:44fordcarsHehe
22:49:51fordcarsGood night guys!
22:49:59fordcarsAnd thanks again!
22:50:04fordcars Quit (Quit: Page closed)
22:50:04Flynnnof course :)
22:58:24kaenFlynnn , http://pastie.org/8249205
22:58:28kaenc is the class
22:58:30kaeni is the instance
22:58:39kaen`this` and `self` a unreserved in lua
22:58:50kaenbut bitfighter passes methods the self-reference as `self`
22:59:11kaennote that you have to create and affix the methods within the constructor
22:59:25Flynnndazgud
22:59:38kaenand that I used `this` for constructor's result
22:59:45kaenvs. `self` within the methods
22:59:51kaenpurely to avoid namespace conflicts.
23:00:59Flynnnso bitfighter automatically sets self to be whatever the function is being called on, yes?
23:01:07kaenyep
23:01:15Flynnnthat's nifty
23:01:25kaenthat's the difference between .myfunc() and :myfunc()
23:01:31kaenthe implicit `self` argument
23:01:34FlynnnI see
23:01:43Flynnndo other dialects of lua support that?
23:01:50Flynnnor is that a bitfighter-only thing?
23:02:05kaenI think it's a part of our lua binding helper library
23:02:06kaenluaW
23:02:23Flynnnarrrhhhgg
23:02:23kaenand I also think it's the convention for OOP-lua
23:02:31Flynnnroblox no gusta
23:02:44kaenthere's a lot of extra security and performance implications
23:02:52Flynnnfair enough
23:02:59kaenfirst of all, every instance gets its own instance of each method
23:03:15kaenfunction objects are cheap, but not that cheap
23:03:22kaenand each function has its own scope
23:03:24kaenand scope chain
23:03:30kaenblah blah blah
23:03:36Flynnnsimilar to js it seems
23:03:44kaenlua is a distant cousin
23:03:51Flynnnblech
23:04:03kaenI actually like it better than js
23:04:04Flynnnthen it's not coincidence that they are the two languages I don't like so much
23:04:13kaenindeed
23:04:28kaenI simultaneously hate and love them.
23:04:32Flynnnsame here xD
23:04:43Flynnnthough if there is one thing I utterly dispise about lua...
23:04:51Flynnnit's the fact. that you can't. store. nil. in a freaking array
23:05:03kaenoh, interesting
23:05:05kaenI didn't know that
23:05:15Flynnnnot without messing with metatables and all of that rot, and actually modifying how lua creates arrays
23:05:22kaenyes, I see
23:05:29kaenbecause table.insert(t, nil) is a noop
23:05:32Flynnnyou can modify arrays and create your own set of functions that cause lua to store the actual length of the array, etc
23:05:39Flynnnright exactly
23:05:43Flynnnyou see,
23:05:49Flynnnlua uses a null terminator with its arrays
23:06:02Flynnnbut you are allowed to use indexes outside the array's actual length
23:06:17Flynnnso if you modify the array to contain its own length value, *then* you can sort of have it
23:06:30kaenI see
23:06:39Flynnnbut if the last element is nil, then using the normal array append will just override your latest null
23:06:49Flynnnso you have to write your own append function that inserts at a specified index instead of ust appending
23:07:13Flynnnso I did all of this work, when I was working on that lua serializer
23:07:25Flynnnall to find out.. that THE ROBLOX PROGRAMMERS THEMSELVES COULD NOT HANDLE NIL
23:07:34Flynnnapparently, they don't allow you to send nil over their systems!
23:07:54Flynnnbecuse they assume that you won't ever try -- when you pass an array contianing nil, the array comes out without any of the nill arguments due to their own whatever serialization whatever
23:07:56Flynnnit's fracked up
23:08:05Flynnnall because lua doesn't support it by default
23:08:13kaenthat's pretty nuts
23:11:54FlynnnYeah
23:12:10Flynnnyou now know the two things I hate about lua xD
23:12:19Flynnnthe only thing I hate about python is the syntax
23:12:29Flynnnif I had python with brackets, that'd be sweet
23:13:03FlynnnPHP and python are similar, PHP has brackets though, and I don't think PHP supports all the functional paradigmn stuff that python does
23:13:24Flynnnlambda and all of that xD
23:16:37raptorkaen: http://sam6.25u.com/upload/13screenshot_5.png AND http://sam6.25u.com/upload/9screenshot_6.png
23:17:55raptorany better?
23:18:54kaenFlynnn, it sure does
23:19:03kaenthat's a recent-ish addition though
23:19:10kaenanon functions, closures
23:19:14kaeneven closure rebindings
23:19:17kaenI hate PHP though
23:19:26kaenby far my least favorite language to write
23:19:51Flynnnkaen: really, what cripples it for you?
23:20:00kaenraptor, those links aren't working for me -- ?
23:20:06kaensever seems down
23:20:07FlynnnSame here, raptor
23:20:12raptorargh
23:20:14kaenFlynnn, $variables
23:20:19Flynnnooohh
23:20:21raptorusing imgur..
23:20:24Flynnnyeah that's a bit of an adjustment
23:20:40Flynnnif you can get around that, it's a wonderful language
23:20:42kaenadmittedly, though, I got much better at typing dollar signs from doing php
23:20:48Flynnnand I suppose python is wodnerful if you can get around the indent xD
23:20:52kaenheh
23:20:55kaenI love python
23:21:00FlynnnI hate the indents!
23:21:02raptorhttp://i.imgur.com/fvulrte.png and http://i.imgur.com/mpT2egk.png
23:21:05FlynnnI like indenting code
23:21:06raptorlook at those ^^
23:21:06kaenbut I learned it as a kid so the indenting never bothered me much
23:21:08FlynnnI hate having it mandatory
23:21:15Flynnnwell I have had nasty experiences with it
23:21:29FlynnnI got a python file from another programmer who's text editor used a different indentation style....
23:21:32kaenI think that's great raptor!
23:21:42FlynnnIt took me five hours to figure out wtf the compiler errors were going on about
23:21:49kaenthey even look more durable than non-regenerating ones
23:22:00Flynnnperfect, raptor!
23:22:05raptorheh
23:22:08kaenI, too, have had that experience :<
23:22:25FlynnnxD that was unfortunately my first time using python
23:22:26kaenI sometimes trip over formatting complex literals, too
23:22:28Flynnnsince then I have hated it
23:22:37kaenI hear that sort of thing a lot
23:22:45kaenbut it's standard lib is incredible
23:22:46Flynnnwhat if the arcs inside the turrets kind of expanded from the "center" in an animation?
23:22:53Flynnnoh, yeah, the lib is amazing
23:23:01Flynnnyou can do almost anything right off the batt
23:23:12Flynnnprobably overkill, the animation
23:23:18Flynnnbut I just like to post what ifs xD
23:23:26kaenheh
23:23:39kaenbut I wrote bitfighter's new leveldb in php
23:23:40Flynnnactually tbh having them still is best
23:23:52Flynnnthat must have been hell for you
23:23:53raptorok, so I'll think I'll commit unless anyone has suggestions?
23:23:56kaenso maybe I've just spent too much time with it recently
23:24:00kaenpush it!
23:24:11FlynnnRaptor: can they get a little bit brighter and darker (in color) every time they have a boost in energy?
23:24:21Flynnnor is that overkill too>
23:24:24Flynnn** ?
23:27:32raptori don't know - what do you think, kaen, should I adjust alpha or color with the healrate? turrets already have a health indicator
23:28:37kaenit might help to make it more understandable, but I don't think it's necessary
23:28:57kaenplus it's another timer, more render logic, blah blah
23:29:48kaenfinally downgraded to stable today
23:30:11kaennow I have to reinstall all of my out-of-repo packages :<
23:30:44Flynnn Quit (Quit: This computer has gone to sleep)
23:31:06raptoryay 'stable'
23:31:30kaenhehe
23:32:14kaengives me a chance to try the build instructions for a clean wheezy install, though
23:32:24kaenthe bitfighter build instructions, I mean
23:34:09raptoron it's surface, 'wheezy' seems like it's be more problematic than 'sid'... until you know what the names mean
23:34:14raptor*it'd
23:34:20Flynnn has joined
23:37:52kaenheh
23:37:53kaenvery true
23:39:26kaen"If you can not get [bitfighter] to work, you can try running it in wine"
23:39:49kaenI would be very sad if someone had to resort to that :<
23:40:06Flynnn Quit (Quit: This computer has gone to sleep)

Index Search ←Prev date Next date→

These logs were automatically created by BFLogBot on irc.freenode.net.