part12studios's Recent Forum Activity

  • Sorry this took so long. I had a vacation coming up shortly after the other post. I hoped I could get in there in time, but ran out of time to test this properly. I'm back now and have spent the morning exploring this. This is what I have so far.

    http://part12studios.com/temp/FredExTest3/

    here you can see I have the "Grip" object attached to the physical object.. this is working great. i'm very close i think to having this working i just need to figure out how to compare both of these (or more in future cases) but only drag the closer of the two rather than grabbing both when they overlap as you see in the link above.

    In short, see how you can grab both boxes if they overlap? I don't want this to happen, I only want it to grab the box that is closest to the Touch x,y position.. this way you could have say. a dozen tiny boxes overlapping, but you only grab the one closest to the touch event.

    I tried what was suggested regarding the family instance variable and it just didn't seem to be working the way I expected. I've researched the "pick nearest" and the manual doesn't go deep enough for me to follow what it's actually doing. Since a family variable is for the whole family it seems that it would just apply the variable to everyone in it, not the nearest. So that's the part i'm confused by.

    I setup the variable as advised to the best of my understanding.. but what I'm seeing is that change to both of the boxes so it negates the point what i would think is the point of the variable. to distinguish which one to touch. You will notice that when you click either of them the number goes from 0 to 1 and back to 0. this is the family variable. what I would imagine is the right result is that only the nearest one would become 1 and thus only that one would drag.

    I must be doing something wrong because i would have though that the pick nearest condition would only effect the nearest object be effected, but a familiar variable seems to apply to all of the boxes in the family.. but then i don't know how i could distiguish boxA from boxB..

    I disabled the distance because it made things act a little strange. by that i mean i could drag things sometimes, but not always. there did seem to be some distance behavior involved, but it didn't exactly make sense.

    Thanks!

    Caleb

  • i tried to make your drag drop thing work, but i think that's the problem. i believe you should roll your own drag/drop function.. making something that doesn't have this need to declare the function on/off could be hanging up the result you want.

    box behavior

    box properties

    this is pretty much exactly what you need.. at the very bottom.. see where it says BoxA on collision with truck walls set hittruck to 1. this "Breaks" the grip and the box remains inside the container.. and you can still grab the box again..

    on any touch end you see at group 5, you have any touch end reset the hittruck value.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Hi there,

    So I decided after doing some stuff with Ubuntu/Chromium which is coming along, but seeming to be very problematic / slow, I gave the CocoonJS / Ouya export option a try.

    I'd had a few failed attempts in the past.. black screen usually.. but this time I had something run! I've tried a few settings.. so my experience was like this for two major options apparently:

    System Webview ran full screen. However it had some issues. No sound (big problem) and it seemed to do an auto AA on the graphics so my pixel art which was set to point, defaulted to the compressing stuff so the graphics looked really bad. I also got a http:/// error (yes 3 / marks) that I had to click ok to bypass.

    Canvas+ worked great in terms of some sounds playing. I probably need to tweak the audio some to insure everything plays like it should, although I'm wondering if maybe this only has one sound channel which would explain why music doesn't fire off.. because something else plays right after it killing it. The other big issue is that the game ignores any screen fill options. it makes the game fit in the lower left corner of the screen playing smoothly I might add, but ultimately no good.

    Keep in mind I was not using the android export option, but instead I was exporting to straight HTML.

    So in short, the verdict isn't out yet.. it seems that the Canvas+ holds the most potential, but it had a good number of gotcha's still that need to be worked out.. and don't get me started on the IAP system that would be critical to have in order to make demo modes for games vs making the game

    I just feel like its REALLY close to working, but I'm wondering if Ashley or Tom could step in here to perhaps help offer some input / advise / support for Ouya. It seems like most of the heavy lifting is done, just getting a few things refined/addressed so C2 devs could easily port their games would be a huge achievement!

    People should see the Ouya as a great springboard to reach other platforms. Ouya may not be the biggest console out there, but it's an easy red-tape free way to get your game on a console if nothing else about the market excites you.

  • I'm not 100% sure I know what you want, but I think I get it..

    in the case of the game i'm working on, I had a problem with the physics because I could drag a box through the walls of the truck.. to get around this, I added a local variable to my box objects, and when the box collides with any of the walls this variable "hittruck" goes from 0 to 1.

    then i have a rule for the dragging that this variable must be 0 to drag..

    http://part12studios.com/temp/FredexTest2/

    here is how the logic is setup.. and if i follow you correctly, this should help you with your problem:

  • yea i'm not using any special drivers, so maybe that's the issue. I'm using standard windows-supported game controllers that are working with other games like my NES emulator so I know the controllers are talking to the PC, but it's not making it to Chrome.

  • ok cool i'll definitely try that. this gives me several things to look into that i hadn't done in the past.. i'll have to reconstruct things a little to support this, but it will be totally worth it!

    I'll report back later tonight when I have some quiet time to focus on this.

  • Hi there,

    I am looking to do some work in CocoonJS to try and see if I can get a game on the Ouya that way. I figured it would be good though to be able to test a game controller on the browser before so i can be sure i'm doing things right in C2 before shooting off builds to CocoonJS.

    However I have several controllers that i know are working in Windows 8.1 I'm using Chrome for my default browser to test with. It seems that my games ignore my joystick inputs. I know the controls should work because i have an "or" condition with keyboard which responds fine.. it just doesn't seem that the joystick inputs are making it to the browser.

    I didn't see any tutorials or forum posts that really talked about joystick/browser/troubleshooting so I thought I'd ask here.

    Thanks!

    Caleb

    PS, has anyone been able to use CocoonJS with C2 to make a game for the Ouya? I know several games on the Ouya have been ported over (though not with C2 as far as I can tell) like this one https://www.ouya.tv/game/Bus-Driver-2d-Experience-Rush/ it's not much to look at, but at least it shows someone was able to do it with HTML5/CocoonJS.. now it's time to see if we can use C2 to accomplish the same results.. they even got the IAP stuff working which is especially exciting (I like trial modes for Ouya games)

  • ok i've seen that compare two values before, just never had a need to use it much till now!

    so when it "picks" the nearest... what exactly is happening? the nearest has focus? the nearest "wakes up"? Is there perhaps some "is picked" condition?

    when i look at a single box object, there is the pick nearest/farthest condition for that individual object, but i'm trying to access the choice from the family, not the individual objects..

    its just that everything fires off so fast, I'm trying to understand step by step here how i insure that if say.. Box2 (there are 5 unique boxes) is the nearest.. and it's within the distance range, it knows to be grabbed..

    if i do the rule of distance from it from the Box2 event sheet, that seems like it would ignore the family rated answer...

  • ah that's right.. families.. i remember those now!

    I got the family setup so that's awesome, but I quick realized I'm stuck replicating your approach.. here is what I am doing

    but i'm not sure about the IF distance and how you'd structure that. i can't find an "if" equivalent. When i try to call on compare actions, they are X and Y separate, not a fused one that a distance formula would work in.

    This is super exciting though. I definitely see what you're getting out, I just need to figure out how to check X,Y distance as you've stated.

    Thanks!

    Caleb

  • Hi there,

    Ok so I have this game that really is best on 7"+ screens, but i think the reality is that because I'm doing android, it's going to run on phones and phones are a BIG market to leave out anyway, so here is my situation.

    This is a prototype of what i'm working on. http://part12studios.com/temp/FredexTest2/ in short you flick the boxes into the trucks.. this is meant to eventually be something more like my prior gamesalad version (that i'm remaking in C2)

    Subscribe to Construct videos now

    the problem i have is that the trucks and boxes have to be so big for phones to be easy to pick up that when you play them on bigger screens, so much space is wasted because everything is way bigger than it needs to be on those screens. in this example

    Subscribe to Construct videos now

    you can see i made it for the ipad.. this was my first prototype.. the problem is that if this were to be taken down to an iphone size screen those boxes would be very difficult to grab.

    So i'm trying to figure out a way in C2 to allow me to have the boxes be smaller, at a size that often would be tough to reliably grab on a touch screen.. i'd want to grab the closest one to my finger touch event, but its very likely that

    one thought was to do some kind of distance compare, but when i tried to imagine doing it, it seemed like a rabbit hole of uncertainty.. i just wouldn't know how to do a mass comparison.. the boxes could get numerous so the comparison would have to be each box independent of which one it is (there are 5 unique boxes, each with sub box classifications, icy, explosive, etc)

    another thought was to have some kind of "grip" sprite attached to each box, but my concern there is that since boxes would very likely have overlapping "grips" you'd grab multiples or grab the wrong one..

    So really i just would like it to be able to make it where i can only grab one box at a time and that i'm insuring I'm grabbing the "most right" box possible because the game gets pretty frantic so i could see players getting frustrated if they are finding they are unable to grab the box they want..

    Thanks!

    Caleb

  • oooooo i see.. sorry i didn't notice the small "image points" window. ok that makes sense. awesome! I'll definitely have to explore that more.

    Thanks!

    Caleb

  • wow that's really cool, but how do you add more than one image point on a sprite? from what i can tell, I can only have one in a given sprite. i don't see a way to add more image points to a single sprite. every time i click somewhere, the image point moves to that spot.

    this is really cool though. I can totally see how this would be a much smarter / organized way to group objects!

part12studios's avatar

part12studios

Early Adopter

Member since 24 Dec, 2012

Twitter
part12studios has 1 followers

Connect with part12studios

Trophy Case

  • 11-Year Club
  • Forum Contributor Made 100 posts in the forums
  • Forum Patron Made 500 posts in the forums
  • Forum Hero Made 1,000 posts in the forums
  • Coach One of your tutorials has over 1,000 readers
  • Regular Visitor Visited Construct.net 7 days in a row
  • RTFM Read the fabulous manual
  • Great Comment One of your comments gets 3 upvotes
  • Email Verified

Progress

19/44
How to earn trophies