ptstd's Recent Forum Activity

  • Also, you were using self.x-16,self.y in the offset, when it should have been -16,0 (because it's an offset ), I didn't realise for a while.....

    OMG!

    That was actually the only problem! Once I fixed that it was working fine!

    Thank you so much for helping track down the bug and I'm glad it end up being so simple!

    Now I just have to figure out a way to only do checks on the walls that are actually on screen because I'm assuming the reason it's peaking at near 100% processor usage is because the "on screen" check literally has to check even if it's off screen... I mean, that makes sense.

    I'm thinking about doing some kind of screen-sized object that activates wall blocks underneath it... hopefully that will work.

    If anyone else reads this thread and can think of a elegant solution that'd be cool. I'm always open to other ideas!

    Thanks again paulscottrobson !!!! You are a life saver!

  • Okay. I think I've fixed it, basically see . Somewhat butchered so you might want to use it as a basis

    After a lot of experimenting getting nowhere I remembered I had a similar problem in (of all things) Frogger, where I was figuring out continous sprites making up logs and turtles. The problem, I think is when you do xxxx overlapped with xxxx at offset(a,b) it gets mixed up about which xxxx you mean. Inverting this (hence looking for failures and the 15-VA_BITWISE) seems to crack it, along with the foreach action. It doesn't seem to cope well automatically - if you take the foreach out, it doesn't work.

    The problem with this is that it does this on every frame which is a bit heavy on the processor, you may want some sort of invalidate flag in SP_001 so it only picks ones it hasn't already done, if you change an edge for some reason you can mark it invalid.

    Also, you were using self.x-16,self.y in the offset, when it should have been -16,0 (because it's an offset ), I didn't realise for a while.....

    Thank you so very much!!!

    That makes a lot of sense! Will take a look at it right now!

  • I'm not totally clear what's happening here - you are creating this dungeon and then you want each path square in it to be decorated differently depending on what's immediately around it ?

    Not the paths, but the walls around the path. If you've ever played Nuclear Throne, it's the same kind of perspective in terms of the way the wall tiles are drawn.

    As far as your idea of breaking things down, that's what I was trying to do by only doing the bitwise check / altering of each wall-block when the walls were actually on screen. If I did went the tile route I'd still have to solve my problem of why the bitwise check isn't giving the desired output. Pretty much the idea is that as far as collision detection / altering states of the walls... once everything is initially loaded, it'd loading / unloading things as the player passed by (i.e. via the "on screen" check).

    Run the program as it is now and you'll see what I mean. It's really weird. It feels like the bitwise check is kinda working, but offset... but the "on screen" area of the check is fixed to the upper left part of the layout instead of the actual view that's attached to the temporary player I have setup.

  • I apologize for how absolutely sloppy this program. I'm still very new programming involving more math heavy stuff as well as more intricate logic, so I'm a little out of my depth here.

    As you can see running this program, I have a very hackish procedural dungeon generator.

    What I'm trying to get to work at this point is for the blocks that make up the dungeon walls use bitwise calculation to change each on to the right frame so it looks like properly connected graphics.

    I have it setup the way it is with "on screen" so that it'd keep processing to a minimum... I think. I'm also trying to be more careful about not having a million things running at once since I've had problems with frame rate stuttering since I like to throw a lot at the player in terms of interactive objects.

    On that note, I plan on having the walls be destructible and there will be a lot going on with them in terms of interaction (like chain reaction explosions taking out walls, or being able to mine into them and find randomly generated gems, etc.) which is why I was going for having each "tile" as an object rather than using a tilemap, but if you know a solution using a tilemap, that'd be cool too. I guess more than anything, keep in mind my goal is to have the wall blocks interactive.

    I hope that all makes sense, and if anyone is willing to help me understand this a little better if you have a solution, that'd be amazing.

    Here is the CAPX : mediafire DOT com/?0054ek7p08zjhz4

    (sorry for the non link, still a noob here and can't post links)

    Thanks in advance!

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • The problem there is that when there are no SP_001 sprites on the layout then SP_001.Width and SP_001.Height will return 0. All the sprites are being created at (0, 0).

    Cool. That makes sense! Thank you!

  • Yeah, that definitely is what the bug was. I'm just curious why I've been able to load items that are stored in another layout within the event sheet, but not during the start of layout.

  • Okay, I'm whittling down the bug... it seems to not be working because the object I am calling is from another layout.

    Can someone explain to me why this is the case?

    At start of layout do I have to have the objects I am working with on this specific layout? I'm used to being able to just dump everything into an empty layout to pull from... but it's not working for start of layout?

  • Here is my project with your code copy pasted exactly and it's still not working.

    mediafire DOT com/?ujpmecbd4jjxx76

  • Can you explain what is different on this than from my own? I feel like I am going insane. I don't see a difference.... like on the CAPX I uploaded, when I drag the for loops under "on start of layout" so they are nested, it doesn't work. :/

    Here is a screenshot

    I copy pasted your code to my project and it didn't work.

    Is my project bugged?

  • How do I post a link to the capx?

    I guess this will do for now until I can post links : mediafire DOT com/?8y8vivl1j0685b5

  • A pretty simple problem.

    My for loop works fine outside "on start of layout", but when it's nested under it doesn't work. :/

    I was basing this off another similar tutorial and I -swear- I have everything exactly the same, but obviously I am missing something.

    Here is the capx :

ptstd's avatar

ptstd

Member since 27 Jun, 2015

None one is following ptstd yet!

Trophy Case

  • 9-Year Club
  • Email Verified

Progress

10/44
How to earn trophies