Jump to content

SebastianNette

Members
  • Content Count

    340
  • Joined

  • Last visited

  • Days Won

    5

SebastianNette last won the day on November 1 2014

SebastianNette had the most liked content!

About SebastianNette

  • Rank
    Advanced Member

Profile Information

  • Gender
    Male
  • Location
    Germany

Recent Profile Visitors

2797 profile views
  1. Trailer looks pretty good. Nice work. Maybe my mind is just corrupted, but the only thing that comes to mind when I see those thumbs is:
  2. If you need to call methods with arguments, then you could use apply for that. command[val].apply(this, Array.prototype.slice.call(arguments, 1)); //... processCommands("shoot", "first argument of the shoot method"); If you want to use a different context per function, you could bind the methods first: command = { rain: this.startRain.bind(this), //in the current file jump: this.player.jumpUp.bind(this.player), //jumpUp is in player.js shoot: this.singleBullet.bind(this.singleBullet, this.player)//needs an argument }; commad[val](); There are dozens of ways to get that kind
  3. As sapptime said, it should be: command[val](); However, if you call the functions like that, then they are called in a different context. So you might want to change that to: command[val].call(this);
  4. Thanks for the input, mattstyles. I generally tend to avoid DOM in my pixi projects. Mainly because on my other not-so-good-laptop it seems to get less fps if DOM elements overlay the canvas and for styling reasons. It's not only about screen resizing, but also about the idea of coding something once and having it work on all screen sizes out of the box. I haven't seen that PIXI/React framework yet, so I am not entirely sure how it works. About the framework I am working on, the 3 core concepts are: 1. Being able to easily position / display / size elements based on the screen s
  5. Note: This is still work in progress Hi folks, I haven't done much with pixi lately, most of my work resolves around MEAN stack and I usually don't have enough time for anything not work related. A few weeks ago, when I had more time, I started working on my new game. My game looked ace on my laptop, but literally looked terrible for anyone who didn't use anything close to my screen resolution. On smaller devices, my content barely fit, if at all. On bigger devices, I had a lot empty spaces or the fonts were too small. I tried fixing most of the issues, but this bloated my fil
  6. You don't need a physics library for that. Simple trigonometry is enough. function move(object, distance) { object.x = object.x + distance * Math.cos(object.rotation); object.y = object.y + distance * Math.sin(object.rotation); } https://jsfiddle.net/11av8s0m/
  7. Art and Audio can be (and usually is by default) copyrighted, game ideas and mechanics however are free to use by anyone and rightly so. You can waste your money on a patent, but you won't be able to enforce it in court. And trying to sue some shady dev who is sitting in a country on the other side of the planet takes a lot effort, time and money. The one thing that got games to where they are today is the constant copying of ideas. Imagine the people creating the first FPS would have the sole monopoly on that genre. GG. The chances that someone creates a blatant 1:1 copy of you
  8. That would work but it feels pretty lame to add an extra Container just to scale a single sprite. Thanks though, guess I'll have to do that in the end.
  9. Yea, that was just my lazyness, lol. I remembered that Containers didn't have an anchor property back then, so I wanted to use a Sprite instead. That whole pivot thing seems way too inconvenient :/ So basically, if the size of the object can change, I have to re-set the pivot every frame since it works in absolute pixel. meh.
  10. I think you are misunderstanding the PIXI.Text object. It sure creates a canvas when you create a new object, which makes sense, since you are creating a new Texture. When you update the text then it just sets a dirty flag. And in the next rendering loop, it redraws the text once. All optimization lies in your responsibility. For instance, when you re-use some text te.g. you have a user list and next to every user name is a "Add as Friend" text, you could do something like: var addAsFriend = new PIXI.Text("Add as Friend"); var button1 = new PI
  11. Hi Guys, I'm pretty confused by anchors in v3. For instance, I have a Sprite and set the anchor to (0.5, 0.5) and place that Sprite in the middle of the canvas. Now I add some children to that Sprite. How comes that those children when set to position (0,0) are not in the top left corner of the parent Sprite but instead in the center of it? I also have a second Sprite with the same anchor (0.5, 0.5) and then I am trying to scale it. But the Sprite doesn't scale from the center. So I take that the anchor just determines where the texture is dra
  12. Well, the error is pretty clear. The image is tainted and you don't have the permission to access the image data. You need to fix the serverside CORS headers when serving the image e.g. Access-Control-Allow-Origin "*"
  13. Hey Rick, is there a way to 1. preview posts and 2. to disable the wysiwyg editor? I can't find those options anymore. I would also be happy if there is a way to reduce the lineHeight for messages. This kinda gives the facebook vibe. No double checking, type it and send it, feels so spammy xD
  14. Hey Ivan, thanks for the feedback. This topic is quite old. I was really busy with uni and work (freelancing) in the past year. Pretty much got a 50-60 hour work week. My renderer works differently. It automatically culls the frustum and just needs to draw 1 single quad. It's pretty much the fastest I came up with. The map itself is a simple texture. Each pixel represents 1 tile. The red channel is the x and the green channel is the y for the tile position in the spritesheet. The blue channel can either be 0 or 1, where 1 means that the tile is
  15. The performance is actually pretty good, all the texture lookups should be cached by the gpu and the rest is just some simple math. Another approach would be to pre-render 9 chunks at half the viewport width and height and move / redraw them as needed. Not sure yet which would be faster. But the cost of drawing several quads should be greater than drawing the map in one go. I'm still experimenting on this. I want a really fast background shader that ignores all depth. As few quads as possible. My isometric renderer is inspired by Toji's 2d renderer for LTTP. ht
×
×
  • Create New...