ahlekoofe / gamekit

Automatically exported from code.google.com/p/gamekit
0 stars 0 forks source link

Some minor problems, createImp assign activeScene wrong, zzip failed to compile on 64 bits linux, and add applyForce #179

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
For createImp(gkGameobject) problem:
1. Call createImp(copied object) method

For  zzip failed to compile on 64 bits Linux problem:
1. On cmake uncheck DisableZip
2. compile the Ogrekit

For applyForce problem
1. gkGameobject has applyForce method, but it will only apply force to the 
center of the object

What is the expected output? What do you see instead?
For createImp(gkGameobject) problem:
The copied object should have the same activescene as the original object
But the copied object will have different activescene if it is not assigned

For  zzip failed to compile on 64 bits Linux problem:
Should be compiled OK, but produce the compile error int64_t has been 
previously defined. 

For applyForce problem
gkGameObject should be able to apply force to specified position like in the 
bullet physics. Lua should also have applyForce methods?

What version of the product are you using? On what operating system?
Ubuntu 11.04 64 bits with r962.

Please provide any additional information below.
I do not know if I should open topic for each of above problems, since each of 
them is very minor. Please correct me if I am wrong and sorry for any 
inconvenience, thank you very much.

I did extend the applyForce method to Lua, but I still kind of struggle to 
decide whatever I should recalculate the user input position to relative to the 
center of the object, or let users take care of it by themselves.Right now it 
is like applyForce(force vector, relative positive) just as it is in bullet 
physics.

Original issue reported on code.google.com by CHRISTYH...@gmail.com on 14 Jul 2011 at 3:23

Attachments:

GoogleCodeExporter commented 8 years ago
Sorry, I described one of things wrong. It should be cloneImpl instead of 
createImpl. 
But the patch file is correct.

My suggestion is:

void gkGameObject::cloneImpl(gkGameObject* clob)
 { 
-   clob->m_activeLayer = clob->m_activeLayer;
+       clob->m_activeLayer = m_activeLayer;

But the patch file also includes something about Swig that I did not change, 
but it revised after I installed Swig library.

Sorry If I did the patch incorrectly, I will resubmit it again, if it is needed.

Thanks for the helps.

Sincerely,
Danil

Original comment by CHRISTYH...@gmail.com on 28 Jul 2011 at 4:19

GoogleCodeExporter commented 8 years ago
This is only very frustrating for people who want to use RTShaderSystem, since 
it seems to trigger the "disable zip" back to false, because apparantly, the 
Zip with shaders in engine/user/ is a requirement.

What are these files for?
Is there a way to fix zzip for 64 bit linux?

Original comment by joeyferweda@gmail.com on 20 Oct 2011 at 8:41

GoogleCodeExporter commented 8 years ago
The attachment is a diff file that you would be able to apply to your svn file.

So it is the svn command assume you are in the root of your gamekit source 
directory:

patch -p0 -i ~/Patch.diff

But the patch file was old (for r963) that it corrects other bugs. Some of bugs 
are already corrected in new version r1004.

There is a way to work around the zzip for 64 bit linux. 

in your gamekit source folder, there is a file 
/Dependencies/Source/ZZipLib/zzip/stdint.h

change the line:

typedef unsigned _zzip___int64 uint64_t; typedef _zzip___int64 int64_t;

to

# if size_t == 32
 typedef unsigned _zzip___int64 uint64_t; typedef _zzip___int64 int64_t;
# else
typedef unsigned _zzip___int64 uint64_t;
 #endif

You would need to recompile the gamekit again for it to work.

It works for me. It seem like typedef _zzip___int64 is already declared in 64 
bit Linux. So my workaround will be able to ignore it.

Hope it helps.

Sincerely,
Danil

Original comment by CHRISTYH...@gmail.com on 14 Nov 2011 at 6:47

GoogleCodeExporter commented 8 years ago
I issue a new issue that targets at zzip problem.

It is the Issue 203.

It provides a diff file that you can apply directly instead of going in to 
modify the file manually.

Sincerely,
Danil

Original comment by CHRISTYH...@gmail.com on 14 Nov 2011 at 8:30