Omnimaga: The Coders Of Tomorrow
Welcome, Guest. Please login or register.
 
Omnimaga: The Coders Of Tomorrow
22 May, 2013, 11:57:10 *
Welcome, Guest. Please login or register.

Login with username, password and session length
 
   home   news downloads projects tutorials misc forums rules new posts irc about Login Register  
+-OmnomIRC

You must Register, be logged in and have at least 40 posts to use this shout-box! If it still doesn't show up afterward, it might be that OmnomIRC is disabled for your group or under maintenance.

Note: You can also use an IRC client like mIRC, X-Chat or Mibbit to connect to an EFnet server and #omnimaga.

Pages: [1]   Go Down
  Print  
Author Topic: Physics engine 3.2 -  (Read 456 times) Bookmark and Share
0 Members and 1 Guest are viewing this topic.
Frog
LV2 Member (Next: 40)
**
Offline Offline

Last Login: 22 February, 2013, 01:51:11
Date Registered: 17 June, 2011, 16:35:35
Posts: 35

Topic starter
Total Post Ratings: 0

View Profile
« on: 29 June, 2012, 21:23:42 »
0

Hi everyone,

It's been some time since I last checked Omnimaga (although I've never been an active member), but now that I'm finished with my exams I finally have the time to program a calculator game again. And now I noticed that OS 3.2 has been released! I really want to try the Physics engine, because I'm thinking of making a game utilizing it, but I don't really know how to start.

I saw the video of the physics engine, but couldn't find the source code for it. Also, TI's documentation is pretty sparse. I assumed you didn't need to initialize the engine like you normally should, and I've been able to add a space, a body, and a shape. But how do I draw this? I guess you should somehow loop over all shapes and draw them in the positions the engine tells you to, but how do I do this? Or is there a better way? I can't find it in the reference...

On a side note: is using this physics engine overkill for a simple platforming game?
Logged
Jim Bauwens
Lua! Nspire! Linux!
Editor
LV10 31337 u53r (Next: 2000)
*
Offline Offline

Gender: Male
Last Login: Today at 08:05:41
Date Registered: 28 February, 2011, 22:32:12
Location: Belgium
Posts: 1733


Total Post Ratings: +180

View Profile WWW
« Reply #1 on: 29 June, 2012, 21:38:48 »
0

Yes, I know it is complex. Luckily I have managed to master it a bit, and will write a tutorial as soon as I get the time.
I'll see to post here some examples soon Smiley
Logged

Lionel Debroux
LV10 31337 u53r (Next: 2000)
**********
Offline Offline

Gender: Male
Last Login: Today at 07:48:59
Date Registered: 17 December, 2009, 09:37:25
Location: France
Posts: 1854

Total Post Ratings: +208

View Profile WWW
« Reply #2 on: 29 June, 2012, 21:40:00 »
0

Quote
On a side note: is using this physics engine overkill for a simple platforming game?
If the game is simple enough, I'd say "yes" Smiley
Logged

Member of the TI-Chess Team.
Co-maintainer of GCC4TI (GCC4TI online documentation), TILP and TIEmu.
Co-admin of TI-Planet.
Frog
LV2 Member (Next: 40)
**
Offline Offline

Last Login: 22 February, 2013, 01:51:11
Date Registered: 17 June, 2011, 16:35:35
Posts: 35

Topic starter
Total Post Ratings: 0

View Profile
« Reply #3 on: 29 June, 2012, 21:58:00 »
0

@jimbauwens: Indeed, it's way more complex than I expected! Even just some working source code would help me out a lot, I think I can figure out from that how it works. And maybe I could then also help you with a tutorial? Smiley

@Lionel: Mmm, maybe I should then just use plain-old Lua then... On the other hand, isn't it true that all the calculations made by the physics engine are faster than anything you can do in Lua, since it's backed by native code?
« Last Edit: 29 June, 2012, 23:52:55 by Frog » Logged
Jim Bauwens
Lua! Nspire! Linux!
Editor
LV10 31337 u53r (Next: 2000)
*
Offline Offline

Gender: Male
Last Login: Today at 08:05:41
Date Registered: 28 February, 2011, 22:32:12
Location: Belgium
Posts: 1733


Total Post Ratings: +180

View Profile WWW
« Reply #4 on: 30 June, 2012, 21:24:14 »
0

Frog, I send you some code in a pm Smiley
Logged

ExtendeD
Coder Of Tomorrow
LV8 Addict (Next: 1000)
*
Offline Offline

Gender: Male
Last Login: Today at 10:41:34
Date Registered: 02 January, 2010, 13:03:41
Location: France
Posts: 765

Total Post Ratings: +151

View Profile
« Reply #5 on: 01 July, 2012, 08:34:46 »
0

Why not pastebin it and share it with all of us?
Logged

ndlessly - Progress and insights on Ndless
Ndless / Hackspire - Third-party TI-Nspire development
DJ Omnimaga
Retired Omnimaga founder (Site issues must be PM'ed to Netham45, Eeems, Shmibs, Deep Thought and AngelFish, not me.)
Editor
LV15 Omnimagician (Next: --)
*
Offline Offline

Gender: Male
Last Login: Today at 07:31:30
Date Registered: 25 August, 2008, 07:00:21
Location: Québec (Canada)
Posts: 50214


Total Post Ratings: +2613

View Profile WWW
« Reply #6 on: 01 July, 2012, 10:20:41 »
0

Quote
On a side note: is using this physics engine overkill for a simple platforming game?
If the game is simple enough, I'd say "yes" Smiley
Would Metroid be feasible?


<a href="http://www.youtube.com/watch?v=ls5uo4xidwQ" target="_blank">http://www.youtube.com/watch?v=ls5uo4xidwQ</a>
Logged

Retired 83+ coder, Omnimaga/TIMGUL founder. Now doing power metal music (formerly did electronica)

Follow me on Bandcamp|Facebook|Reverbnation|Youtube|Twitter|Myspace
Jim Bauwens
Lua! Nspire! Linux!
Editor
LV10 31337 u53r (Next: 2000)
*
Offline Offline

Gender: Male
Last Login: Today at 08:05:41
Date Registered: 28 February, 2011, 22:32:12
Location: Belgium
Posts: 1733


Total Post Ratings: +180

View Profile WWW
« Reply #7 on: 01 July, 2012, 10:24:57 »
0

Because it needs to be cleaned up, and some parts of code I spend a lot of time on and I don't want to release it publicly yet. But don't worry, I'll post some nice code very soon Smiley
Logged

Frog
LV2 Member (Next: 40)
**
Offline Offline

Last Login: 22 February, 2013, 01:51:11
Date Registered: 17 June, 2011, 16:35:35
Posts: 35

Topic starter
Total Post Ratings: 0

View Profile
« Reply #8 on: 01 July, 2012, 12:25:58 »
0

Jim, thanks for the code! Although I haven't had the time to go through it yet, a quick glance gave me a better idea as to how you should draw the items. I expected a function in Chipmunk to loop through everything, but I guess you should just create separate objects for everything, like you've done...

It really helps a lot! Smiley
Logged
Pages: [1]   Go Up
  Print  
 
Jump to:  

Powered by EzPortal
Powered by MySQL Powered by SMF 1.1.18 | SMF © 2013, Simple Machines Powered by PHP
Page created in 0.278 seconds with 31 queries.
Skin by DJ Omnimaga edited from SMF default theme with the help of tr1p1ea.
All programs, games and songs avaliable on this website are property of their respective owners.
Best viewed in Opera, Firefox, Chrome and Safari with a resolution of 1024x768 or above.