saiyadjin's Forum Posts

  • the problems with image / animations editor that i have are nothing close to image editing.

    for image editing you usually end up using gimp/ paint.net / photoshop / something other, but i have an animation problem that they simply don't care about to fix.

    and there are few: - you can't shift + detect collision polygon for all frames

    - you can't insta rename all imagepoints on each frame that were created by adding one imagepoint on first frame and then applied to the rest

    - same as above but deleting

    these aren't some hardcore things to ask for, but they're pretty damn usefull and would save a shitton of time when you have animations with 200+ frames. (example - in my upcoming game my boat has 360 frames - i gotta pimp origin points on each of the 360 frames instead of using 2 clicks, then i have to "guess polygon shape" on each frame and more... ) luckily for now only that sprite has that much animations, and some other sprites (like water) have ~250 + 250 normal but they're tiled quadratic so they don't need any (thank god) messing around. and yes memory usage is at 200mb only

  • try this - spawn enemy outisde the layout / walls (give him bound to layout ofc), then let him go towards the block / entrance whatever

    and disable it's collision. it will pass through the wall, and once it's in layout, enable it's collision back. (tanks collision). tank won't collide with solid if it has disabled collisions, or vice versa.

    also read this - https://www.scirra.com/manual/89/bound-to-layout you can try hocus pocusing it with imagepoints (probably too difficult)

  • so i have a boat that has custom movement.

    somewhere on press W i set it's custom movement speed to 50 - and it works good. then i release the key

    and i want it to slowly get down to 0 speed.

    i've tried:

    system every 1.0 sec && boat.custommovement.speed >0 set boat.custommovement.speed-10 - doesn't work

    tried the same invoking a function - doesn't work

    tried the same with every tick - doesn't work

    tried recursion in function - breaks the javascript

    so how exactly do i do it correctly?

  • i would recommend that you use instance variables on your objects. variable numbers/strings/whatever can represent that objects state, and then you can use events like "if human.state == 'sleeping' && timeslept<7h then action sleepmore" (Wheresleepmore adds+1 sec to timeslept) or something like that.

    i tell you.. possibilities are infinite.

  • simple.

    you need FSA (Easiest way to understand it is to check what FSA is and how they work) - state machines.

    in short: the easiest state machine is just a state with transition to itself. what does that mean?

    state is a abstract thing that describes objects current state (like you for instance) - let's say object is human. you are human right?

    and let's say that you have 1 state called sleeping.

    so you are object human with state sleep.

    that state does nothing byitself. therefore we get transitions - objects that move one active state to another when some condition is met. let's take our human object with state sleep. sleep does nothing byitself

    but if we make transition that sleep happens every time after 1 sec passess you get simplest machine. a bit more difficult machine would be if that transition is empty (could and couldn't happen) - describes undetermination - randomness.

    but let's take our simple example and move on. now you have a human object who has a state sleep that repeats every 1 sec. now if we add a new state to our human - working - it's just a state. it never happens. but if we add transition from state1 (sleeping) to state2 (working) with condition after 7 hours. our first condition is going to rotate for 7 hours, but once it reaches 7 hours it's gonna go to state2 and stay there. If we then add condition on state2 - 14 hours to go back to sleep - after 14hours of being in state2 it will traverse to state1 back to sleeping. it's shown in the images below.

    http://i.imgur.com/QT4O16z.jpg

    http://i.imgur.com/hj6f6RN.jpg

    http://i.imgur.com/s4gQV8K.jpg

    so, what you need really is this - state 1 - running, state 2 - jump high, state 3 - slide / roll /something.

    then you need transitions from running state to itself - so it runs indefinitely, and transitions - to state jumphigh if you see /collide/whatever with low object, or to state3 if you colllide/see/is in range /whatever a high object (like flying birds or something). and on both of the state2 and 3 you need to have a transition back to running where it's condition is "after i've avoided"... hard to explain in words, here's the picture down there. what is good about these machines is taht only... your imagination is the limit. you can make 121241241 state machine that will work perfectly. you can make it so big and complex that it's just "like human" if you cover everything you possibly think of.

    http://i.imgur.com/xdid0AA.jpg

  • you know that deduplication happens when exporting and images are added on sheets? still i don't know if sheets are being read from / cut from on usage? how much % do they save ?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • how about writing your own javascript plugin?

    i don't know if C2 supports (it could) that function, but all in all i think you can download some twitter plugin / code and write your own

  • how about - current angle -180? that is the opposite direction of your facing.

  • 2^n-2 ? funny - i have in my game 3-4 sprites with 360 frames, each is 256x256 - when i export i get 2 sheets with everything on for each sprite.

    i've tried then converting it all to 250x250 - and i got like 6-7 or something even more...

    so you're sayin' if i use 254x254 i would get the best results? Ashley

  • let's say you have

    O (0,0) <-- starting point on X,Y coordinate system, and let's say you have

    A (1,1)

    B (-1,-1) points

    Now IF we check the midpoint for these 2 points it's clearly startPoint(0,0) because it's on the center of it.

    But if i understand you correctly - you have A(1,1,5) and B(-1,1,10) where the 3rd number is "weight", meaning that higher value is better, lower is worse - > then we clearly see that B has 2x better value.

    Meaning that our spot that we are looking for is going to be startPoint(-0.25,-0,25) (correct me someone if i'm wrong) - > so you pick up that formula and extend it for N points and there you go.

    an idea just popped out - sum up all the weights then divide with number of points, then calculate the weighted value - (avg * weight) and you should get their "real" values. should be easier to work with that. also i think you should have weights only > 0, for ease of computation. <0 could cause problems.

  • you know that screen resolution at fullHD is 1920x1080? your sprite is 2048x2048. so think how to reduce and not lose quality = gg for your big sprites. huge saving.

  • optimize your pictures - 2^n x 2^n for your sprites. also remove transparent edges on your animations - use that trimming option. oh yeah, if you have a designer that made those and once you trim them your animation starts "blinking" or moving away after trimming - it happens because origin points moved. your designer is gonna have to redo the images with as much as possible little transparent space.

    also - use pngoo tool to optimize pngs before insertion, and you can try after but it might cause troubles. / loss of quality is minimal.

    use audio compressor to compress your files by your def. to lowest possible usable - 44khz, 16 bit. ogg format or wav which uses c2.

    also use background tile instead of sprite for huge images (if they're not animated).

    also use groups / rework your code 5x and shorten it as much as possible to achieve the same result. it is possible.

  • insert 2 objects - both sprites - one teeth one round cube.

    add pin behavior to teeth. add solid to both.

    open teeth / circle image editor - go to collision box right click em and select "guess collision polygon"

    after that in events - on start of layout pin teeth to circle. if you want a special position to pin, set their position to image-point.

    • do your stuff to move /whatever and enable collisions on your sprites - then you should collide nicely.
  • yes i do.

    i know how to set it up, i've been through that guide up and down 10 times tryin' to find why it doesn't work.

    i've cleaned cache from my browser multiple times to try to get it, but nothing. i seriously think there's something wrong with the loader but noone in

    scirra obviously wants to check, so i use a replacement currently for their logo. that works well for now..

  • nope. you can't.

    btw. check if you have .backup file ? you can restore your project to the last working state.

    also create then a empty folder on your desktop and save as project in it. check if everything is there -> therefore you get back your folders and stuff.