MJOne's Recent Forum Activity

  • Hi all!

    Well I've reached a snag while fooling around with the perlin noise plugin. The first version.

    Let's say you have a display size of 640x480.

    The noise is 1 pixel big. So the noise map is the same as the display size.

    I have two loops generating the noise one for X and one for Y.

    They read the noise in the noise map and then create 1x1 pixel tiles.

    So if I wanted to be able to zoom the landscape, how would I go about doing this? I know that frequency will allow you to zoom in and out.

    BUT.

    When I zoom in(lowering the frequency), the whole map moves up towards the left corner. But I want to be able to zoom in on the what ever is in the CENTER of the SCREEN, at coordinates 320x 240y.

    How would I go about doing this and what formula is used?

    Thanks in advance! :)

    /MJOne

  • Might work now, I deleted all the instances of the dropshadow 2 effect... I hope...

  • Holy cow I forgott about that. <img src="smileys/smiley9.gif" border="0" align="middle" />

    I will reupload a version without that effect...

  • Try Construct 3

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

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

    First of all I want to thank everyone that have helped me with my previous subjects, you know who you are! <img src="smileys/smiley1.gif" border="0" align="middle">

    Please bear with me, english is not my native language.

    Today I will share a little top-down demo I have made using Construct Classic.

    In this demo the AI units will run for cover, prefering cover points distributed on the map. For each tile I have distributed a LOS node which is a sprite. Due to the fact that the tiles always have their hotspots in the top left corner.

    In this demo I have the walls on the inside of the tile square. I realize now that I could have made them inside on the south and east walls and outside on the north and west walls. Maybe even using the same tile but putting the north and west wall in the outdoor tile next to the floor tile. Anyways...

    Each LOS Node gets a "hide value" like so:

    clamp(int((distance(player.x,player.y,los_node.x,los_node.y))) - (los_node.Value('in_los')*100000) + los_node('cover_point')*240,0,480)

    You can get a very dynamic formula here if you play with the values and add more values like if there is a grenade thrown etc...

    Well since alot of people have been so nice to me on this forum I feel that I want to give something in return, if this has any value to anyone that is. <img src="smileys/smiley36.gif" border="0" align="middle">

    Here it is:

    Example file here!   

    However for the love of all green jelly in the world, I can't make this work when using the nodes as tiles. Does anyone know how to do it?

    It creates alot of overhead using sprites for such a simple task.

    Have a nice day!

    /MJOne

  • Thanks a mill R0j0!

    Now I have something to occupy myself with :)

  • Well I have looked at the example you made and I realize I have some reading to do. <img src="smileys/smiley8.gif" border="0" align="middle" />

    Is it possible to get a reading on the current speed and height(not using sprite.y) of the projectile at any given moment?

    Like so:

    always -> set text to "Speed: " & varSpeed & " m/s" & newline &

                                   "Height: " & varHeight & " meters"

    I respect if you don't have time nor want to waster any energy on a pointless peasant like me, but asking is not a crime yet.

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

    Not that im lazy or so but do you have any articles up your sleeve where I can read more about the formulas you are using, or point me in a general direction so I don't have to bother your superior intellect in the future.(We can hope) <img src="smileys/smiley2.gif" border="0" align="middle" />

    Anyways, thanks again R0J0hound!

    /MJOne

  • Thank you R0J0hound!!!

    Well I know, the thing is this, I am not going to do a platform side scrolling game. I was just using this format to see what happends and if I get it right.

    I am planning to do a top-down turn-based or plan-and-go game. And I want to simulate drag and bullet drop using a "height" variable within the bullet object to determine where on the body the bullet will hit etc...

    I have a penetration formula as well, I might be able to figure that one out or I might post it here for anyone with godly powers to help a puny mortal like myself to make it work. <img src="smileys/smiley2.gif" border="0" align="middle" />

    Thanks again for the example I'll check ?t out asap! <img src="smileys/smiley4.gif" border="0" align="middle" />

    /MJOne

  • Hi!

    I have spent the whole day trying to figure out the equations having to do with drag on objects with a fixed mass.

    My example which I included is kinda like a classic cannon shooting example(Platform-scrolling).

    I have figured out how to implement gravity and convert it to pixels.

    (1 meter = 32 pixels)

    My problem is drag, and how to implement it.

    I found this:

    grc.nasa.gov/WWW/k-12/airplane/flteqs.html

    (alot of interesting articles)

    This is the formula:

    D = .5 * Cd * r * A * Vt^2

    D = Drag (Fd)

    Cd = Drag Coefficient (Bullet = 0.295)

    r(rho) = Gas Density (Air at sea level = 1.225 kg/m3)

    A = Cross-sectional area (Circles; A = Pi * r^2)

    Vt = Terminal Velocity (m/s^2)

    When I calculate this I get a value, I think is is N(Newtons).

    Since I am a greeny on physics I almost have no idea of what I am doing.

    Please be gentle. <img src="smileys/smiley9.gif" border="0" align="middle" />

    So how would I go about inplementing this to the Xpos and Ypos on the bullet. Which updates every 10 milliseconds. (In my example below)

    Any help is very very appriciated!

    Please explain like I was a 5 year old. <img src="smileys/smiley36.gif" border="0" align="middle" />

    According to this:

    en.wikipedia.org/wiki/External_ballistics

    <font color=blue>Drag or the air resistance decelerates the projectile with a force proportional to the square of the velocity.</font>

    Im not sure about this...

    Here is my file:

    web.comhem.se/~u54025770/ballistic_test.rar

    /MJOne

  • Woaw thanks everyone for your great examples, I have alot to learn here! :)

    Im pretty suprised over the positive and enthusiastic response I got here!

    Man you guys are great!

    Thank you all!

    /MJOne

  • Thank you for sharing your great solution! :)

    If and I mean IF I can make it faster I will post it here! :)

    Thanks again!

    /MJOne

  • Woah! You guys are amazing! :)

    Im really moved by how fast I got help on this forum.

    Thanks a thousand times!

    Is it okey with you Animmaniac if I use this method in my game/s?

    I will study these two examples as well, see what I can learn!

    Thanks!

    /MJOne

  • Thanks a million! :)

    Thank you Animmaniac and Tokinsom, that's perfect! ;)

    But how would you stop it from render through 1x1 tile(32x32) walls?

    Like lights in a labyrinth...

    If you have alot of small solid objects scattered about...

    Thanks anyways! I will study this deeply! :)

    /MJOne

MJOne's avatar

MJOne

Member since 19 Jun, 2011

None one is following MJOne yet!

Trophy Case

  • 13-Year Club
  • Email Verified

Progress

14/44
How to earn trophies