Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

AppGameKit Classic Chat / Box 2D Demos

Author
Message
RickV
TGC Development Director
24
Years of Service
User Offline
Joined: 27th Apr 2000
Location: United Kingdom
Posted: 27th Oct 2011 15:53
Hi,

There are some great demos of Box 2D being used in Flash HERE

Does anyone want to try and emulate demos like these in AppGameKit? TGC want to see some demos like this and add them to the code examples to the core product.

If you are interested in helping then please get in contact.

Rick

Financial Director
TGC Team
bjadams
AGK Backer
16
Years of Service
User Offline
Joined: 29th Mar 2008
Location:
Posted: 27th Oct 2011 19:29
i would love to see an example how to do the water demo
Impetus73
12
Years of Service
User Offline
Joined: 28th Aug 2011
Location: Volda, Norway
Posted: 27th Oct 2011 19:33
Yes seems like we need DRAWING commands, before half of these demos is doable in AppGameKit?

I would love to be able to do drawing commands on sprites, and also be able to make sprites from copied areas of sprites you used the drawing commands on.

----------------
AGK user - novice
Did Amiga / AMOS programming in the 90's, just started programming again with AGK.
baxslash
Valued Member
Bronze Codemaster
17
Years of Service
User Offline
Joined: 26th Dec 2006
Location: Duffield
Posted: 28th Oct 2011 12:57
I had a few ideas for drawing shapes... the demo where you draw a shape and it is created in b2d is possible in AppGameKit but I don't have time to make it. It's a problem I thought about on my way to work and have a solution for (in my head anyway).

If anyone's interested I can shed some light on a method of drawing triangles using one sprite and three points selected by the user. If I get time I'll do a simple demo that someone could add to or finish off.

BatVink
Moderator
21
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 29th Oct 2011 11:16
As well as 2D shape drawing, another required feature seems to be one-sided shapes (i.e collidable only from one side)

baxslash
Valued Member
Bronze Codemaster
17
Years of Service
User Offline
Joined: 26th Dec 2006
Location: Duffield
Posted: 23rd Nov 2011 09:48
I think I might have to do a quick demo just for some light relief from my current project. Time allocated: 2hrs MAX... watch this space.

baxslash
Valued Member
Bronze Codemaster
17
Years of Service
User Offline
Joined: 26th Dec 2006
Location: Duffield
Posted: 25th Nov 2011 17:49
OK so 2 hours isn't very long, but here's a simple demo (attached).

Attachments

Login to view attachments
JimHawkins
14
Years of Service
User Offline
Joined: 26th Jul 2009
Location: Hull - UK
Posted: 25th Nov 2011 18:19
Brilliant!

-- Jim
RickV
TGC Development Director
24
Years of Service
User Offline
Joined: 27th Apr 2000
Location: United Kingdom
Posted: 26th Nov 2011 00:47
Great demo baxslash! Can I make a video of it and share it online?

Rick

Financial Director
TGC Team
Marl
12
Years of Service
User Offline
Joined: 19th Nov 2011
Location: Bradford, UK
Posted: 26th Nov 2011 11:04
The comment about the water demo got me thinking...

... then coding...

... here's what I came up with.

Perhaps not as dramatic, but it has waves - kind of

Attachments

Login to view attachments
Impetus73
12
Years of Service
User Offline
Joined: 28th Aug 2011
Location: Volda, Norway
Posted: 26th Nov 2011 11:41
Great work as usual baxslash!

The boxes seems to be "compressable" I guess it's how it must be for the beams to be able to move, but is there a way to make the boxes not being able to move behind eachothers, so the beams gets blocked? I guess this would be done in the code, but the physics system should give some feedback if an object is obstructed from movement in any directions.

How do i make objects with 1 side colliding? such as eleavator beams where the hero jumps infront of it, but if he touch it from above, he follows the beam up?

----------------
AGK user - novice
Did Amiga / AMOS programming in the 90's, just started programming again with AGK.
baxslash
Valued Member
Bronze Codemaster
17
Years of Service
User Offline
Joined: 26th Dec 2006
Location: Duffield
Posted: 26th Nov 2011 14:53
Quote: "Great demo baxslash! Can I make a video of it and share it online?"

Of course! I have a few more planned

Quote: "The boxes seems to be "compressable" I guess it's how it must be for the beams to be able to move, but is there a way to make the boxes not being able to move behind eachothers, so the beams gets blocked? I guess this would be done in the code, but the physics system should give some feedback if an object is obstructed from movement in any directions."

I'll have to have a play with that as I'm not sure. I'm sure it's possible though.

Quote: "How do i make objects with 1 side colliding? such as eleavator beams where the hero jumps infront of it, but if he touch it from above, he follows the beam up?"

Not sure that's currently possible using the commands we have... unless you use a sensor object and apply forces manually... again I'll see what I can come up with

baxslash
Valued Member
Bronze Codemaster
17
Years of Service
User Offline
Joined: 26th Dec 2006
Location: Duffield
Posted: 26th Nov 2011 20:07
Quote: "The comment about the water demo got me thinking...

... then coding...

... here's what I came up with.

Perhaps not as dramatic, but it has waves - kind of"

That's awesome work Marl

I love the water effect, very clever!

Paul Johnston
TGC Developer
21
Years of Service
User Offline
Joined: 16th Nov 2002
Location: United Kingdom
Posted: 28th Nov 2011 15:39
You could make the beams stop by making them dynamic objects controlled by motors and joints. You may need to make the forces involved quite large to move the large stacks of boxes around and those may still produce some squashing, but it would definitely be reduced. Note that doing it this way may also get the beams stuck if, for example, the rotating beam gets a box jammed at the top.
baxslash
Valued Member
Bronze Codemaster
17
Years of Service
User Offline
Joined: 26th Dec 2006
Location: Duffield
Posted: 28th Nov 2011 15:48
Good idea. Might make it more realistic that way and beams getting stuck would only happen in a badly designed machine in real life too

I might make that change before I work on another B2D demo, see how it flies.

RickV
TGC Development Director
24
Years of Service
User Offline
Joined: 27th Apr 2000
Location: United Kingdom
Posted: 28th Nov 2011 16:04 Edited at: 28th Nov 2011 16:05
Hi Guys,

Great to see the demos. I have made a small video showing them off.

Box2Dvideo

Rick

Financial Director
TGC Team
Cliff Mellangard 3DEGS
Developer
18
Years of Service
User Offline
Joined: 20th Feb 2006
Location: Sweden
Posted: 28th Nov 2011 22:01
Quote: "Hi Guys,

Great to see the demos. I have made a small video showing them off."

I think they are worth some small prizes rick

They where the only ones that made some samples and they where really good

Why did no one else do any clever stuff with box 2d ?
Iam to bad with physics but the others?
baxslash
Valued Member
Bronze Codemaster
17
Years of Service
User Offline
Joined: 26th Dec 2006
Location: Duffield
Posted: 29th Nov 2011 12:01 Edited at: 29th Nov 2011 12:02
Here's another one where you can draw dynamic / static rectangles / circles and add wheels

EDIT: And the video Rick posted:


Attachments

Login to view attachments
RickV
TGC Development Director
24
Years of Service
User Offline
Joined: 27th Apr 2000
Location: United Kingdom
Posted: 29th Nov 2011 12:30
Very clever baxslash! You're just a few steps away from making a fully blown physics editor there!

I'll make another video showing this, it's very cool.

Rick

Financial Director
TGC Team
baxslash
Valued Member
Bronze Codemaster
17
Years of Service
User Offline
Joined: 26th Dec 2006
Location: Duffield
Posted: 29th Nov 2011 12:36 Edited at: 29th Nov 2011 12:37
Thanks Rick! That one took about an hour and a half... more or less.

AGK makes the physics easy really. I think people expect it to be complicated but actually most of the complication comes in getting it to do what you want when you want it to. The physics takes care of itself for the most part.

EDIT: Forgot to mention you can drag objects with the mouse too when no 'tool' is selected.

RickV
TGC Development Director
24
Years of Service
User Offline
Joined: 27th Apr 2000
Location: United Kingdom
Posted: 29th Nov 2011 12:45
Great, dragging is a lot of fun!

I just changed the whole app to landscape (better for video) and it was easy to do thanks to AppGameKit and the way you coded it.

Rick

Financial Director
TGC Team
baxslash
Valued Member
Bronze Codemaster
17
Years of Service
User Offline
Joined: 26th Dec 2006
Location: Duffield
Posted: 29th Nov 2011 12:49
Glad I made it easy

I always use the percentage system now and it certainly makes changing the orientation a lot easier. It was hard to get used to at first and confused the wotsit out of me when I tried using Sin, Cos and Tan, but now I find it very logical.

RickV
TGC Development Director
24
Years of Service
User Offline
Joined: 27th Apr 2000
Location: United Kingdom
Posted: 29th Nov 2011 14:39
Here's my video of your latest physics demo;





Rick

Financial Director
TGC Team
baxslash
Valued Member
Bronze Codemaster
17
Years of Service
User Offline
Joined: 26th Dec 2006
Location: Duffield
Posted: 29th Nov 2011 14:42
Looks like you had fun

Impetus73
12
Years of Service
User Offline
Joined: 28th Aug 2011
Location: Volda, Norway
Posted: 29th Nov 2011 15:01
baxslash, you'r a semigod when it comes to cool small demos! I need to make a physics game soon this looks fun!

----------------
AGK user - novice
Did Amiga / AMOS programming in the 90's, just started programming again with AGK.
baxslash
Valued Member
Bronze Codemaster
17
Years of Service
User Offline
Joined: 26th Dec 2006
Location: Duffield
Posted: 29th Nov 2011 15:08
Quote: "baxslash, you'r a semigod when it comes to cool small demos! I need to make a physics game soon this looks fun!"

You're too kind

You should have a play making a physics game though seriously it's great fun.

Nokiaqd
14
Years of Service
User Offline
Joined: 31st Aug 2009
Location:
Posted: 1st Dec 2011 11:13 Edited at: 1st Dec 2011 11:49
My 2c, 5 min



badablog.ru - bada developer
baxslash
Valued Member
Bronze Codemaster
17
Years of Service
User Offline
Joined: 26th Dec 2006
Location: Duffield
Posted: 1st Dec 2011 11:20
Nice

You can show youtube videos here by putting it in brackets like this:
[ youtube ]nIptMrk0nMs[ /youtube ]

...but without the spaces.


Nokiaqd
14
Years of Service
User Offline
Joined: 31st Aug 2009
Location:
Posted: 1st Dec 2011 11:44
baxslash tnx, it's not a final version

badablog.ru - bada developer
bjadams
AGK Backer
16
Years of Service
User Offline
Joined: 29th Mar 2008
Location:
Posted: 5th Dec 2011 19:41 Edited at: 5th Dec 2011 22:57
Baxslash well done for the nice water Physics demo. Had some hard time trying to understand how the water worked and converting it to T2, but finally I managed it was a good exercise.
baxslash
Valued Member
Bronze Codemaster
17
Years of Service
User Offline
Joined: 26th Dec 2006
Location: Duffield
Posted: 6th Dec 2011 07:36
I can't take credit for that one I'm afraid that one was by Marl.

bjadams
AGK Backer
16
Years of Service
User Offline
Joined: 29th Mar 2008
Location:
Posted: 6th Dec 2011 14:06
Marl is very ingenious indeed!
baxslash
Valued Member
Bronze Codemaster
17
Years of Service
User Offline
Joined: 26th Dec 2006
Location: Duffield
Posted: 6th Dec 2011 14:39
It's a great solution to the water problem! I wish I thought of it

Marl
12
Years of Service
User Offline
Joined: 19th Nov 2011
Location: Bradford, UK
Posted: 7th Dec 2011 16:48 Edited at: 7th Dec 2011 16:49
You guys really are too kind, you'll have me blushing

Anyway, back to the point.

I've been trying to get my head around physics forces in AppGameKit ( which never seem to do what I expect ), so created a project to help me visualise what's happening.

It's always good when doing things like this to set a goal - so I was aiming for the simulation of gravitational eddys around moving planets.

Well sometimes you've gotta' aim high

When I'd got what I wanted from it, I thought why not tidy it up a bit, comment the code and and pop it up here so other people can benefit from what I learned.

Hope you like it.

Attachments

Login to view attachments
baxslash
Valued Member
Bronze Codemaster
17
Years of Service
User Offline
Joined: 26th Dec 2006
Location: Duffield
Posted: 7th Dec 2011 21:19
That looks cool Marl, nice work!

Preben
AGK Studio Developer
19
Years of Service
User Offline
Joined: 30th Jun 2004
Location:
Posted: 21st Dec 2011 13:55
Here is a Christmas demo,

Wait for some sec for the physics to appear.

Not sure how to do a video to show it, but here is the android .apk file. hope someone are able to make a video from it

BTW: it should display ok on all different orientations , screen sizes etc.. so if you try it please let me know if it looks ok on your device ( and what device you got ), Thanks.

best regards Preben Eriksen.

best regards Preben Eriksen, Vonna.com

Attachments

Login to view attachments
baxslash
Valued Member
Bronze Codemaster
17
Years of Service
User Offline
Joined: 26th Dec 2006
Location: Duffield
Posted: 21st Dec 2011 14:22
Can you provide the code so we can compile it too? Or maybe a windows version?

Not many of us have an android phone but most of us run windows

Preben
AGK Studio Developer
19
Years of Service
User Offline
Joined: 30th Jun 2004
Location:
Posted: 21st Dec 2011 15:55
Sure here is the windows version.

Still looking for feedback on android version, are things placed correctly on all orientations, screen sizes...





best regards Preben Eriksen,

Attachments

Login to view attachments
Preben
AGK Studio Developer
19
Years of Service
User Offline
Joined: 30th Jun 2004
Location:
Posted: 27th Dec 2011 17:31
Playing with AppGameKit physics.



Source.



You are able to record / save your own. take care when you try the Joint, they can really get things moving on the screen.

best regards Preben Eriksen,
baxslash
Valued Member
Bronze Codemaster
17
Years of Service
User Offline
Joined: 26th Dec 2006
Location: Duffield
Posted: 28th Dec 2011 11:02
Nice work Preben!

Flatlander
FPSC Tool Maker
17
Years of Service
User Offline
Joined: 22nd Jan 2007
Location: The Flatlands
Posted: 28th Dec 2011 11:34 Edited at: 28th Dec 2011 11:39
I had just gotten AGK. I have an idea for a game that is based on the concept of Angry Birds but uses a different character that will aim at the unsuspecting victim. It will not have the "sling shot" effect but it will require physics and there will be different barriers and different animals that will be involved on the receiving end. The reason for the preamble is to say that I will need a lot of practice with the physics, so I hope to be able to come up with a completed demo within ??? (who knows - I'm new with math problems in this area - I'm just an ordinary database programmer). I hope to have a couple of wip posts much sooner.

I'm already excited about this.

------------------------------------
Edited an extremely poor sentence structure.

RickV
TGC Development Director
24
Years of Service
User Offline
Joined: 27th Apr 2000
Location: United Kingdom
Posted: 31st Dec 2011 17:31
Hi Preben,

Lovely demo! It doesn't work well on my iPad2, stars off OK but then grinds to a very slow speed.

Rick

Financial Director
TGC Team
Preben
AGK Studio Developer
19
Years of Service
User Offline
Joined: 30th Jun 2004
Location:
Posted: 2nd Jan 2012 14:51
Hi,

Tried it on a android tablet and a samsung galaxy. and i see the problem, actually it looks like a physics bug.

Here is a version that works on mobiles and tablets.



Cant pinpoint the bug other then, gravity and object forces can make physics objects go into each others. And when the physics objects overlab it takes alot of calculations for the physics system to try to get them out again.

Lowering gravity and/or setting bounce ( SetSpritePhysicsRestitution ) to 0 makes it work on mobiles.

Rick: can you confirm the new version works on iPad2 ?

best regards Preben Eriksen,
RickV
TGC Development Director
24
Years of Service
User Offline
Joined: 27th Apr 2000
Location: United Kingdom
Posted: 2nd Jan 2012 21:14
Hi Preben,

Yes that works much better! The frame rate is still slower than the PC but it's not too bad.

I'll ask Paul to check it out later this week.

Rick

Financial Director
TGC Team
Alien Menace
AGK Developer
19
Years of Service
User Offline
Joined: 11th Jan 2005
Location: Earth (just visiting)
Posted: 3rd Jan 2012 05:28
Can anybody help me out converting the first (top-down) car demo located here:

http://www.emanueleferonato.com/2009/04/06/two-ways-to-make-box2d-cars/

Thanks!

Intel i7-2600k - Asus P67 Sabertooth - 16GB RAM - 2x GTX 460 OC SLI - Lexar 128GB SSD Drive - 2TB ATA/600, Windows 7 x64. iPad, iPad2, iPhone 3GS & 4, HTC Inspire, Mac-Mini. Apps published: 3
Joshua A
12
Years of Service
User Offline
Joined: 19th Feb 2012
Location:
Posted: 5th Mar 2012 15:39
I'd love to try that.

It be cool if someone could make a sprite pack containing a set of template images so we can keep all the demos looking the same like that web sight had.
Joshua A
12
Years of Service
User Offline
Joined: 19th Feb 2012
Location:
Posted: 5th Mar 2012 23:14 Edited at: 5th Mar 2012 23:23
baxslash
Valued Member
Bronze Codemaster
17
Years of Service
User Offline
Joined: 26th Dec 2006
Location: Duffield
Posted: 6th Mar 2012 10:00
Nice work Joshua!

Joshua A
12
Years of Service
User Offline
Joined: 19th Feb 2012
Location:
Posted: 6th Mar 2012 16:08
Thanks yours is nice to.
Joshua A
12
Years of Service
User Offline
Joined: 19th Feb 2012
Location:
Posted: 7th Mar 2012 16:28
Here's another one I put together

To use just click drag and release.

http://www.mediafire.com/?ava620crav7hhbr

Login to post a reply

Server time is: 2024-04-30 17:23:26
Your offset time is: 2024-04-30 17:23:26