Alex Tappin

  • Content Count

  • Joined

  • Last visited

About Alex Tappin

  • Rank

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. Hi! I never officially solved this problem the way I wanted to. Bitmap fonts didnt work the way I wanted either (no difference from the current implementation except more files, etc). I did a few different things, but the basic solution was to scale the font when creating it and then rescaling the container back down. Here are some of the functions of the basic workflow I worked out... const getTextChild = (vehicleData, cardWidth, cardHeight, cardHeaderHeight, workstationInfo) => { const textBlurScaleBigCard = 2.64; // Optimized scale for the zoom level I want to use this const textBlurZoomBigCard = Math.pow(textBlurScaleBigCard, -1); // inverse of zoom const textContainer = new PIXI.Container(); // create static content const workstation = getWorkstation(workstationInfo, textBlurScaleBigCard); // set static positions workstation.position = getWorkstationPosition(textBlurScaleBigCard); sequence.position = getSequencePosition(sequence, cardHeaderHeight, workstation, // add to container textContainer.addChild(workstation); textContainer.scale.set(textBlurZoomBigCard, textBlurZoomBigCard); // rescale it textContainer.cacheAsBitmap = false; return textContainer; }; const getWorkstation = (workstationInfo, scale) => { const workstationInfoContainer = new PIXI.Container(); const stationNumber = getText(workstationInfo ? workstationInfo.number : 'test', cst.fontSizes.h3Text * scale, 700, 0xFFFFFF); workstationInfoContainer.addChild(stationNumber); return workstationInfoContainer; }; const getText = (text, fontSize, fontWeight, fill, background) => { const textContainer = new PIXI.Container(); let fillToUse = fill; if (background) fillToUse = whiteBackground; let texture = textStore.getText(text + fontSize + fontWeight + fillToUse); if (!texture) texture = textStore.addText(new PIXI.Text(text, { fontFamily: 'corposreg', fontSize, fill: fillToUse, fontWeight }), text + fontSize + fontWeight + fillToUse); if (background) textContainer.addChild(getHighlightBackground(texture.height, texture.width, background)); textContainer.addChild(new PIXI.Sprite(texture)); return textContainer; }; You can see that getTextChild defines the scale that I am using. For this specific container, I will only see it at a certain zoom level and the 2.64 is the most optimized look at that zoom level. I have some other things in this code but I hope this is easy enough to follow. I trimmed a lot of the unnecessary stuff out so this is sorta bare bones. The get text function returns the text and also caches it (I found this to improve performance since I have a LOT of text on the screen). If that letter or text has already been created, it will just reference the previous one made. Let me know if you have any question...
  2. Upping the resolution just makes it look worse. I have also made sure that every position x,y is a whole number, no floats (as I read as another issue in another thread). I am thinking I will need to bite the bullet and get the bitmap fonts working with this zoom level.
  3. I have been going through hell getting this to work... What I was attempting to do is the following. From a zoomed out view, the text will be hidden. Once a user zooms in 2x the zoom level, the ability to zoom in stops and the text will appear. I cannot for the life of me get that to look good. I have tried drawing the text with a bigger font then scaling the entire container down... Any suggestions? I looked into bitmap font but it would need some work as I would need to get a corporate approved font for that. PS... Using PIXI for a project here at Daimler. It has being well received!
  4. Did you ever figure this out? Running into similar issue!
  5. I have thought of a potential update that may or may not work. Currently, I have many tiling Sprite objects and sprite objects for the parallax. With this, I need to call update on each one. My solution... would having one sprite container, with many children work better? In one sprite named "parallax" I would add multiple children to that sprite. So I would have to update sprite.children[x] using a for loop. It will be some work to test it out... would this possibly render some better results? Constantly thinking of ways to better it.
  6. Intel XDK with crosswalk. I have tried with "upgrading" it to a cordova app in the intel xdk. Both crosswalk 16 and 17. Same results for everything.
  7. Okay give it a shot. Let me know what you discover. On a few of the devices I have tested it on, the higher ends seemed to yield great results. About the fragment shader being called too many times... Are there any known workarounds? Any other way I can implement this project using PIXI?
  8. ll revive this thread as I have made some updates. First, you can demo the game Here and inspect the chrome console and such. You can also download the Apk Here to test out. On mobile devices I have found it works pretty good (especially on higher end where it works perfect) but on lower end devices, it is pretty slow. I have attributed this slowness to the amount of tiling Sprite and sprites for the parallax in the game. But I may be completely wrong. I have read somewhere about making the image sizes powers of 2? Would doing this see a good performance increase? I have also read about multitextures as well. Could this be used for a nice increase? I have about 15 layers of parallax all with different textures. In the end, I could lose some of the layers in the parallax if needed... but would like to find some more opinions in the meantime.
  9. The game will be free on the store! It may be a while since we are wanting to implement many more features haha but yes, it will definitely be free and ill let everyone know when it is up!
  10. Spine looks really awesome and I would love to use it. I will download the trial and see about using it. I am still learning about how it is used. Can I create the animations without spine (maybe another free open source project) and then use your pixi-spine to implement these? Sorry if this question doesnt make sense as I am not too familiar with how spine works. I am basically comparing spine to how texture-packer works... You can pay to use texture packer, or you can type out the files yourself (or use an open source tool like leshylabs...). And I have just profiled my game and I see a lot of information. I will definitely take this and work on speeding up the game! Thanks for the tips! UPDATE: After looking online, I came across something called DragonBones. It is apparently a free open source tool that is supposedly like spine. Any info on dragonbones?
  11. About spine... Is this free/opensource software? I am trying to refrain from using any type of paid software as there may be legal issues (My uncle who owns the copyright of this project is really iffy about using anything). If it isnt, are there any alternatives? My animation definitely seems to be the hardest to implement, there must be a better way.
  12. Hmmmm. I should DEFINITELY change that. It is recreating every function everytime it is called (which is more than 60 times a second)... I will re implement that to be spawned ONCE like the other Globals. Thank you so much for pointing that out.
  13. Okay! I will probably get that implemented sometime this week. I still have some stuff to implement (presenting this as my senior project tomorrow). I want to spend a TON of time getting it perfect!
  14. Oh that sounds awesome. I was definitely having trouble doing that animations (took the longest to do). I will take a look at it and see if I can implement it! Is there a reason we cant move the containers of the parallax every x frames instead of every frame?
  15. Ohhh that one is maybe out of date... Anyways, that is fine to use. Would you say I should have different update loops? For example, I don't need to update the background images EVERY update cycle... Maybe every 10 updates or so? Would setting something up like this be beneficial? I think that would maybe work... Update: I feel that this will be the thing that will make it perform way better.