DrewMelton's Forum Posts

  • Ashley I updated my graphics drivers for my Nvidia 680, but the same problems still exist. If I move the mouse out of the window on node-webkit I never get my custom cursor from sprite back, and my mini-map still has the black border.

    I could almost live with the black border around the map because I can cover it up if I had to. Annoying to be sure, but it can be done. I'd rather just fix it though since it would look nicer and save me from redoing the bottom of the HUD again.

    The mouse issue on the other hand is very bad. I even get the sideways resize cursor half the time. You can't play with that.

    I don't know what else to do.

  • Thanks for the help.

    I guess this is the problem I run into when doing things that haven't been done with C2 yet...

    I'll look at it some more tomorrow. Hopefully, I'll get some official confirmation on what's causing this problem so I can avoid my usual random testing for hours on end...

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • All the layers are set to normal blend mode.

    I've never used the canvas plugin. I've looked at it, but I wouldn't know what to do with it.

    It took me a REALLY long time to get my mini-map functional. I had to set it to track hero/enemy icons, and you can click it to move the camera to that area. That was not easy by any means. So, if there is an easy fix to this, it would save me a lot of headaches.

    Also, I noticed that if I turn off webgl, it works and does not show the black. Of course, then I lose my multiply effects that I was using for certain things (not related to the map).

  • I was happy when I finished my mini-map and got it working in Chrome only to find out that it has an ugly border around it in node-webkit.

    So, that makes two strikes for node-webkit in one day. I just posted a bug thread about my mouse cursor not being set from the sprite anymore if I mouse out of the node-webkit window, and now I have to put up with my mini-map not looking right....

    Here is a picture:

    The top image is node-webket, the bottom is Chrome. Notice the square black border around the mini-map in the node-webkit version.

    I mean, I set every layer to transparent, unnecessary layers are set to invisible during the screen grab process for the mini-map creation, clear background is set to yes. What is left? What doesn't it like?

    I don't know why node-webkit has so many problems. This is what I'll be using if I want my game on Steam. It makes me lose my faith in this program...

    Unless there is a work around for this, I am going to have to modify my HUD yet again and just cover up the black border so no one can see it.

  • If I move the mouse out of the node-webkit game window, I lose my custom mouse cursor.

    Sometimes I get it back, sometimes I don't. Sometimes I don't even get a regular mouse cursor, I just get a sideways resize cursor.

    You'd think that just clicking in the game area would get it back, but no. That'd be too easy.

    The problem is inconsistent and does it whenever it wants.

    Now, if I extend the borders of the node-webkit window so it creates a letterbox around the game, I get my mouse cursor back, but ONLY if the cursor goes over the black area of the letterbox.

    This does not seem to be specific to my game. I started a blank game and set the mouse cursor to custom, and it still behaves the same. Most of the time, I get the standard Windows mouse cursor or even the stupid resize handle cursor.

    I even tried setting it to every tick set mouse cursor to custom sprite, but no.

    I don't know if this is a new problem or not. I've been using Chrome most of the time and just recently started using Node-webkit to preview. It does the same on export. I'm using the latest beta release, but like I said I didn't test it with the last couple of releases, so who knows if it's new or not.

    The only thing I can do to get my custom cursor back is to activate something in game that triggers a different cursor such as "cursor over enemy, set to sword sprite", other than something like that, I can't get it back.

    Unless there is something I don't understand about setting a mouse cursor from sprite, then I don't know how to fix this. Like I said, it is specific to node-webkit which I what I want to use when I release my game. Even in Chrome and resizing Chrome so my cursor can leave the screen, it comes back just fine. I'm using Win 7 if it matters.

  • Yeah, I made a thread a while back saying that regenerating the obstacle map for just one character cost 10fps for 3 seconds or so. With multiple characters, it pretty much brought the game to a halt.

    It was for that reason that I got rid of the destructible environment feature. It is not big deal, but I was going to have it in until I realized the cost of regenerating the obstacle map if even just one block was destroyed.

    If it would add/remove "just" the object that was created or destroyed from the obstacle map, I figure it would not have been a problem, in other words not affected the framerate.

    Even if a character ran into the object and paused for a second before realizing it needed to regenerate the obstacle map, that's still better than dragging the fps down to nothing in order to make sure it can move uninterrupted.

    So yeah, if regenerating the obstacle map can be done per object created/destroyed or within a limited radius of the character, it would be much better.

  • It seems like performance on Chrome is not as good as it used to be, but mainly with camera scrolling. The FPS seems to be fine staying at 60 nearly the whole time, but just panning around the camera in the game is jittery and stuttering like.

    This is an isometric game, so naturally I am moving the camera around a lot either by the directional arrows on the keyboard or arrow buttons on screen.

    If I preview the game on node-webkit by comparison, it pans around smooth as silk, even runs slightly better using maybe 2 or 3 less cpu (of course it's like 14cpu vs 12 so no big deal really).

    I'm not even going to bother with firefox because it runs games like crap anyway.

    But anyway, is this normal? Does Chrome just suck these days or something? Like I said, it mainly affects scrolling the camera around.

  • Well, I think what I'm trying to do is impossible.

    I just keep running into infinite loops. You can't use a trigger once event with "for each." It will be ignored. Every time I actually do get both enemies to get their turn added, one always gets an infinite loop of turns added. Of course, if I don't use for each, then only one character actually gets the turn added. So, either way, I cannot get it to add up the enemies turns.

    At this point, I am thinking of doing this part over and changing the system. I am only going to give each enemy 1 turn, not 3. This will enable to me use only green-arrow trigger once events such as "on pathfinding arrived" to trigger when the turn gets added. This will prevent any infinite loops.

    I mean, it may work out fine. This system might even be more interesting. I don't know. What I do know is I can't take it anymore trying to get it to trigger once with a for each when the enemy pathfinds a certain distance. So, bollocks to it.

    I have tried 100 combinations of trigger once events, functions, UIDs, boolean variables, giving different sprites the instance variables. No matter what, I end up in the same place; an infinite loop or nothing. I don't know what else there is to try. I don't feel like Construct 2 was made for what I'm trying to do.

    So, tomorrow I'm going to rework the system a bit with only 1 turn per enemy/hero and see how it works out. It might even be better in the long run. Who knows.

  • codah Hi, I was having a bit of trouble getting your capx to work with more than one enemyBox. This is the same problem I am having in my game. One enemy is fine, but more than one and it stops working. Let me know if you can get yours to register right for 2 or more enemyBoxes.

    blackhornet That capx is interesting. I am going to tweak it and try to adapt it to the kind of conditions my game will have and see if it works.

    megatronx I may have already tried putting the for each first. It's hard to say what combinations I've done since I've tried a dozen variations. I "think" I know what you are saying about adding another condition. I may be misunderstanding you though, but I think I know what you mean.

    I'll hit this hard tomorrow and try to get it sorted one way or another!

    For you guys wondering why I'm going through all this trouble, I'll share a bit about my game. It is a turn-based RPG roguelike. I currently have it set up on a tile system (the tiles follow you around) so you can only move a certain distance (like 200 pixels for example).

    Here is a screenshot. I am NOT ready to start showing off my game yet, so this is the first public screenshot I have shown. Please ignore the Golden Axe sprites. I was about to start making my own character sprites when I got distracted with this step.

    I'm actually tempted to just make it so you can move any distance, and it will only use 1 turn. This would free up the movement a bit. I haven't decided yet though. The system I have is similar to the Civilization games where you take your turn, and the computer takes theirs. Each attack will cost one turn, and tasks like a health potion will also take one turn.

    The heroes are working fine. This problem I am running into with multiple enemies is one of the major issues I've had so far. Once I get this taken care of, it's back to smooth sailing until I hit another major snag. I've been working at this game since December. Of course, I just got Construct 2 in October, so I'm still learning as I go which is why it's taking so long.

  • Thanks guys. I'll look at your examples first thing tomorrow. It's getting late. I'm going to get to the bottom of this yet! I've come too far to be slowed down by something so small.

  • codah or Arima or megatronx or anyone!

    I am still having trouble getting it to set my instance variables right. I just need each enemy to reach 3 turns after walking 200 pixels. But it will not let me do it no matter what I do.

    I either get one enemy with 3 and the others with 0, or 1 enemy with several hundred and the others with zero, or some weird combination of whatever the game can think of.

    No matter how many combinations I try, no matter where I move the conditions or events, I get the same results of one of the above.

    I can get the enemy box to calculate the proper distance, and they will set their boolean variables as well usually. So, I guess that's a start, but I'm running out of ideas.

    I have tried using just the enemy box since it is the one doing the pathfinding. I gave it boolean variables and instance variables, and still it will not calculate them properly. It evens ignores my trigger once events and does it infinite times or no times at all sometimes.

    I just don't know what it wants. I don't know why it is so picky.

    Here is a screenshot of my latest attempt of many. Like I said, I have tried many combinations even with different objects.

  • Thanks guys. I'll look at it again when this beer dies down.

  • codah Thanks. I'm going to play with this some more and see what happens. My code is pretty big. I have 3 main characters. There are also 150 events or so just for this one enemy. So, I may copy the enemy folder and simplify it while I play with this. I'll post again when it works or when I get stuck.

  • I've been banging my head against the monitor for 2 days now. Maybe 3. All I want is to have multiple enemies of the same type in a turn-based game.

    Each enemy can move a max of 200 pixels per turn. It is supposed to take off a "move" at 10, 100, and 200 so it adds up to 3 turns. I gave each enemy a box that pathfinds, then it adds the distance to monitor sprite.

    No matter what I try, it will not let me do it with more than one enemy. I got code working fine for just one character (Not pictured), but my attempts at making code for 2 or more enemies of the same type have all failed.

    Either each box gets 3 when one gets 3, or one gets 3 and the rest get zero, or one gets 500 and the other get zero. No matter what I do, it's wrong. Each one is supposed to get 3 turns added once it reaches 200. That's it.

    So, it should work like this:

    enemy: distance travelled is 200, enemyMonitorTurn=3 (when the enemy walks 200 pixels, he uses all his turns (3).

    Here is a picture

    It's kind of a mess because I've moved things to every possible location. I've put in "for each", I've put in a enemy monitor sprite with tied to a enemy.UID, I've tried everything. I've moved stuff around. I've removed or added things. I just don't know what it wants.

    I finally got them to track the distance separately, but they won't add their turns up separately. I'm getting a headache....

  • With as complicated as my HUD is, the only choice I have is to create a template layout and then duplicate it. That way the HUD and layers will be intact in each new layout. My HUD is for a RPG, so there's no way I'd feel like recreating it from scratch each level. Of course, if I wanted to make any changes to the HUD, I'd still have to do it in each layout.