Bartosh's Forum Posts

  • ha. now i feel stupid, your program is placing black tiles on all the spots, not just the blank ones.

    to test this change all your tiles opacity to 25% and add an x or whatever on the black tile in the editor.

    so now we know its something to do with you tile gen

  • yeah that's a weird one. if you invert the solid objects( so Black = open, RockyFloor = solid) it works that way. if that helps?

    I'm going to keep playing around with it.

    But you might want to consider doing the collisions based off the array. especially if you plan on having large dungeons, since you'll have to generate the terrain relative to the player to avoid low FPS.

    FYI for anybody else checking out the cap. the HERO is outside the layout due to the solid object, so turn off unbound scrolling in layout2-(testbed) to see whats going on.

  • Ok thats a lot better.

    <img src="smileys/smiley2.gif" border="0" align="middle">

    here ya go:

    FIXED.cap

    ______________________________________________________________

    your logic on finding the angle speed was fine, its just that your debug Text2 object was checking "lastangle" not sprite3.('lastangle') and so was returning 0

    Just a simple oversight. otherwise you would have noticed (AngDif>5) was way to high a speed. so I changed it too (AngDif>1)

    --------------------------

    You had conflicts in finding your lastangle because you were seting it after you already changed the angle.

    That's why moving the 2nd [Always]event above the 1st[Always]event fixes that.

    -------------------------

    I also added a new vareable ('speed') witch I used to determin the idle/skate animations.

    Its just: sqrt(a^2+b^2)

    so

    ('speed') = sqrt(Sprite2[Physics].VelocityX^2+Sprite2[Physics].Velocityy^2)

    --------------------------

    fixed your events that set value 1/2 to find left/right, (you had 1/right, to find left/2)

    and added a [Trigger Once] to your input key animation change event.

    ___________________________________________________________

    TIPS:

    1.Never name a variable "angle". It just makes things confusing. so I changed that to "ang"

    2. Never use large canvas objects. they kill FPS. your better off with hundreds of sprites.

    ______________________________________________________________

    ha,no wonder you were having a hard time explaining, there was nothing majorly wrong, just a whole bunch of small oversights and errors.

    you still should keep a bookmark on the blog I linked though.

    I have a feeling your going to need it to make vectors to find torqe and swing angles in the future.

    <img src="smileys/smiley1.gif" border="0" align="middle">

  • I'm not trying to be a jerk but.

    Pro Tip:

    The people on this site are more than happy to help with problems. however most people are not willing to read a wall of text. you'll probably get more help from more people if you simplify your problem. and try to tackle one issue at a time.

    heck maybe that will help you figure it out yourself. the key to understanding anything is asking the right questions.

    __________________________________________________________

    I Took a quick look at what you got going on, but I'm not sure were to begin or what exactly you want.

    I think you should look at how your events are ordered, just by moving your second "Always:" event above your first "Always:" event I got certain animations to work.

    and if you use set sprite3.angle to angle(0,0,Sprite2[Physics].VelocityX,Sprite2[Physics].VelocityY)

    you don't have to use 2 unnecessary variables to keep track of your last position. just to find your current animation angle.

    Also I highly recommend reading this blog post on linear algebra just to help open up different methods of solving these kind of problems.

    And book mark it. I use it all the time.

    Linear algebra for game developers ~ part 1

  • I always knew ms-paint would be the death of us all.

  • its a lot easy're to use the (for each element)condition than dealing with custom loops if your checking everything in an array.

    further more, just convert the point your checking to a point in the array

    so:

    set value: x to round(.x / 128) set value: y to round(.y / 128)or whatever your tile sizes are.

    and just work with those values, Its just a lot easier to deal with.

  • sounds like you need a global value to store the random number, insted of getting a random one each time?

    and with dealing in array you often have to use str() and int(). not sure if thats what you got going on, but that often happens to me.

  • Basically I'm creating an array of points. then an array of surface normal's between those points. then used those normal's to figure everything out.

    so lighting is just (N * L) * color filter RGB.

    ------------------------------------

    I actually got a very basic ridged body physics system for this 3d mesh normal map system that I'll show you guys after i clean it up.

    ----------------------------

    After I finish the game I'm using these for, I'll take the time to put together some sort of tutorial on it all.

  • a procedural 3d island generator i'm working on. with a defused lighting algorithm.

    <img src="http://imageshack.us/a/img163/7465/islanden.jpg" border="0">

    try it out:

    island gen

    just press space to create islands

    --------------------------------------------------------

    The fps may be low, but i already have plans to dynamically generate the terrain based on the viewer position. witch will increase fps tremendously.

  • having a little trouble understanding what your talking about.

    but..

    a variable assigned to the ground of (0)

    then a condition of if player over ground set to 1

    if ground =1 and player not overlapping add 1

    if ground = 2 (maybe have the effect sprite as a part of a container of the ground?) destroy effect.

  • no problem, glad to help.

  • The answer is picking with the array.

    TA is still were the x. y. are stored

    But I also added a separate array for looping, It's just easier.

    and the "9999999" is just an arbitrary high number.

    For whatever reason you can't use an every (x) amout of time/tick and a "for each loop" so keep that in mind.

    https://www.dropbox.com/s/6vvyhcvfmx7ohd1/help.cap

  • https://www.dropbox.com/s/pkd9oms7fralzv5/ships%20fighting%20ships.cap

    I didn't spend any time cleaning it up but here's a .cap of the same objects belonging to different "teams".

  • i got a way around this problem using a separate object, if your still having troubles with this let me know and I'll put together a .cap for you.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • works like a charm, thanks so much for your help. <img src="smileys/smiley1.gif" border="0" align="middle" />