I am currently recoding a game and im having problems with the rendering engine. i think that the problem is in my file paths, because the old (and identically coded) version works just fine.
I've tried moving the program to another disk, changing the name, including full file path, including relative file path and ive tried to put the output into the debug console, which only crashes the console. I've also set up a check that makes sure the program doesnt display the tile when its value is null, but that just makes it so that it doesnt do anything.
this is the file path for the textures: D:\programs\HTML5_JavaScript\mipmap\assets\textures\tileSetSand
this is my current code for the texture importer:
tileSetSand=[];
players=[];
function setup(){
for(i=0;i<115;i++){
print(i);
tileSetSand[i]=loadImage('D:/programs/HTML5_JavaScript/mipmap/assets/textures/tileSetSand/tile ('+i+').PNG');
}
for(i=0;i<2;i++){
players[i]=loadImage('D:/programs/HTML5_JavaScript/mipmap/assets/textures/player ('+i+').PNG');
}
}
this is the old, functioning code
function setup() {
tileSetSand=[];
for(i=0;i<117;i++){
tileSetSand[i]=loadImage('D:/maart/Documents/Processing/mipmap_local/assets/sprite ('+i+').PNG');
}
//loading all the images and sprites into an array
createCanvas(1000,1000);
}
this is where i utilize the images (this.texture is 3)
display : function(){
if(tileSetSand[this.texture]!=null){
image(tileSetSand[this.texture],this.xPos,this.yPos,20,20);
}
},
the expected output is this function drawing the image specified by this.texture into the canvas at xPos,yPos. However, it does not. i have no clue why.