-Silver-'s Recent Forum Activity

  • Been thinking about a game you can progress through by walking irl, but not sure if C3 can tap into a phone's step counter? It looks like C2 wasn't able to do this, but I can't find any search results for C3 on this topic.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I've been playing around with the code from this tutorial, originally designed for C2 though. It's for a touch-based screen scroll, but I'd like to invert the scroll direction (by default it doesn't follow common touch scrolling logic of swiping down to scroll up, you have to swipe up to scroll up). The author has posted a brief instruction for allegedly achieving this but... I don't understand the instruction, and every edit I've tried so far hasn't worked.

    Here's the author's screenshot of the event sheet:

    construct-static.com/images/v951/uploads/articleuploadobject/0/images/14203/swipeevents.png

    The closest I got to figuring this out was changing the action:

    TouchFollowMe ] Set X to lerp(Self.X,Self.X+Self.DiffX,0.35)

    to:

    TouchFollowMe ] Set X to lerp(Self.X,Self.X-Self.DiffX,0.35)

    (basically just changed the + to a - in the lerp function, and did this for the Y axis code too).

    That change sort of works, but also leads to a weird rubber-banding issue where the camera sprite (TouchFollowMe) tries dragging itself back to the original touch location after swiping. And I can't figure out what's causing that rubber banding.

    Thanks for reading, and I hope my explanation isn't too confusing XD

  • I ended up using a different solution entirely, and simply not using the "overlapping at offset" function.

    I'm spawning the GridBase tiles on one layer (they will be a visual guide for where buildings can be placed), and will be placing building tiles on top of them on a higher layer. I'm then running a check to make sure the function that spawns more GridBase tiles doesn't run if the Touch object is also overlapping a building object. That way, yes, some GridBase tiles will still be created needlessly underneath built tiles, but they won't be visible to the player and (hopefully) won't cause much performance overhead since there are only so many that can be spawned in one place in total.

  • I might be wrong,

    but basically its checking to see if its not overlapping itself(as its the one being picked on the touch event). Which is true every event.

    There are some tricks around this, but the most easiest verion for my brain that i can think of is to use a function and a invisible collision tile(the same size of the gridbase).

    so,

    on gridbased.touch, call function($name) no need to pass any values.

    on.function($name) set invisible tile position to createx and createy

    invisible_tile is not overlapping gridbase at offsetx and y

    then create object(gridbase) at createx +- offsetx and createy +- offsety

    (repeat event inside function for however many times you need it)

    This should work, someone else might come up with a better solution.

    Ahhh man, nice idea but it still isn't working =/

    It also gave me the idea to try using families. I created a family for tiles, placed the GridBase object in there, and asked the overlap to check if the targeted object is overlapping anything from the family. And that still didn't work either. Did I get the X/Y values in the overlap checks wrong or something? My head is hurting trying to figure out why this isn't working lol

  • I'm trying to set up a basic city-builder tile-based game with hexagons, where you can build something on a free hexagon tile and then the game will spawn additional hexagons to build on around that hexagon. So the map will keep expanding as you build.

    To test the framework I've created a hexagon tile, have set it up to turn red when it's considered "built on" (happens on touch/click at the moment), and then want it to spawn additional tiles in all directions that don't already have tiles. And that's the part I'm struggling with. I've tried using the "overlapping at offset" check, inverted, to check for already present tiles before spawning in each possible location, but I must be doing something wrong because it spawns in all directions anyway. Here's a GIF so you can see how the red tiles get covered in new white tiles:

    live.staticflickr.com/65535/51653083952_21c7bc0aec_o.gif

    And below is the event sheet for this process at the moment, so you can see what I'm trying to do with the overlap check. Hopefully someone can point out where I'm being an idiot here, or suggest a better method for choosing whether a tile should be spawned :)

    live.staticflickr.com/65535/51654762645_04c0b3abb0_o.jpg

    EDIT: Sorry, struggling to figure out how to embed images, so they're just links for now...

  • I’ve been in love with this app (Forest Live Wallpaper) for the best part of a year now: https://play.google.com/store/apps/deta ... per.forest

    It’s not simply a gif or video on an endless loop. It’s a forest scene with dynamic time of day, wind strength, weather effects, to match the time of day and weather where you are. It even has neat touches like fireworks on New Year’s Eve, and a bright star in the sky on Christmas Eve. And you can edit the colour palette of everything to match the seasons.

    I would love to create my own versions of this kind of wallpaper, in new environments. I’m handy with a digital paintbrush so have no issues crating the assets, but I would have no idea how to go about bringing this to life. Is it even possible with Construct? Animations would be easy enough of course, but it’s how to go about syncing this up with time of day, weather data (which to be fair I would happily live without for now), and how to program it to run as a phone’s wallpaper when it’s essentially a program and not just a looping video.

    Would love to know if it’s possible, or if I would need to code from scratch for this <img src="{SMILIES_PATH}/icon_e_smile.gif" alt=":)" title="Smile">

  • > The above is sound which is why I can make my joke now. Check if the player looks really knackered, if so then player has played enough days straight on the game.

    >

    This would cause a bug in Asia because people there can play for days straight without looking tired.

    Source:

    http://www.dailymail.co.uk/news/peoples ... years.html

    http://disposableworkers.com/?page_id=37

    https://www.vice.com/en_us/article/game ... -cafes-456

    Wow, that's extreme! Suddenly my all-night gaming binges at university don't seem so bad <img src="{SMILIES_PATH}/icon_e_biggrin.gif" alt=":D" title="Very Happy">

    Although, I vote the whole world follows Wikipedia's rule and never uses the Daily Mail as a source given its unreliability and how often it makes nonsense up. The only time you're allowed to use a Daily Mail article as a source on Wikipedia is if it's to point out how awful Daily Mail articles tend to be <img src="{SMILIES_PATH}/icon_razz.gif" alt=":P" title="Razz">

  • >

    > > Second layout is probably same size (or smaller) then the viewport.

    > > (Layout size in the Layout properties versus Window size in the Project properties)

    > >

    > 1920x1080 for everything. For both Layout and Project Settings

    >

    So, yeah i gambled right.

    If they are the same, then you cant 'scroll' the layout eh. (when unbound scrolling set to 'no').

    Ahhh, okay, but then... why does scrolling work for my original layout? Because that's also got a layout size of 1920x1080, unbounded scrolling disabled. I must have done something to that layout to enable scrolling to work, but I've long since forgotten

    Also, so this makes more sense, I have a zoom in function. So fully zoomed out, yeah, no scrolling anywhere. But when I zoom in I should be able to scroll. That works on the first layout but not the others (zooming works everywhere, scrolling never). Maybe the issue is there..?

    I'm really sorry for my incompetence!

  • Thanks, but that's not the issue either. It's definitely assigned, and I added a "play sound effect" command in there too to make sure the right-click was registering, just in case there was an issue with the Mouse object assigned in the first layout not working in other layouts. Hmmm, maybe it's the global variable? I'll keep poking around.

  • Second layout is probably same size (or smaller) then the viewport.

    (Layout size in the Layout properties versus Window size in the Project properties)

    1920x1080 for everything. For both Layout and Project Settings

  • I followed this tutorial (with a few of the suggested tweaks in the comments) to get a screen drag system working in my game last year. It worked amazingly well on my first layout, but for some reason I can't get it working on other layouts. Slightly frustrating...

    Someone mentioned in the comments of the tutorial that he can only get this to work when unbounded scrolling is enabled, which causes its own problems of course. I tried doing the same and yep, the scrolling now works but I can scroll outside the borders of the game screen. The original layout that it works perfectly on doesn't have unbounded scrolling enabled though, so I can't figure out what I'm missing. Any idea if it's something simple I'm forgetting to set up on the new layout to allow this to work? I have no idea why it works on one layout but not the other...

    To clarify it's:

    Mouse Right Click is Down

    --Trigger Once While True

    ---- System Set Value ClickPosition to Mouse.X

    ---- System Set Value ClickPositionY to Mouse.Y

    --System Every Tick

    ---- System Set Scroll X to scrollx+(ClickPosition-Mouse.X)

    ---- System Set Scroll Y to scrolly+(ClickPositionY-Mouse.Y)

    Thanks for reading

  • Thanks for the replies!

    You can disable collisions for sprites in their Properties window. It's not like I'm creating events to disable them at run time. There are a few threads I found through the search function that claim disabling collisions on sprites that are only used for decoration improves performance.

    And thanks for the clarification that overlap checks do indeed require collisions enabled. I've disabled collisions for all sprites that don't use overlap checks (still almost half of them) so hopefully that helps performance in some small way

    The image size doesn't affect the performance. It just reduces the amount of vram used which can be important for mobile devices.

    Awesome, thanks. I'm hoping to release this game on mobile too, but PC is my primary focus for now. Still, even if it only affects VRAM, am I correct in thinking that it's the image size that matters, not the sprite size? So a foggy mist sprite sized 512x512 using an image size of 256x256 has no noticeable (or any) performance/VRAM difference over a 256x256 sprite using a 256x256 image?

-Silver-'s avatar

-Silver-

Member since 21 Sep, 2010

Twitter
-Silver- has 1 followers

Trophy Case

  • 14-Year Club
  • Forum Contributor Made 100 posts in the forums
  • Email Verified

Progress

16/44
How to earn trophies