dodecagon's

This forum is currently in read-only mode.
  • Hi Guy's,

    I'm woring on a remake of Star Castle.

    Basically Star Castle has 3 dodecagons that rotate around each other.

    When the play shoot a side then it disapears.

    Here's a video of what it looks like

    Subscribe to Construct videos now

    I was trying to work out the bast way to aproach it.

    Should I cut a dodecagon into pizza slices then rotate them from a hotspot in the centre?

    Or is it better just to get single line sprites and plot there course around the screen (which seems like a lot of work).

    Any other suggestions welcome.

  • Interesting little problem, I liked the look in that video, so here's my take on it.

    Really simple - just a displaced pivot and then a loop rotates and places them to insure a decent fit.

    You'd have to do some maths to find out the angles and distances for a Decagon, but the idea would be the same.

    Edit: Added more types, same link.

  • Wow that's great!

    You can alway's learn heaps from a good example:

    • Just using white sprites and adding the tint (that was neat)
    • Creating all the new sprites and setting them to the right angle via loopindex
    • getting them to rotate via rotate behaviour (I completely over looked this)

    But I couldn't work out how you got them all into position. You destroy the original sprites so how do they all form a ring in the right order?

    Is it because on the frist tick a sprite is added, set it it's angle then rotated and then the same on the 2nd tick, etc

  • The magic happens in the sprite itself - the pivot point is offset a different length for each color - so basically everything else just happens by itself.

    When you click a sprite you'll see the pivot off to the side. I had to do a little experimenting to find out which values work for which side count and distance, but it took seconds basically. Double click a sprite an click the little red and blue target icons at the bottom and you can change the pivot offset.

    Another thing to try - it seemed like in the video these were nicely pulsing as well - I did achieve that effect by using the excellent Scale Behaviour by linkman. Just set it to something like 125% horizontal scale and 700% vertical scale, looping on and loop mode to ping-pong and BAM! pulsing away.

  • Actually if we assume that you'd only need 10 sides you can reuse the same object and just sort-of scale it to achieve as many layers as you like.

    Here's an example.

    To have the attack light balls like in the video you'd probably have to set up an image point on the middle of the line sprite and then pair them up. But overall everything that could be seen in that video seems quite doable and might turn out looking and playing quite nicely.

    Edit: You can now click to destroy individual lines just to get a feel for it.

  • How did you put an expression in the color filter? <img src="smileys/smiley3.gif" border="0" align="middle" />

  • How did you put an expression in the color filter? <img src="smileys/smiley3.gif" border="0" align="middle" />

    Yeah, took me a while as well - right click the Filter and pick Use Expression.

  • That's cool.

    I haven't tried adding the Scale bahaviour, but I have a player ship and the turret going.

    .cap

    Guess I'll work on the bullets and removing those walls (like in your example).

  • That's pretty cool - one thing I'd look into would be to draw the ships in some vector program, like, say, Inkscape, the result would be cleaner, sharper lines, tike this.

    But that's purely aesthetic, so of no significance, really.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I agree it looks better, do you save the svg as a BMP or can Construct use SVG's?

    I was having a play with inkscape today, still going through the tutes. It's a bit different to a normal graphic's program but when I get the hang of it I'll update the graphics.

    Have you been using construct for long? Made any games?

  • Did you use another layer in inkscape to trace the exsisting graphics?

    Or was it freehand?

  • I would make an outline of what you want, then put that in the centre of a transparent container with a nice power-of-two size (like 64x64 or 128x128 pixels - Construct loves that) and export as PNG, which allows transparency.

    Construct - I used it a bit about a year ago, then took a break and now I'm trying to finally finish something for a change. It's a work in progress, very rough for now.

    Tracing - just had the bitmaps there, drew right on top of them.

  • I really like the background in R.E.D.D.I.T, the plasma effect looks cool.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)