It is currently Mon Jul 24, 2017 7:35 am

All times are UTC + 1 hour




Post new topic Reply to topic  [ 26 posts ]  Go to page Previous  1, 2
Author Message
 Post subject: Re: Interface to Chipmunk 7.0.1 [2D physics engine]
PostPosted: Sat Jan 02, 2016 7:57 am 
Offline
Enthusiast
Enthusiast
User avatar

Joined: Mon Oct 26, 2015 2:55 am
Posts: 753
Location: Ukraine
mpz wrote:
Thanks for your work. I have time in the new year and will test it with my sprite engine.


Good luck to you.
I having no much experience playing with things like bindings/interfaces, so please write If you have any ideas/found bugs/etc about anything related to this stuff, or just can advice something to make it looking better or being more usable 8)

_________________
Dream on.. forevermore


Top
 Profile  
Reply with quote  
 Post subject: Re: Interface to Chipmunk 7.0.1 [2D physics engine]
PostPosted: Mon Mar 21, 2016 11:55 pm 
Offline
Enthusiast
Enthusiast
User avatar

Joined: Mon Oct 26, 2015 2:55 am
Posts: 753
Location: Ukraine
At last I came to some tests of 64 bit version. It works fine with my current project, however I'm still not sure that all C types defined correctly for x64.

Also now I'm finding those my bindings made crude enough :D
Maybe I should split all the functions to separated interfaces, one per every category, i.e. space, constrains, shapes and so on, that can made code more ordered and clear.
Also, would be nice to create separated binaries with SSE/SSE2 support.
And also I think should try DLL instead of LIB, this will resolve POLINK conflict with MS VC++ compiler if optimizations are enabled.
And there should be better solution for procedures returning and taking structures byval, than rewriting them to pointers with adding "_pb" extension as I did before (that was stupid work, but better than to waste time trying to find other options).

But well, thats all secondary, I can say it works and thats enough for now, it even doesn't need SSE2 optimizations to be enabled, as engine is already good coded and very-very fast with lot objects (like tile-based world in Terraria style) even on oldest hardware.
Rather I should make build for linux, but don't know how soon.

_________________
Dream on.. forevermore


Top
 Profile  
Reply with quote  
 Post subject: Re: Interface to Chipmunk 7.0.1 [2D physics engine]
PostPosted: Sun Mar 27, 2016 10:33 am 
Offline
User
User

Joined: Tue May 20, 2008 11:17 am
Posts: 15
Location: France
Hi,

I am interested in using 2D physics, I downloaded your chipmunk library. But then where should I begin? Is there any tuto? Or at least an example with a little game? What is the list of the new commands and how do they work? Thank you.


Top
 Profile  
Reply with quote  
 Post subject: Re: Interface to Chipmunk 7.0.1 [2D physics engine]
PostPosted: Sun Mar 27, 2016 12:38 pm 
Offline
Enthusiast
Enthusiast
User avatar

Joined: Mon Oct 26, 2015 2:55 am
Posts: 753
Location: Ukraine
Octavius wrote:
Hi,

I am interested in using 2D physics, I downloaded your chipmunk library. But then where should I begin? Is there any tuto? Or at least an example with a little game? What is the list of the new commands and how do they work? Thank you.


The way how I learned it: readed its sources, readed docs, and experimenting with interesting functions trying to do something.
There are examples with some demos, but I was too lazy to port them to PB (lot of code and I didn't see enoughs reasons to port it), just ported simple helloworld to check engine and later ported some more to use in my code, but this is not complete demo to post it (it is binded to my game renderer and other systems).

So generally you should start by downloading sources, learn main engine principles, read C code of official demos and write something based on them.
Also here is a link with general docs: https://chipmunk-physics.net/release/Ch ... test-Docs/
And the Chipmunk forum itself should have some more examples and useful info.

_________________
Dream on.. forevermore


Top
 Profile  
Reply with quote  
 Post subject: Re: Interface to Chipmunk 7.0.1 [2D physics engine]
PostPosted: Mon Mar 28, 2016 2:26 pm 
Offline
User
User

Joined: Tue May 20, 2008 11:17 am
Posts: 15
Location: France
Well, OK. Thank you.

Unfortunately I can't read C code, but your link is very helpful.
The helloworld demo does not show any graphical output, only printed coordinates, so I guess my first step will be to modify that demo to understand how it works.

I am not an experimented programmer, but if I happen to be able to make some working demos I will post them on the forum.


Top
 Profile  
Reply with quote  
 Post subject: Re: Interface to Chipmunk 7.0.1 [2D physics engine]
PostPosted: Tue Mar 29, 2016 3:51 am 
Offline
Enthusiast
Enthusiast
User avatar

Joined: Mon Oct 26, 2015 2:55 am
Posts: 753
Location: Ukraine
Octavius wrote:
Unfortunately I can't read C code, but your link is very helpful.
I am not an experimented programmer, but if I happen to be able to make some working demos I will post them on the forum.


I highly recommend you to start learn C anyway (at least learn it to the level which allows you to translate its code to Purebasic), as C is "immortal classic" language and there are most serious things made on it or languages with similar syntax.

Octavius wrote:
The helloworld demo does not show any graphical output, only printed coordinates, so I guess my first step will be to modify that demo to understand how it works.

Yes that simplest demo probably can be nicely visualised and extended with more interesting stuff than falling ball 8)
Good luck with your attempts and ask if you get some problems or questions about engine

_________________
Dream on.. forevermore


Top
 Profile  
Reply with quote  
 Post subject: Re: Interface to Chipmunk 7.0.1 [2D physics engine]
PostPosted: Tue Mar 29, 2016 4:45 am 
Offline
Enthusiast
Enthusiast
User avatar

Joined: Mon Oct 26, 2015 2:55 am
Posts: 753
Location: Ukraine
Btw, I just updated binaries with this small change
Code:
- redefined CP_EXPORT from "__declspec(dllexport)" to ""; with previous define the resulting EXE had export table with all chipmunk functions


I don't know who made msvc project originally, but that thing when your final executable (game) provides export table of included .lib was dirty and annoying ^^ Should fix it months ago, but as always was too lazy before.

_________________
Dream on.. forevermore


Top
 Profile  
Reply with quote  
 Post subject: Re: Interface to Chipmunk 7.0.1 [2D physics engine]
PostPosted: Wed Jun 15, 2016 10:51 pm 
Offline
Enthusiast
Enthusiast
User avatar

Joined: Mon Oct 26, 2015 2:55 am
Posts: 753
Location: Ukraine
Update because of this
Code:
http://geocities.ws/lunasole/


No more 30-days links, at last I've created some home page to host random stuff.... that should be done 8 or 12 years ago ^^

_________________
Dream on.. forevermore


Top
 Profile  
Reply with quote  
 Post subject: Re: Interface to Chipmunk 7.0.1 [2D physics engine]
PostPosted: Sun Sep 18, 2016 9:08 am 
Offline
New User
New User

Joined: Sun Sep 18, 2016 8:58 am
Posts: 1
I am a noob to PureBasic. How would I go about using the Chipmunk physics engine on Mac OSX?


Top
 Profile  
Reply with quote  
 Post subject: Re: Interface to Chipmunk 7.0.1 [2D physics engine]
PostPosted: Mon Sep 19, 2016 12:27 pm 
Offline
Addict
Addict
User avatar

Joined: Thu Jun 24, 2004 8:51 am
Posts: 1359
Location: Germany
This is windows only compilied

_________________
Belive!
<Wrapper>4PB, PB<game>, =QONK=, PetriDish, Movie2Image, PictureManager,...
http://chipmunk4purebasic.freeforums.org/index.php


Top
 Profile  
Reply with quote  
 Post subject: Re: Interface to Chipmunk 7.0.1 [2D physics engine]
PostPosted: Wed Apr 12, 2017 8:03 pm 
Offline
Addict
Addict
User avatar

Joined: Thu Jun 24, 2004 8:51 am
Posts: 1359
Location: Germany
You can also use the Chipmunk4PB_7.01 :
viewtopic.php?f=14&t=44068

Biggest news:
As UserLib written in full C++

_________________
Belive!
<Wrapper>4PB, PB<game>, =QONK=, PetriDish, Movie2Image, PictureManager,...
http://chipmunk4purebasic.freeforums.org/index.php


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 26 posts ]  Go to page Previous  1, 2

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 3 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  

 


Powered by phpBB © 2008 phpBB Group
subSilver+ theme by Canver Software, sponsor Sanal Modifiye