FORUM CLOSED, PLEASE REGISTER AT FORUM.SIO2INTERACTIVE.COM
Would you like to react to this message? Create an account in a few clicks or log in to continue.

Adding other files to the project and question about instances...

4 posters

Go down

Adding other files to the project and question about instances... Empty Adding other files to the project and question about instances...

Post  exavi Sat Dec 27, 2008 5:41 am

Hi this may seem like the dumbest question ever, but, what should I do in order to add other files than template.mm and template.h to the project without getting more than 1K compilation errors? Its not that what I've written has errors since without "#including" them into the sio2 code or the template code it does not give me any error...

I've seen that all of the sio2 files from the sio2 src are included in "sio2.h" I've tried to do this and it just does not compile I've also tried to #include it into the template files and it does not work either... is it because is buttons.c and buttons.h instead of buttons.mm or something¿?

---

Another question about instances, I would like to know if instances are taken as instances besides knowing that they are instances (ok, weird question here...) I mean if they share info about them or something or they just load like different objects but knowing that they are instances in order have them ordered in some sort of hierarchy or so...

exavi

Posts : 37
Join date : 2008-10-21

Back to top Go down

Adding other files to the project and question about instances... Empty Re: Adding other files to the project and question about instances...

Post  uprise78 Sat Dec 27, 2008 12:04 pm

First Question: you probably just need to right click the new files in Xcode and choose the 'Get Info' option. In the popup there will be a dropdown menu of file types. Be sure to choose source.cpp.objcpp and that should take care of your compilation issues. Try doing a 'Get Info' on one of the SDK files to compare it to your files.

Second Question: I think you are talking about object instances but I am not sure. If you are, instances share materials with each other but they have their own position, mass, velocity, acceleration, etc.

uprise78

Posts : 228
Join date : 2008-10-31

Back to top Go down

Adding other files to the project and question about instances... Empty Re: Adding other files to the project and question about instances...

Post  sio2interactive Sat Dec 27, 2008 7:01 pm

Pseudo-Instance are only sharing geometry, material, texture with their parent... for all the rest such as transformation, physic properties etc... its independent to the object...
sio2interactive
sio2interactive

Posts : 1526
Join date : 2008-08-26
Age : 44
Location : Shanghai

http://sio2interactive.com

Back to top Go down

Adding other files to the project and question about instances... Empty Re: Adding other files to the project and question about instances...

Post  exavi Sun Dec 28, 2008 5:07 am

wow, thanks that "get info" thing worked Wink

about the second question, I meant just that, but I would like to know if vbo's are also taken into account so there are not two vertex arrays with the same vertexes and stuff like this... I am asking this because from what I've seen in the file format specifications all objects save all vertexes but they save also their positions so I was thinking that maybe if these objects are instances they take the same vertex stuff but use this position...


Btw, I would like to know also if this 6K triangle limit is taking into account the scene-view culling system or if this 6k limit is for the whole sio2 file even if it is never going to be seen. (for example a camera ponting in the z++ direction and a couple boxes in z=-5.0f)

And I would like to know also if this scene culling knows if there's something between the view and a certain object or if draws everything that is into the view "frustum". for example: if we are watching a big cube with a small cube inside, the small cube inside is drawn? I guess that it will be drawn since its not bsp-like, right?

exavi

Posts : 37
Join date : 2008-10-21

Back to top Go down

Adding other files to the project and question about instances... Empty Re: Adding other files to the project and question about instances...

Post  exavi Sun Dec 28, 2008 5:10 am

wow, thanks sio2 by the time I submitted last post I've seen your earlier reply. that sharing-geometry thing rocks! Wink

exavi

Posts : 37
Join date : 2008-10-21

Back to top Go down

Adding other files to the project and question about instances... Empty Re: Adding other files to the project and question about instances...

Post  sio2interactive Sun Dec 28, 2008 5:28 pm

Btw, I would like to know also if this 6K triangle limit is taking into account the scene-view culling system or if this 6k limit is for the whole sio2 file even if it is never going to be seen. (for example a camera ponting in the z++ direction and a couple boxes in z=-5.0f)

>> Well the 6k limit is relative, with the current dev. version (1.3.2) with optimization, I was able to render near 40k of triangles at 15 fps and up... with physic ( ground + 10 convex hull) on a sec gen iPod Touch... I realize that was is killing the most is the from the texture switch... Try to reuse the same material as much as possible, and try to create texture atlas (image consolidator will help) as mush as you can.


And I would like to know also if this scene culling knows if there's something between the view and a certain object or if draws everything that is into the view "frustum". for example: if we are watching a big cube with a small cube inside, the small cube inside is drawn? I guess that it will be drawn since its not bsp-like, right?

>> Unfortunately no... at least not at the moment, I haven't find any decent way to do an occlusion test on the device...
sio2interactive
sio2interactive

Posts : 1526
Join date : 2008-08-26
Age : 44
Location : Shanghai

http://sio2interactive.com

Back to top Go down

Adding other files to the project and question about instances... Empty Re: Adding other files to the project and question about instances...

Post  dilshod Sun Dec 28, 2008 11:47 pm

uprise78 wrote:First Question: you probably just need to right click the new files in Xcode and choose the 'Get Info' option. In the popup there will be a dropdown menu of file types. Be sure to choose source.cpp.objcpp and that should take care of your compilation issues. Try doing a 'Get Info' on one of the SDK files to compare it to your files.

Hi, i have added all folders from sio2 src to my project, but after compilation there an error

duplicate symbol luaopen_SIO2_user(lua_State*) in /Users/dilshod/Documents/test/build/test.build/Debug-iphonesimulator/test.build/Objects-normal/i386/sio2_wrap.o and /Users/dilshod/Documents/test/build/test.build/Debug-iphonesimulator/test.build/Objects-normal/i386/sio2.o

in my project's lua folder i can see sio2_wrap.c, but i can't find it in the template.

I'm using 1.3.1 version.

dilshod

Posts : 7
Join date : 2008-12-28

Back to top Go down

Adding other files to the project and question about instances... Empty Re: Adding other files to the project and question about instances...

Post  sio2interactive Sun Dec 28, 2008 11:57 pm

Just use the template project and create a copy then start plugin your code... its alot more simple instead of trying to link back everything...
sio2interactive
sio2interactive

Posts : 1526
Join date : 2008-08-26
Age : 44
Location : Shanghai

http://sio2interactive.com

Back to top Go down

Adding other files to the project and question about instances... Empty Re: Adding other files to the project and question about instances...

Post  Sponsored content


Sponsored content


Back to top Go down

Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum