[plugin] 3D using Copperlicht

Post your completed addons to share with the community

Post » Thu Mar 08, 2012 2:33 am

Update 3/31/12 I created a new, more complete game using this plugin:

http://mathbattlegame.appspot.com/static/PhyFPS/index.html

I submitted it to the HB Games contest:

http://www.hbgames.org/forums/viewtopic.php?f=293&t=76413


Update: Now you can shoot "bullets" by pressing 'Q'.

I also added the download to both the plugin and the demo at:

https://sites.google.com/site/jptarqu/downloads

The name of the download is copperlicht-c2-plugin-v-0.9.zip.

Please note that to run the sample capx, you will need to export it to your web server (either local server like IIS express, apache, etc. or to a external server). The reason behind this, is that copperlicht will try to load the external file containing the level made in Coppercube. I could not find a way of embedding that files and the texture files needed by that file in C2's debug server. I personally use IIS express to test the demo in my computer.

Another thing to note is that there is a lot of trial and error trying to match the coordinates between copperlicht and C2. For example, for the walls, I used coppercube to design the 3D level and "measured" the units there and put the objects in the same place in C2's layout.

--------

I am working on a plugin that would allow you to present your C2 levels as 3D levels in copperlicht. Here is a demo so far:

http://mathbattlegame.appspot.com/static/copperlicht/tutorial2/index.html

I synchronize the positions and rotations between C2 and copperlicht, so copperlicht is just a "screen" for C2's logic. In the demo you see that you actually move and rotate the C2 sprite, and copperlicht is just being told to imitate the pos and rotation. This will allow you to use all the nice things from C2 and show them in 3D.

I will work on the plugin more and put a link to a capx and the plugin files.

Note: this plugin and the demo require WebGL because of Copperlicht(tested in Chrome).      juantar2012-04-01 02:28:03
B
26
S
7
G
3
Posts: 118
Reputation: 4,264

Post » Thu Mar 08, 2012 2:45 am

o_O

Wow!!! Awesome!! :D
Moderator
B
88
S
32
G
33
Posts: 3,005
Reputation: 27,432

Post » Thu Mar 08, 2012 3:01 am

It is... probably awesome, even though I can't see the effect in Chrome, Firefox or IE and I'm sure I have all of them updated (probably my graphics card is too old.)

But for non webgl-enabled browsers, would you have to consider having the game be playable in 2d as well?
B
10
S
5
G
1
Posts: 37
Reputation: 1,631

Post » Thu Mar 08, 2012 3:05 am

[QUOTE=juantar]copperlicht is just a "screen" for C2's logic[/QUOTE]

Nice idea!rexrainbow2012-03-08 03:18:01
B
97
S
22
G
178
Posts: 4,121
Reputation: 104,049

Post » Thu Mar 08, 2012 11:25 am

O_o
B
44
S
12
G
13
Posts: 628
Reputation: 10,471

Post » Thu Mar 08, 2012 12:08 pm

Amazing! I presume you could easily have collisions aswell right?

because the 2D demonstration thing, you could make the player a sprite and have the walls a solid acting as collision, am I being dumb or smart?
B
29
S
12
G
7
Posts: 740
Reputation: 7,849

Post » Thu Mar 08, 2012 12:58 pm

Yes, you could have collision. My problem with the demo is that i am using the c2 "move foward" action to move the sprite and it is not stopping at the wall even though the wall is set as "solid". I am sure i am missing something very obvious amd easy to fix, i just have not figure it out, maybe you can help me?

I basically want the sprite to rotate with left and right key and move back or forward with up and down. Right now i am using "set angle" and "mive forward" (none of the built in movements).
B
26
S
7
G
3
Posts: 118
Reputation: 4,264

Post » Thu Mar 08, 2012 1:04 pm

Might try 8 direction.
Image Image
B
161
S
48
G
91
Posts: 7,358
Reputation: 67,271

Post » Thu Mar 08, 2012 1:53 pm

Thank you for your suggestion, but Is there a specific setting for 8 direction to allow rotations with the left and right key? I tried 8 directions before, but when i press left, it just moves left. I need the sprite to rotate only when left is pressed.
B
26
S
7
G
3
Posts: 118
Reputation: 4,264

Post » Thu Mar 08, 2012 2:01 pm

Nope, you would have to event that.
On key right arrow pressed set angle to angle+ blah, blah, blah.
Image Image
B
161
S
48
G
91
Posts: 7,358
Reputation: 67,271

Next

Return to Completed Addons

Who is online

Users browsing this forum: No registered users and 0 guests