« first day (1060 days earlier)      last day (3943 days later) » 

12:07 AM
@Jon type this into the Python Shell:

import this
such a cool easter egg
 
matmartinez.net/nsfw (not really nsfw, I promise, though it does deserve an epilepsy warning)
 
ill look :D
@IcyDefiance wtf was THAT?
 
@PythonInProgress the most awesome thing you have seen on the internet in recent history.
 
@IcyDefiance wow.
that was so wierd
 
12:46 AM
@Byte56 you want to talk? no one else is around :P
 
1:06 AM
nvm
 
1:44 AM
@PythonInProgress let me see the images
@PythonInProgress go to the python room someone will be happy to teach oyu
 
:D
@ChristianCareaga do you want me to post the images in chat?
 
uhhhh email them to me at Christian.careaga@students.rsd.edu
 
k
@ChristianCareaga sent! (lols.... i did something secret to them)
 
@PythonInProgress ahah sweet we might use them
 
:D
what do you think i did to them? @ChristianCareaga
 
1:55 AM
inverted the colors
 
yep :D
i can have some more fun with them if u want
my imaging software is amazing
 
ahaha nice maybe we will use them as the evil ones we are working on aggressive pathfinding
and what software
 
Paint.NET
 
nice can you give them clear backgrounds
 
i love it
they dont have clear backgrounds already?
they do for me
 
1:57 AM
oh maybe yeah they do!
thanks
 
:D
want anything else? i love doing wierd things with images :D (and making them)
 
you can make small weapons if you want
 
same size as the arrows?
 
uh sure if you look in the rec folder under wepons there is a sword to so whatever you want maybe we will use it
 
2:00 AM
ok well I gtg
 
me 2 for today
see u!
 
 
6 hours later…
8:02 AM
I have currentPosition and destinationPositon and currentRotation how do i calculate angle i have to turn to face destinationPosition?
 
 
3 hours later…
10:47 AM
update! :)
 
11:39 AM
@Kikaimaru what is that?
 
game that i'm working on
 
theme? story?
 
its programming RTS
 
cool :D
@Kikaimaru have you played The Binding of Isaac?
 
@PythonInProgress a little
 
11:44 AM
was it fun?
im considering getting it
 
@PythonInProgress i dont like game like that
 
12:28 PM
@ChristianCareaga when you log on, ping me! I have a bunch of new pics. I will email them to you now, and when you log on we'll talk.
 
12:43 PM
is there anything similar to Unified Modeling Language written with plain ASCII text only instead of diagrams to describe objects and program flow? That can then be converted automatically into a diagram?
is-a and has-a stuff
 
1:03 PM
i dont think so @0xFFF1
 
 
1 hour later…
2:07 PM
hey @CodeAssassin
 
whats up today?
 
Nothing worth mentioning.
 
:P are u sure?
@CodeAssassin i worked on my game this morning :D
 
Cool. What did you do? Screenshots if possible.
 
2:10 PM
none yet, just code for now
i started coding the classes for entities
Class Entity(object)
:D
then:
Class Monster(Entity)
 
Cool. What are some attributes they have? What attributes does "Monster" have?
 
xp
name
items_dropped
health
 
How much damage does it deal?
 
ahh :P forgot that
tnx
have to add that to:

Class Player(Entity)
too
:P
@CodeAssassin the player is SO MUCH work
 
@PythonInProgress =) When you do more "Player classes" you may find it a bit more easier. "With experience comes ease."
 
2:18 PM
:P
 
player. terrible class name :P use actor :P
 
a) you're likely to have more than one player
b) gets confusing for network players, replay players, and what not
 
hm
this was originally going to be singleplayer
idk tho
 
/me shrugs
thats right. you're pretty new at this
just continue :) and get something working :)
come back to the above later :)
 
2:20 PM
:)
 
Networking = Whole 'Nother Beast...
 
which grows an extra infinite heads if you try and bolt it on after the fact
 
i will add one other thing pip
dont go class crazy. and have microclasses for everything
think about what needs to be a type and what needs to be data
dont expect to get that right first time. itll take a while to get the gist of the balance between the two
but you're usually better off with slightly less than slightly more types
 
k
right now im hardcoding a bunch of variables
 
2:23 PM
yup
for now thats fine.
 
then setting them inside of the player class
as false
and adding them if needed
 
oh mi...
 
but make a note in your head that its like explaining to someone why the sky is blue
 
:D
@CodeAssassin ?
 
2:24 PM
What are you hardcoding.
 
the lies for children version is "because the light reflecting off the ocean"
the actual version is "particle subscattering"
 
@CodeAssassin im coding things such as: leather tunic
so: leather_tunic = False
and v_leather_tunic = 2
 
vLeatherTunic?
 
armorvalue of the leather tunic
 
dont prefix types to your variable names
 
2:26 PM
k
 
int mOooo = 1;
 
because you're more likely to refactor the type than the name
 
i get that... ok
 
Hey Guys
 
hey Berry
 
2:27 PM
i prefer mixed case too ;) but thats personal preference
sup :)
 
@MattD i use CamelCase for functions/methods
and lowercase for variables
 
i use it for everything.
just lowercase starting char for vars
 
ahh
makes sense
@CodeAssassin why did you set mOooo to the integer one?
 
i think he was trying to denote "member" which IMO is pretty pointless
 
2:29 PM
the only time i'd ever use prefixes is for global/static and sometimes parameters.
depending on the codebase.
gThisIsAGlobalVariable for example. but even then thatd be unusual and only on certain codebases where its useful
 
So I have quick question:
I want to have a list of objects.
by going through the list, I update each object.
But by updating the object, the object changes it's own position in the list
So that doesn't work....
Is there an elegant solution for this?
Or should I just create a temporary list in which the order is changed
and swap the normal list with the temporary, after i have updated all my objects?
programming in c# by the way
 
oh god. its 12:30am here :P and i need to go to bed
 
@MattD :P
its 10:30 am here
 
berry: why do you need to change the position in the list during the update? i'd make that a property of the list istelf not the data in it
berry: i'd consider that an "operation on the data in the list" not an "operation on an element of the list"
berry: if you get what i mean
berry: ie: you'r eprobably doing the same update for every item in the list. so just do it at a list scope and not per object
 
2:31 PM
change those to @Berry
 
oh
@berry: and yeah just use a temporary list. but be careful of any pointers to previous objects.
@berry depends on what youre actually trying to do
 
@MattD its c# probably no pointers there
 
yeah i just read that
 
@MattD I dont't fully understand what you mean, It's actually a list of windows, and i just want the one that has last been clicked to be the last item in the list
 
hey again Kikaimaru
 
2:33 PM
@Berry just have two lists, one with order of windows on screen, and one with all windows
@PythonInProgress hi
 
@MattD yes Prefixes are bad for the soul
 
@Kikaimaru yeah that's what I was thinking too, but i was wondering if there was an elegant way just using one list
 
@berry so, typically, the "container" of the windows know which one was last clicked. and will be able to just move that item to the end of the list. this is pretty much the one time a linked list would be useful. or as @kikaimaru suggested. two lists one with the render order. which is also an elegant solution. i'd probably do both ;) but hey
 
@Berry yes, store ZOrder as property of window, but it would be slower
 
AH of course, i can use a Z property and order the list after finishing my updates!!!
 
2:36 PM
i dont think you actually need list in correct order
you can just write method that will always find window with highest/lowest ZOrder
 
only time you'd need it would be for working out what gets clicked
and checking for click locations would happen quite regulalry
 
i would guess that check would happen every frame for mouseover event, so sorted list might be a good idea :)
 
i guess there's two possible things that can happen onclick: 1) something in the current window is clicked, or 2) a new window gets focus.
so you could cheat and just see if the click was within the current window bounds, and if it wasnt. go and find which window it was
 
yeah right that's right
 
but youd lose the ability to do cursorover stuff on non focused windows
 
2:38 PM
but if you dont care about performance that much you can go windows.OrderBy(w=>w.ZOrder).First(w=>w.Rectangle.Contains(mousePosition)); :)
 
lol. that would be horrifically slow ;)
but yeah
 
speed wouldnt be problem, garbage would
 
i havent profiled much linq
its exceptionally handy though
 
speed is same as normal loops (since its just extensions methods)
well minus delegate calls
 
Yeah I think I will give each window a Z property, and order by that property.
Will ordering by that property be signifiantly slow or something?
 
2:40 PM
anyway. i'd do a bounds check first. then if needed check which window i clicked on by sorting the list by z, then doing a bounds check from second highest down
 
yeah! that sounds exavtly like what i have in mind now ;)
 
i'd probably use a similar approach for controls within windows
but quite possibly with a bit more spatial smarts
like a simplified quadtree
 
i would have one array with sorted windows by zorder (sorted each frame) and then loop over it and check for bounds
 
id probably use axis aligned SAT too
as that is stupendously fast
 
i dont think you'll have thousands of windows, you'll have max 10 windows, and anything will work ok
 
2:43 PM
well i wrote my own custom windows in XNA, and they don;t have controls yet... currently I only have windows that store textures within them. I am writing my own GUI. But i Think i will do a bounds check on ALL windows, instead of the second highest, so that if you are clicking within the window that has focus, I can immediatly use that mouselocation to determine of i am clicking any buttons or something
 
well, i was thinking of controls within windows ;)
which you could have quite a lot
 
@MattD why would they need to be zordered?
 
yeah I understood that, but I am not sure yet how i will implement those controls....
 
because its quite common for UI's to be heirarchical
 
also the z-ordering would come in handy for drawing i think?
 
2:44 PM
@MattD will you ever move a control inside a window?
 
especailly for defining regions within regions and what not. and preserving translation heirachices. ie: drag a window. the whole window moves
and all the components in the window
or, if you scroll a pane. all items in the pane scroll
 
@MattD yes control should have parent, why do you need zorder for that?
 
you dont.
but
take a web page that has 3 , oh fuck, whats the word im looking for.
and then controls within that.
if you click on a single x/y
you need to order heirachically so the topmost control is selected, not just the pane itself
 
can you think of how would you use that in game?
 
menus
i've written quite a few of them for commericial games ;)
 
2:47 PM
you mean like dropdowns?
 
possibly. scrollable things with controls within them
depends on how complex the UI is
 
i dont think there is a single example of zorder oin controls withing window being nescessary in WoW
 
but yes. dropdowns would be an example
 
dropdowns can just always draw over other components in window
 
dont think in terms of z order
think in terms of picking order
 
2:49 PM
i take that as the same thing
 
what woudl be the difference between z order and picking order?
 
i will always pick from dropdown first
 
as thats what you're really doing here. you're using the order of the "windows" to determine what is selected. so a dropdown for example, draws over another component. it technically has a higher (or lower) z than its base
@berry conceptually, nothing
 
@MattD but dropdown has always higher priority, so no need for sorting
 
you are implicitly sorting it ;)
why have an if statement when you can just use your actual algorithm
why have edge cases?
 
2:51 PM
good point
 
I think I have a more clear view on how to approach this now.
Thanks guys! will now be trying to implement it ;)
 
gl :)
and with that, im going to bed!
 
good night!
 
night folks :)
 
@MattD your probably right i wouldnt use ifs, i would just put it into right place at the first time
but anyways i would never ever write a gui library, i would use awesomium or another webkit alternative :)
thats the future of user interfaces! :)
 
2:53 PM
hehe. i'd probably try and use webkit these days for sure. i've written a few. i keep meaning to write one. but these days yeah. id be trying to use html/js
the main reason i'd write a UI would be for timeline animation
still no really nice way to do that in JS yet
waiting for a flash-in-js thing at some point
 
you can use flash in awesomium :)
 
thats pretty neat
did they use that swf decoder thingy that ended up turning into scaleform as well?
 
night matt!
@CodeAssassin i think i fixed the class
@CodeAssassin is this all i need?
class Entity(object):
def __init__(self, x_pos, y_pos, health, name, damage, xp, drops):
self.name = name
self.y_pos = y_pos
self.x_pos = x_pos
self.health = health
self.damage = damage
self.xp = xp
self.drops = drops
the format didnt copy over >.<
 

« first day (1060 days earlier)      last day (3943 days later) »