These are chat archives for Azurasky1/DragonArena

15th
Jun 2016
Billy B.
@Azurasky1
Jun 15 2016 04:25
got movement working
Andrea Sonny
@andreasonny83
Jun 15 2016 08:38
Hey man
Sorry about last night, I was really tired
I will try to have a look at the code today
Andrea Sonny
@andreasonny83
Jun 15 2016 15:29
hey there
I’m diggging into the code right now
refactoring...
no reason for keeping all those comments
however is always good practice to send the changes to code review before merging into develop
so we can take action and discuss about the best aproaches instead of spending time later
Andrea Sonny
@andreasonny83
Jun 15 2016 16:16
have a look at this useful page in the meantime, I think you have a liitle bit of confusion about the function declaration topic. http://kangax.github.io/nfe/ It’s a tough topic in JavaScript and also good senior developer sometime make mistake around
the bad part of JS is: no standards and too many way for acheiving the same result, then confusion. ES6 doesn’t help introducing new ways of writing the same stuff -_-
Billy B.
@Azurasky1
Jun 15 2016 16:43
ok
i have some ppl coming over to deliver furniture to my house so i'm gonna shower and organize, then i'll take a look at that
Andrea Sonny
@andreasonny83
Jun 15 2016 16:43
sure, no problem
Billy B.
@Azurasky1
Jun 15 2016 16:44
have you opened the file yet in gulp
Andrea Sonny
@andreasonny83
Jun 15 2016 16:44
?
which one?
Billy B.
@Azurasky1
Jun 15 2016 16:44
also yeah you're right about the sending changes to code review
the newer version
Andrea Sonny
@andreasonny83
Jun 15 2016 16:45
yes
is too fast
Billy B.
@Azurasky1
Jun 15 2016 16:45
i thought that git push automatically sent a pull request but i guess it merges instead
yeah i figured you'd say that hahaha
Andrea Sonny
@andreasonny83
Jun 15 2016 16:45
I’m writing code for controlling the frames per second as we speak
Billy B.
@Azurasky1
Jun 15 2016 16:45
that can be adjusted though, also i have to add some logic that accounts for time between each frame
that way it will reduce lag
ok sure if you want to play with that, that's great
be back in a bit
also
the reason that the player object looks so weird is because the way that i found for creating user input involved creating a constructor for a keyboarder object
so to make my code follow that i created a player constructor instead of using an object literal... meaning i had to manually declare every property to get it working
i could have done it from scratch and it would have looked nicer i feel, i'm not sure where the best place is exactly to put in the event listener stuff
there is a really helpful video i found where this programmer live-codes space invaders but it didn't cover checking for multiple key-inputs at once, i had to do a lot of searching for that
regardless it is one of the best instructional programming videos i have seen
she is a very good speaker
Billy B.
@Azurasky1
Jun 15 2016 16:51
alright be back later
Andrea Sonny
@andreasonny83
Jun 15 2016 16:52
ok, you should have 2 pull requests now
yeah, I know Mary Rose. I saw that video already :)
However Paul Irish is more “modern” http://www.paulirish.com/
Andrea Sonny
@andreasonny83
Jun 15 2016 17:17
the most important think is keeping the code clean, slim and easy to read
spend extra time organizing your code before committing, removing extra code, never used variables, extra white spaces and empty lines and stuff like that
as the code grown is difficult to read and main if not correctly formatted
I will introduce a CodeStyleguide soon to avoid mistakes
Billy B.
@Azurasky1
Jun 15 2016 17:34
sweet, looking forward to that
Andrea Sonny
@andreasonny83
Jun 15 2016 18:42
Billy B.
@Azurasky1
Jun 15 2016 19:03
are we gonna have our own style guide
Andrea Sonny
@andreasonny83
Jun 15 2016 19:03
no, we’re going to use one already defined like airbnb or google
Billy B.
@Azurasky1
Jun 15 2016 19:07
the logic for covering all ordinal directions doesn't work anymore
Andrea Sonny
@andreasonny83
Jun 15 2016 19:11
hm
you can have a look. Maybe you figure out what’s wrong
Billy B.
@Azurasky1
Jun 15 2016 19:12
doing that now
Andrea Sonny
@andreasonny83
Jun 15 2016 19:12
is good to have this kind of bug for learning
Billy B.
@Azurasky1
Jun 15 2016 19:15
got it, was an easy fix
just had to change one of the addEventListener() parameters
i'm gonna clean up this movement
once i am able to do this properly, shouldn't have an issue applying that same object to other units as well
applying that same logic*
Andrea Sonny
@andreasonny83
Jun 15 2016 19:43
What?
Billy B.
@Azurasky1
Jun 15 2016 19:57
i am saying that i fixed the movement, and that once i fix the intervals to make the animation smooth, i can apply that to all other objects in the game, such as dragons, other plays, and projectiles
Andrea Sonny
@andreasonny83
Jun 15 2016 20:08
I fixed the animation
I set a fps variable
and set to 15
so the animation doesn’t run crazy
Billy B.
@Azurasky1
Jun 15 2016 21:33
right right
there are some issues in particular that i am trying to remedy
for instance, when pressing a key, while the sprite changes direction immediately, he doesn't start moving until a second later
the animation itself is also not very smooth and doesn't look like one fluid motion
i wonder if there is a way to smooth it out even though our spritesheet has only 9 frames