Getting Sprite() properties, using sprites, scaling, etc...

Ok so I thought I'd just first leave here what I've just found and leave maybe a few unanswered questions as well. I think this will be very helpful to people. 

If you want to make a barebones game, you first skip the title screen, then you can use the following code: 

/*: * @plugindesc Custom Start and Loop for Map Scenes * * @author Astra Cat * * @param CustomParameterHere * @desc Custom description goes here. * @default true * * * @help * *///STARTvar alias_prototype_startmapscene = Scene_Map.prototype.start;Scene_Map.prototype.start = function() { alias_prototype_startmapscene.call(this); //Starting code goes here};//LOOPvar alias_prototype_updatemapscene = Scene_Map.prototype.update;Scene_Map.prototype.update = function() { alias_prototype_updatemapscene.call(this); // call original metod //Code for loop goes here };Now, the code that goes inside of Scene_Map.prototype.start is all of your variables and strings and objects that are created on each maps beginning, while the loop allows you to position objects and make countdown timers for animations and things that happen in every single map. 

I'm a total noob to javascript so you'll all have to forgive me, but from what I've found when you create a sprite you HAVE to use "this" in the beginning of the sprite. After setting what the sprites bitmap (the name of the image file without extension in your pictures folder of your game) you then modify it's properties. 

THEN you have to do something like the following: 

this.addChild(this.SpriteObjectName);I don't exactly understand the logic of this yet, but if I had to guess it's basically like you create a sprite object, then you duplicate it, so you can duplicate it a ton of times if you need to. 

You can then manipulate the sprite inside of your code. 

So right now I'm working on displaying an outline of a HUD I'm working on coding.

var HUD_Sprite; this.HUD_Sprite = new Sprite(); this.HUD_Sprite.bitmap = ImageManager.loadPicture('HUD_TestOutline'); this.HUD_Sprite.x = 0; this.HUD_Sprite.y = 0; this.HUD_Sprite.scale = new PIXI.Point(2.0,2.0); this.HUD_Sprite.visible = true; this.addChild(this.HUD_Sprite);...is added to the START section of the code, so when a map scene first starts up it loads up the sprite(s) necessary. 

Now the first thing to do when this is created with just: 

this.HUD_Sprite = new Sprite(); 

is to add this into the code right under it: 

console.log(this.HUD_Sprite);Test play the game inside of rmmv, then hit F8. There will be "Sprite" which you can access a drop down menu with. 

So the first thing I needed to do was scale my sprite to be 2 times it's width and height, as I'm creating a low-res game and scaling to twice it's size.

This was an interesting find...under "scale" in the console for a property of this Sprite, it reads: 

scale: PIXI.pointThen a drop down menu with two floating point numbers, both 1.0. So there's our scale...And messing around with it I can put in: 

PIXI.point(2.0,2.0);...to scale it to two times it's size.

Now the problem is just that I need to get it so that it's not blurry....
I am no expert but I think that is just the nature of scaling up. Maybe you should use an image editing software to size up and make it look good.

When you use that bare bones script doesn't the game still run through all the other code you aren't using?

That might have been a stupid question.
I am no expert but I think that is just the nature of scaling up. Maybe you should use an image editing software to size up and make it look good.

When you use that bare bones script doesn't the game still run through all the other code you aren't using?

That might have been a stupid question.
It's all good. 

I was doing things wrong. You want to use variables with "this." at the beginning of them I'm finding. So this.HUD_Sprite.scale.x = 2,0 would be fine for scaling up. I agree with you on just scaling up in photoshop though, now, as it's better to use a sprites properties to find out how to check for a click on it.

Original thread: https://forums.rpgmakerweb.com/threads/getting-sprite-properties-using-sprites-scaling-etc.54564/