ASmartCoder
a sprite is just a constructor, so you can(actually I did once) add a bunch of properties and then define your own usages for those properties
for example,:
// made a new sprite function cuz i don't wanna go through CDO code and find what the actual sprite constructor is called in order to make a prototype function thingy
function makeySprite(x,y){
this.sprite = createSprite(x,y);
this.sprite.dog = 0;
}
makeySprite.prototype.dehumanize = function(){
this.sprite.dog += 1;
};
var sprite = new makeySprite(200,200);
sprite.dehumanize();

    technically thats just calling them a furry

    ackvonhuelio yo please tell me your joking 😂😂 aint no way mans think I called him an actual dog

    ASmartCoder well thing is you can extend the constructor of createSprite but you kinda have to fuck wit it to get what you want ackvonhuelio has spared your eyes you should be grateful lmao also createSprite should just be an extension of the Sprite() class since it's based off p5.play

      Varrience
      why do they teach people to use createSprite() instead of new Sprite()???
      seems like its kinda unnecessary, gets rid of a possible introduction to constructors, and creates a pain for people like me who want to extend the Sprite() constructor

        ackvonhuelio true... i assume it's to get people started with functions maybe? constructors may be a bit much to show someone when there just starting out as well but that's definitely something they probably should incorporate especially since there starting java lab which basically relies off of object to get anything running

        ackvonhuelio The point of Gamelab is too be able to be taught to students (little gross kids) who are probably 8 year olds. It may introduce them to constructors early on, but think about it - is it easier to teach a kid, "oh, just use this function!", or to instead have a whole lesson on how constructors work? Gamelab is a tool for teaching, and presenting the kids with a completely new concept is way too hard for both code.org and the teachers..

          well i see his point because new sprite makes more sense than create sprite

          Letti42 Well I learned constructors pretty easy, and constructors aren't that hard to learn. also gamelab uses a p5.js library, so it's not really that useful . . .

          Chat