• Content Count

  • Joined

  • Last visited

Everything posted by Jammy

  1. Jammy


    Yep, you're completely right. I did wonder like, if I had one overall array/object containing things I might want to reposition then I could reposition them all. But after all the thinking, existing UI's and the pain I'd have trying to manage for example 5 GUI's each within their own "container" kinda thing, then having to update all their position... Even now I struggle to really think of a good solution without creating a real good layout library, at that point im not making my game anymore tho so I have to crack on hahaha. Glad the info helps.
  2. Ah that wasn't so clear... Maybe it could show me a message to let me know that and point an arrow to where I need to go. The controls of the game are quite interesting, like a mixture of 2 game-types. I feel like I could run off the golf course and steal a car classic GTA style.
  3. Jammy


    I anchor/pivot the positions manually based on view port width and height, no built in pixi help (although I can imagine some way to do it, but I wanted full control). Consider I have a challenge menu. I run game.ui.challengeMenu() to create it, if I ever need to redraw it and let its position change, I just destroy it with game.ui.closeChallengeMenu() then recreate it again with game.ui.challengeMenu(); Since I use game.ui._VIEWPORT_RIGHT [+] (A var which sets itself to viewport width on resize), then all the sprites will be in their new positions when the menu is recreated. I could of course write a "resize/reposition" function for every UI, but that feels like more dev-time, while this isn't the most elegant or efficient it works, you write it once, and then it's done.
  4. Jammy


    I couldn't find any nice way to do it to be honest. Any 3rd party libs weren't being maintained and I couldn't be bothered coding the solution myself - instead I just have each "gui" in its own function and if the viewport resizing I destroy the GUI and redraw it... Still I'm not happy with that as the solution but I had to crack on with the game itself. So I recorded some resizing so you can see, it has some unpleasant side effects on the actual resize but after that its fairly sound. The code isn't too much of a nightmare to manage but I think my organised codebase helps with that.
  5. Jammy

    Unable to destroy button

    Yeah since "this" may be the button... Could try this: gameUnit1: function() { if (GameState.gameUnit1Bought == false) { GameState.buyUnit1Button = game.add.button(100, 500, 'blankButton', function(){GameState.buyUnit1()}, GameState); if (GameState.gold <= 200) { GameState.buyUnit1Button.alpha = .1; } } else { GameState.buyUnit1Button.destroy(); GameState.unit1Text = game.add.text(12, 480, GameState.gameUnit1Name + ":", GameState.headerStyle); }; },
  6. Jammy


    i do it all by scratch everytime and anchor to viewport right/bottom *cries*
  7. Jammy

    Unable to destroy button

    im pretty sure its because you're calling this inside the function as if it'll be gamestate when it'll actually be the button
  8. something like this? wizard.killTimer = 60; update() { wizard.killTimer -= 1*delta; if(wizard.killTimer<0) {wizard.destroy()} }
  9. Jammy

    Unable to destroy button

    if gameUnit1 is run inside a button then isnt "this" the button and not your game state?
  10. Thats pretty cool dude, i potted the first hole but it didn't progress?
  11. Jammy

    Timing/game speed question

    Typically in game development to ensure an object moves relative to your physics rather than the CPU cycles, you use a time delta variable which corrects any variations in the run time between frames, It sounds a little complex at first but actually it's quite simple. I'm not a phaser pro but I know there's an article here discussing a case with phaser and the requirement for time delta: https://gamedev.stackexchange.com/questions/125258/does-phaser-arcade-body-velocity-include-deltatime-or-not The post isnt very clear and I've never had to document it myself so I'll struggle to explain it succinctly but basically, once you have the deltaTime you can just multiple your variables by that number and it results in smooth transitions. I use it all the time. e.g. (pseudo code) object.y += 50 * deltaTime
  12. Jammy

    Pixi.js Showcase

    i tried it briefly, it ran very well and was quite enjoyable - the graphics are pretty well done also.
  13. Jammy

    Multiplayer movement

    you can't achieve complete synchronicity with the server as there is always a delay, the client must render the move from A to B otherwise a slow connection would mean sprites just dart all over the place. At least with the client rendering the transitions you will only see whats called "rubber banding" https://en.wikipedia.org/wiki/Rubber_banding
  14. Jammy

    Fast Moving Display Objects Ghosting?

    I've just had a thought, looks similar to vsync issues, googled it and low and behold this issue appears to be discussed more here:
  15. Jammy

    Fast Moving Display Objects Ghosting?

    i reduced the velocity to 1 and cant see the artefact of blurring or motion blur but start to see "doubling" around 5, almost as if in 2 frames the circle is drawn twice, at its original position and the next
  16. Jammy

    Fast Moving Display Objects Ghosting?

    thats moving far too fast for me to discern anything about its edges, i'm on a 2k rez 144hz i see all sorts of artefacts of the monitor and the eye at this speed can you reduce the example down to something viewable by the average human eye? lmao, from my perspective i can see 1-4 version of the image when it hits an edge and unless i follow it (with eye strain) it has a motion blur effect (either caused by the monitor or my biology) overall from what i can see, i don't see an issue with the sample provided. and when i focus, i can see pixelated edges that don't appear blurry
  17. Jammy

    Ethics in creating addicting games.

    I'm coming at this from the standpoint of a gamer and I think the actual subject we would discuss in the gaming community here is the grind, not its addict-ability - if the game lasts 10 minutes are you really gonna play it for a year? A game has to be addictive and it has to last a LOOOOONG time in order to really succeed in the MMO space. The subject for a gamer here is really "the grind". If we're 60 minutes in we're already addicted - just give us enough game play to stick around - look at any "non-addicting" games in the console space like fallout, gta, which i've poured 1000's of hours into - they don't employ any crazy tactics to keep me interested, they just have better more fleshed out games which mean they don't need those tactics. Im a grinder and i've developed marginally successful text based mmo's which were a grind to play, but that was almost what the core gameplay mechanic was, as it is in most games. this was over 7 years ago and the new social/p2w grind wasn't as popular back then. As a grinder I actually enjoy the long haul challenge I'm sometimes set - or the pay to win (aslong as the price is around the same as paying for a desktop game). I can see the different tactics employed by game studios to keep me logged in, or pay up for faster progression and I like to think I'm logical enough to find the balance as a gamer (even though sometimes I've binged easily 40+hr grinds and £100+ on micropayments). As I said, I think I'm logical enough to see this, and find balance - but some people don't have that ability and of course game studios are preying on that, but does that make it wrong? I don't know if I'd ever make a game as geared towards grind or p2w as the typical "social mmo" these days, but then again I've not seen the huge amounts of success they have, whereby no one person (owner/creator) feels guilty about what they're doing. I'll grind and pay for just about anything as long as I think it's fun or challenging - and I kinda feel like everyone would say the same thing. If I complete a game in 1000 hours, it feels much more satisfying than one completed in 10. (But on a personal note: some of these newer social MMO's take the 'mick' and can barely be called a game by more seasoned gamers)
  18. Jammy

    Try saying this 10 times fast

    var interstellar //interstellar means interstential or something like that coder.happiness++;
  19. Jammy

    Fast Moving Display Objects Ghosting?

    Hm sounds like you're looking at the same places I would. Just one more suggestion on the rounded pixels, when you update your sprites x,y can you try using Math.round(x) etc, it'll atleast just rule out any issues with rounded pixels I wonder as well; could it be a width or height issue, if you resize a sprite in Pixi by say just its width, it can look quite blurry on the left and right edge.
  20. Jammy

    Making Parts of Sprites Visible/Invisible

    Could you possibly A simple option, you could just have sprites around the edges of the viewport over the bubble sprites, so essentially it covers up where the bubbles are. Basically imagine using the background as the foreground. Another option could be using a mask and would probably me more appropriate https://pixijs.github.io/examples/#/demos/masking.js https://phaser.io/examples/v2/sprites/mask
  21. Haha bardocks last stand is kickass, dude did you ever see Little Fighters, reminds me of that - it cant be that far away from similar mechanics right? I assume the sprites aren't yours?
  22. Jammy

    Fast Moving Display Objects Ghosting?

    Is that not just your monitor? What FPS is the code running at and how fast is the object moving. Is there a demo anywhere to look at. If your sprite is on a floating point it may also look blurry, renderer.roundPixels = true; may fix the issue if that's it.
  23. Jammy

    Classic Battleships Game

    cool that works better now
  24. Jammy

    Classic Battleships Game

    Pretty cool, I think it needs some sort of loading screen tho because I was sat staring at black for around 1-2 minutes
  25. Jammy

    Flood Escape

    Its fun, some way to re-extend the block would be nice, like a little "oh thank god i reached that level" i dunno something like every 30 clicks or something add 100% width back to the block