mepis's Recent Forum Activity

  • I originally posted this on my blog. It might be easier to read there as wel.

    http://kurie.us/how-to-construct-2-explosion-example/

    I recently got an idea for a game. To build that game though I needed a way to create explosive effects, more specifically, the physical effects of an explosion. The graphics could be handled easily enough one way or another. Ultimately though, I needed a way to exert force on all surrounding objects near the explosion and have that exerted force diminish with distance. The explosion effects also needed to be programmatic since I would have no control over where and when the explosion would actually take place.

    This problem sounds easier to handle then what in practice actually was to design. If I were writing code, I could have easily written something that mimicked normal physics equations and have been done with it. As powerful as Construct 2 is, it still has some limitations. I couldn’t just throw together some copied physics algorithm and be done with it.

    So here’s what I came up with. Hopefully, others might find it useful too.

    Example URL: http://www.kurie.us/Games/explosionExample/

    First, and foremost, take a look at the actual example at the URL above. The purple and blue block buttons are labeled accordingly. The orange rectangle acts as the explosive, or the TNT. It can be clicked and dragged. The red blocks can be clicked and dragged around as well. In this example, I left the explosive force at 300. It’s best to see the example if a single block is left close to the TNT and a single block is placed farther away. I have not adjusted this example for density or friction or anything else.

    Now that you’ve taken a look at that, let me explain how it works. Here’s a screenshot of the entire instruction base.

    It’s not that scary. Essentially what happens is when the user initiates the explosion, the system calculates the explosive force on each object in the system and exerts the given force. Otherwise, the game will cycle through each object, see how far away that object is from the explosive device, or the TNT, and push it with a certain force depending on how far away it is. If the game designer has more than one object they want to react to the explosion, it’s as simple as replacing the last instruction with objects that need to be effected.

    Here’s where most of the magic happens.

    First, the Impulse line.

    TL;DR version: IF force imposed < 0 THEN apply 0 force, ELSE apply force

    This is essentially a long if-then statement. I take the maximum amount of force the explosion can exert and subtract the distance from the object. This tells me how much force to impose on the object. I need to make sure it’s not a negative force though. If a negative force were imposed, it would just suck the object towards the explosion, hence the if-then. So, after I figure out if the force is less than 0, then I act accordingly. If the force is less than 0, I do nothing. If the force is more than 0, then I apply the force (with a bit of randomness for fun) to the object.

    It should be noted though, that in Construct 2, density and friction of objects should be changed to give items a more realistic effect. As it stands right now, if an object collides with another object, both objects are sent careening off the screen.

    Next, the Angle line.

    TL;DR (Angle of object to explosion + 180) mod(%) 360

    This line is pretty easy. I figure out the angle of the object facing the explosion. Then I add 180 that measurement to rotate the angle a half circle around, or I turn the angle around. Then, to make sure I don’t end up with some weird angle measurement like 485, I wrap the measurement around the 360-degree curve with the mod operator.That way, instead of ending up with a measurement like 485, I have a usable angle of 125. This essentially just tells the object which direction to go flying in.

    So there you have it. It’s that easy.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I had two initial impressions without spending a lot of time. I played the game for about ~5 minutes or so. The graphics looked very busy. Also, it was very easy. Maybe you should think about getting rid of one of the guns? Essentially, I found I could keep swinging the target back and fourth and hit everything on the screen. Also, don;t lead with the harder bad guys at the beginning of the levels.

  • I've been working casually on a brick breaker game. It's very early beta at this point. I need to add some stuff to it and refine the graphics heavily. I'm curious to get feedback though. I am to make a more rapid paced and intense version of the game.

    I thank anyone ahead of time for their time and feedback.

    Only a couple levels are designed, sort of, at the moment, Left and right arrows move the paddle. The space bar shoots. If a brick is shot so many times, it will be destroyed. The laser does have effects on the ball.

    http://www.kurie.us/Games/PopBlockBlitz/

  • I was going to suggest something else, but jayderyu example is more elegant and graceful. What he is suggesting to do is perfect.

  • That probably means that it's not available in your country. I would email the author and see if you can purchase it directly from them or ask that they make it available in other countries.

  • You're going to have to provide more details to get help. We need to know what kinds of things your game is implementing. A Capx file would be even better.

    As far as I know, there aren't any documented issues with Node. I haven't had a single issue while developing my current game with the newest stable release of Construct 2.

    I could only take a guess that it's a computer related issue or something that happens within your instructions that cause it to lag.

  • I recommend the book mentioned above on Amazon. I grabbed it quick when the author offered it for free. It's geared more as a Construct 2 textbook than it is a game design (theory and such) book. It's a great book to learn Construct 2 though.

    I'm not sure if you're located outside of the U.S. Maybe that's why it wouldn't let you download it? Not all Kindle books are available everywhere. I did a quick search on Amazon and it's still available for $5.

    http://www.amazon.com/So-You-Want-Game- ... and+Theory

  • It's a fun little game - a good time killer in between tasks and such. Bravo!

    I have a suggestion though. I was checking out your website. First, I would recommend a different font. It was difficult to read at best, especially with the effects. Second, I would make a mention of it being under construction near the top of the page. Also, I would move the social networking icons to the side of the page. You have so much screen real estate on the side of the page that isn't being used. Moving the icons to the side, and making them larger and more square-ish, would make them pop and draw readers attention to them.

    Other than that, your website is very creative and interesting.

    Have a day job: Yes

    Occupation: Student, Tech Industry

    Average time spent developing in one week: ~5 hours (changes per week)

    Out of curiosity, would it be easier if you made a Google form or Survey Monkey survey for this? That would help organize your results a lot easier.

  • Dito what fldr said. If you use a larger image, that can suck up resources (video memory) quick.

  • I would guess because the developers want to target as wide variety of devices as possible. The amount of devices running 2.x are diminishing rapidly now of days. I don't know that it's really the wisest thing to attempt to support that variety of target OSes for a small dev. Besides, if you restrict the lowest platform available, in a small way, you also restrict the minimum hardware your game will run on, and in a sense, give you tighter control.

    According to Google, only 13.6% of devices run Gingerbread. Only 0.7% run Froyo. More interestingly, only 10.6% only run ICS (4.0). You can see the breakdown here https://developer.android.com/about/dashboards/index.html?utm_source=ausdroid.net

    More interestingly, as of November of last year, Samsung held 61% of global Android market share. I've heard that Samsung now holds closer to 80% market share though I don't have facts to back that up. http://bgr.com/2013/11/08/samsung-android-devices-market-share/

    Given those facts, I'd say that it would probably be safe to limit the target platform to 4.1. Even generic knock-off Android tablets ship with 4.1 at minimum anymore. Most Samsung phones run 4.1 or above anymore.

  • For Android, I would target 4.0 and above. That should fix a lot of compatibility stuff and give you a broad range to work with. For iOS, I'm not as familiar with. I would fathom a guess and say iOS 6 and above. I haven't developed for iOS though. That's an educated guess.

mepis's avatar

mepis

Member since 17 Oct, 2013

None one is following mepis yet!

Connect with mepis

Trophy Case

  • 11-Year Club
  • Email Verified

Progress

12/44
How to earn trophies