Community

CommunityFlash Games

Crush the Castle 2 - Custom Castles

Posted Jul 20, '10 at 7:20pm

castlenovice

castlenovice

848 posts

Metzington: very well done
CourtJester: extremely amazing!! I'm too tired to check what existing elements you used for the thin lines. Congrats anyway!!!

 

Posted Jul 20, '10 at 7:29pm

castlenovice

castlenovice

848 posts

and long fellow is indeed extremely interesting!, CourtJester

That's the only thing I can offer for the moment:
Long board

and this one, all weapons available longlong

 

Posted Jul 21, '10 at 10:39am

CourtJester

CourtJester

4,094 posts

Castle Inpenetrable created by BRP (R, Y's Design)

The detailing on this castle is awesome!

 

Posted Jul 21, '10 at 7:52pm

CourtJester

CourtJester

4,094 posts

Shockingly Deceptive!

Thinly wired although you can use acid!

 

Posted Jul 22, '10 at 3:10am

Metzington

Metzington

4 posts

I'm am obviously kinda new to designing castles and using this forum. So I have a question about some of your designs.

How did you manage to get your boards so long/thin/thick etc? I can only manage to stretch or extend the blocks within a limited range.

Knowing how to do this would greatly help me in some of my designs that I am currently trying out. Learning this technique could possible solve some of the engineering problems I've encountered in the building and testing process.

 

Posted Jul 22, '10 at 9:21am

CourtJester

CourtJester

4,094 posts

@Metzington - you have to edit your designs in a word processor or text editor.  Try loading the following into the game:

{"l":["tg","mg","bg","wc","id"],"r":["rw","rwc","rs","rsc","ri","ric","rb","rbc","rfb","rpb","rrb","rf","rl","rr","ra","rp"],"c":["bws,425,529,1,3,0","bwd,425,374.1,0.5,3,90"],"n":"","t":[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],"o":-1,"p":""}

That is code for a simple tee on a flat plane.  The code for your elements starts with "c":

Each element is defined as the following:

bwd - the type of material
425 is the X position in pixels
374.1 is the Y axis position
{Note that the above xy coordinates are taken at the midpoint of the element)
0.5 is the member thickness which translates to 5 pixels
3 is the member length x 100 = 300 pixels
90 is the angle which would make this element horizontal

So with a little editing I doubled the length and width of each element and change the "y" position of the horizontal piece and you get this:

{"l":["tg","mg","bg","wc","id"],"r":["rw","rwc","rs","rsc","ri","ric","rb","rbc","rfb","rpb","rrb","rf","rl","rr","ra","rp"],"c":["bws,435,379,2,6,0","bwd,435,69.1,1,6,90"],"n":"","t":[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],"o":-1,"p":""}

As for the "t": part of the coding, that is the terrain and I believe the limits are 250 to -20

The left side of the board is something like 0 and the right is around 1100 so if I change the first and third 0 to 250 and the last and third last 0 to 250 you will get this shape.

{"l":["tg","mg","bg","wc","id"],"r":["rw","rwc","rs","rsc","ri","ric","rb","rbc","rfb","rpb","rrb","rf","rl","rr","ra","rp"],"c":["bws,435,379,2,6,0","bwd,435,69.1,1,6,90"],"n":"","t":[250,0,250,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,250,0,250],"o":-1,"p":""}

So that should give you a start. The rest of the coding can be easily changed on screen.

To get the code, use the Save/Export function, edit it and then use the Load/Import function.

Have fun and remember that the code will only allow you to use decimal points to 1/10th accuracy.

 

Posted Jul 22, '10 at 9:31am

CourtJester

CourtJester

4,094 posts

Oops, I made a mistake - the thickness of the part as represented by the third number in the code is multiplied by 20 and not ten so a thickness of 1 = 20 on the screen.

There is a function in the editor with an arrow in a box that if you highlight an element, it will give you the size and location.

 

Posted Jul 22, '10 at 12:59pm

CourtJester

CourtJester

4,094 posts

@All - I did some experimentation and with the code and came up with this ditty:

{"l":["tg","mg","bg","wc","id"],"r":["rw","rwc","rs","rsc","ri","ric","rb","rbc","rfb","rpb","rrb","rf","rl","rr","ra","rp"],"c":["bws,550,399,2,6,0","bwd,550,89,1,6,90","bwd,279.9,439,1,5,90","bwd,820,439,1,5,90","king,274.8,389,1,1,0","king,354.8,389.1,1,1,0","king,419.8,389.1,1,1,0","king,644.8,389,1,1,0","king,719.8,389,1,1,0","king,784.8,389,1,1,0","king,849.8,389,1,1,0","king,-1000,390,1,1,0","king,284.9,39.1,1,1,0","king,395,39,1,1,0","king,555,39.1,1,1,0","king,700,39,1,1,0","king,805,39.1,1,1,0","king,200,380,1,1,0"],"n":"","t":[230,0,230,0,230,0,230,0,230,0,230,0,230,0,230,0,230,0,230,0,230,0,230,-20,-20,-20,-20,230,0,230,0,230,0,230,0,230,0,230,0,230,0,230,0,230,0,230,0,230,0,230],"o":-1,"p":""}

The terrain top limit is 230 and the bottom is -20.  I added some kings on the new boards and top and put one king behind the trebuchet.

To see the experiment, import the above text into the game.  By my calculations, the two bottom boards should be exactly touching tower.  Throw some fire at it.  Hmmmm???

BTW - the only way to kill the king behind the trebuchet is to use a detonator bomb (click click boom!)

Okay - hit the back button, then settle then save and then play.  What happened to the king behind the trebuchet you ask?  Listen, you will hear him die above the trebuchet - sometimes twice!!!

If you make the right hand board longer by changing the 5 to a 6 and move the horizontal position by 50 (or 1/2 of 100) to the right and import it into the game.  Once there, click on any object!  ha ha ha - it disappears!  Not!  It ends up above the game by about -239 and falls when you hit play so, you can program stuff above the game field.

The point is that while you can place stuff horizontally from -1000 to 1100, anything outside of the 0-1100 border will act strangely as I think Joey wanted you to stay within these margins.  The left side is not as critical as the trebuchet is still part of the playing field.  Anything that sticks into the right hand side however, will disappear if you touch anything else!  So if you have a horizontal piece that is say 600 long and the centre is put at anything further than 1100-300 or 800, it will take off on you if you touch anything in the editor and be elevated somewhere in the code.

One more thing, if you toss something at the trebuchet or use a tall tower to fall on it, the piece will shatter!

The playing field is meant to be 0,0 (Top Left) to 700,1100 (Bottom Right) so it is best to keep your pieces totally enclosed it this space or strange things might happen.

Somewhere on my profile, Castlenovice has given instructions on how to build levels using Excel.  That may be an easier way to build from scratch as you can use formulae to position each piece.

Enjoy and I hope this was helpful.

 

Posted Jul 22, '10 at 1:11pm

Google567

Google567

3,605 posts

Hey Ernie get Floyd on, tell him he could win 50 bucks for a castle.

 

Posted Jul 22, '10 at 1:27pm

Ernie15

Ernie15

11,225 posts

Screw Floyd, that $50 is mine!

Nahh I'll get him, but I doubt he'll ever win anything.

 
Reply to Crush the Castle 2 - Custom Castles

You must be logged in to post a reply!