Rosetta Code with Construct 2

For educators around the world who use Construct 2 in classrooms

Post » Mon Jul 13, 2015 5:50 pm

Hello guys,

so I noticed Rosetta Code recently and thought it could be a cool learning opportunity to do / achieve different tasks in Construct 2 that are given on that site. Short explaination: Rosetta Code is a collection of tasks. People are encouraged to try and solve the tasks with a programming language of their choice. Afterwards people can easily compare the approaches you can take with different language to solve a problem. Now Construct 2 isn't its own programming language, but instead based off JavaScript. However that doesn't mean we can't look for some simple events to do the tasks, instead of pasting the js into the browser execute function :).

Everyone is invited to participate, it will be interesting to see what you guys can come up with.

List of the more interesting tasks:
http://rosettacode.org/wiki/Category:So ... mming_Task

I'll start with:
100 doors
24 game (note: uses the eval()-function of JavaScript, since I did not want to script an additional calculator)
Last edited by mindfaQ on Tue Jul 14, 2015 11:36 am, edited 1 time in total.
Visual Novel 'Engine' in 100 Events
if you ever have to choose between buying Construct 2 on scirra.com or on Steam, read this: Review
B
22
S
9
G
1
Posts: 787
Reputation: 3,786

Post » Mon Jul 13, 2015 6:57 pm

There's literally a bazillion different ways to do things in C2.
Not to mention regex....
Image ImageImage
B
168
S
50
G
169
Posts: 8,283
Reputation: 108,195

Post » Mon Jul 13, 2015 7:33 pm

Noone claimed otherwise.
Visual Novel 'Engine' in 100 Events
if you ever have to choose between buying Construct 2 on scirra.com or on Steam, read this: Review
B
22
S
9
G
1
Posts: 787
Reputation: 3,786

Post » Tue Jul 14, 2015 3:23 am

Now Construct 2 isn't its own programming language, but instead based off JavaScript.

I disagree. C2's event system is most certainly it's own language, and isn't really anything like Javascript.

But this is a fun idea, I went with this one:
http://rosettacode.org/wiki/Catmull%E2% ... on_surface
Go big or go home, right?

https://dl.dropboxusercontent.com/u/542 ... /cube.capx
It took a while to debug it, but it had to be done today. I wouldn't know what I did in a week. :)
It only take obj files with four sided faces, and I didn't look into the hole cases.
B
92
S
32
G
106
Posts: 5,272
Reputation: 69,455

Post » Tue Jul 14, 2015 3:47 pm

I would have seen C2 as scripting language, but might be wrong.

Anyway... what a strong entry you have there. I really like the way you display the mesh (hope that's the right term) with the line sprites. Need to take a close look at this.
Visual Novel 'Engine' in 100 Events
if you ever have to choose between buying Construct 2 on scirra.com or on Steam, read this: Review
B
22
S
9
G
1
Posts: 787
Reputation: 3,786

Post » Tue Jul 14, 2015 8:02 pm

Draw a sphere
https://copy.com/6GaIMPHUgJEfmVhb

One could probably also just work something with sprites, but using the canvas plugin seemed more reasonable. Added a lot of needless fluff though.
Visual Novel 'Engine' in 100 Events
if you ever have to choose between buying Construct 2 on scirra.com or on Steam, read this: Review
B
22
S
9
G
1
Posts: 787
Reputation: 3,786

Post » Tue Jul 14, 2015 9:32 pm

Very cool!

http://rosettacode.org/wiki/Mandelbrot_set
https://dl.dropboxusercontent.com/u/542 ... lbrot.capx

I tried a sprite approach to draw the pixels with this one. The trick was to set webgl to off, "clear background" to no and make the layer transparent. One of these days I should actually learn how mandelbrots actually work.
B
92
S
32
G
106
Posts: 5,272
Reputation: 69,455

Post » Tue Jul 14, 2015 11:07 pm

A 3d object made of sprites, subdivided in real time.
That should be the default reference for the "not powerful enough" threads.
Image ImageImage
B
168
S
50
G
169
Posts: 8,283
Reputation: 108,195

Post » Wed Jul 15, 2015 2:45 am

@newt
I disagree partially. Sure you can do any algorithm in C2, but it's by no means fast enough for something like this on my PC. Also with me staying with bundled plugins it ended up being more tedious to work with than it could be.
B
92
S
32
G
106
Posts: 5,272
Reputation: 69,455

Post » Wed Jul 15, 2015 10:30 am

We need to crowdfund you a decent pc.
Image ImageImage
B
168
S
50
G
169
Posts: 8,283
Reputation: 108,195

Next

Return to Education and Construct 2

Who is online

Users browsing this forum: No registered users and 1 guest