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 / AGK Version 2.0.15d

Author
Message
Paul Johnston
TGC Developer
22
Years of Service
User Offline
Joined: 16th Nov 2002
Location: United Kingdom
Posted: 17th Nov 2015 16:56
Quote: "Do you think it could possible to have a multiply mode for lightmap (AGK could have two modes fr lightmap : the actual, the multiply)."

It sounds like you want an ambient occlusion map, which could be achieved with a custom shader. This has actually given me an idea to create a command that returns the source code for the current auto generated shader, so you can make changes to it and load it as a custom shader.

Quote: "Will you add the directionnal light (available in the previous version) which is great to create good light ?"

I limited it to one directional light to simplify the shader calculations. You can modify it with the commands SetSunColor and SetSunDirection.

Quote: "ObjectRayCast() doesn't work with SetObjectScale()"

Fixed for the next version

Quote: "SetObjectTransparency(Obj,2) : the additive mode doesn't work (tested on win8 and android)"

Can you provide a small example so I can try to replicate it?

Quote: "the pointlight seems to be bugged on android (tested on samsung galaxynote 10.1) :"

Can you also provide an example for this one, from your screenshot it looks like you may want to use SetPointLightMode to use per pixel lighting.
CJB
Valued Member
20
Years of Service
User Offline
Joined: 10th Feb 2004
Location: Essex, UK
Posted: 17th Nov 2015 17:07
Quote: " This has actually given me an idea to create a command that returns the source code for the current auto generated shader, so you can make changes to it and load it as a custom shader."


Yes please! This would be SOOOO good!
V2 T1 (Mostly)
Phone Tap!
Uzmadesign
SoftMotion3D
AGK Developer
19
Years of Service
User Offline
Joined: 24th Aug 2005
Location: Calgary,Alberta
Posted: 18th Nov 2015 03:21
now that i have gotten around to testing this.... the direct x file format doesn't seem to load uv data using loadobjectwithchildren() command. if it does then i am unable to set an image to it.
i have it loading fine with loadobject and i have also tested an ascii .x as well as a binary .x and the same thing happens.

here is a quick voxel guy i drew to showcase the problem.
www.sheldonscreations.com

Attachments

Login to view attachments
Wilf
Valued Member
18
Years of Service
User Offline
Joined: 1st Jun 2006
Location: Gone to Unity.
Posted: 18th Nov 2015 09:05 Edited at: 19th Nov 2015 12:10
In AGK2 V2 214b on iOS, InAppPurchaseRestore() seems to be hard coded to return finished after checking only 9 items (I have 17 non-consumable items registered with iTunes connect). Items 10 onwards are ignored and will not restore.

I tested the same on 215d but it crashes immediately on calling inAppPurchaseAddProductID(id) for the first item, and there is no Storekit data in the AppData folder on device See below.

[Edit]
Played around in Xcode a bit, I think its a character buffer overflow kind of thing in AGKCommandSwitch.h:


I did a test adding 40 dummy product ids. When the id string is short ("p1", "p2" etc) it completes the adding of all 40. But when its slightly longer ("bea" + the loop iteration number) it crashes at the 13th iteration - same place as when I add my real product ID strings. It looks like if the accumulated length of the product ID strings goes over 61 characters, it crashes.



[Edit]
Did another test, with the product id being just "p" + the iteration number, iterating 400 times.
It got to iteration 52 before crashing.

Blendman
10
Years of Service
User Offline
Joined: 17th Feb 2014
Location: Arkeos
Posted: 18th Nov 2015 09:51 Edited at: 18th Nov 2015 09:55
Hi Paul
Thank you for your answers.


Quote: "It sounds like you want an ambient occlusion map, which could be achieved with a custom shader. This has actually given me an idea to create a command that returns the source code for the current auto generated shader, so you can make changes to it and load it as a custom shader."
Oh yes, it would be great to have this feature !

Quote: "Quote: "Will you add the directionnal light (available in the previous version) which is great to create good light ?"
I limited it to one directional light to simplify the shader calculations. You can modify it with the commands SetSunColor and SetSunDirection."

Ok, I understand. Perhap's it could be interesting (later) to add just another one directionnalLight to have the possibility to do a "backlighting" :
- the sun in orange, the backlight (directionnal) in blue : this made some great visuals. I have tried with pointlight, but it's not the same result as expected ^^.

Quote: "Quote: "SetObjectTransparency(Obj,2) : the additive mode doesn't work (tested on win8 and android)"
Can you provide a small example so I can try to replicate it?"
I have send to you an email with an example

Quote: "Quote: "the pointlight seems to be bugged on android (tested on samsung galaxynote 10.1) :"
Can you also provide an example for this one, from your screenshot it looks like you may want to use SetPointLightMode to use per pixel lighting. "

Yes, I use per pixel lighting.
But, I have tried my test-scene on another Tablet (Samsung Tab 7') and I don't have this bug.
I have only this bug on my Samsung galaxynote 10.1

Here is a basic file to test the bug, but I have only this bug on my samsung GalaxyNote 10.1, and not on my others tablet/smartphone.
I don't know if it can help. If you can, perhap's you should tried the pointlight (with SetLightMode(1,1)) on a galaxynote ^^' (This tablet is great for the market of 3D games made with AGK).
http://www.dracaena-studio.com

Attachments

Login to view attachments
Blendman
10
Years of Service
User Offline
Joined: 17th Feb 2014
Location: Arkeos
Posted: 18th Nov 2015 10:55
It seems instanceObjet() is bugged when we use Create3DPhysicsDynamicBody() with this instance :


http://www.dracaena-studio.com
Space Dream Studios
Competition Prize Winner 2014
14
Years of Service
User Offline
Joined: 3rd Mar 2010
Location:
Posted: 18th Nov 2015 17:44 Edited at: 18th Nov 2015 18:34
I have problems with apps using GPS on my iPhone 6s+ (iOS 9.1).
I'm getting good values and a gps exists on the first start (after installation) of the AppGameKit player on my iPhone.
But after sending the player to the background or switching it off, followed by starting the player again, there are no gps values anymore.

Would be good if others could check following code too on their iPhones and verify, since Paul couldn't reproduce this issue on a iPad. Thanks!

EDIT: Checked it on my iPad (iPad 3 / iOS 9.1) with the same result! So there is a GPS problem at least with iOS 9.1...!?

Blendman
10
Years of Service
User Offline
Joined: 17th Feb 2014
Location: Arkeos
Posted: 19th Nov 2015 15:04
Hi

I don't know if it's a bug or not, but I have a strange render withthe Object with Alpha chanel (like : trees, leaf, vegetation...) :

If I use SetObjectCullMode(2,0) and SetObjectTransparency(obj,1), to see the faces front and back, sometimes the front is the back is drawn behind the front.

Without SetObjectTransparency() set to 1 or 2, the faces are ok :


With SetObjectTransparency(obj,1), it isn't ok :


Another glitch : when I turn around the two trees, the second is drawn after the first, instead of being drawn behind :


@Paul : If needed, I can send to you a file with this object to see the bug.
http://www.dracaena-studio.com
Jeku
Moderator
21
Years of Service
User Offline
Joined: 4th Jul 2003
Location: Vancouver, British Columbia, Canada
Posted: 20th Nov 2015 06:38
Tweening alpha doesn't seem to work:



Tweening rotation and moving along an axis works.
Senior Software Engineer - RotoGrinders
Paul Johnston
TGC Developer
22
Years of Service
User Offline
Joined: 16th Nov 2002
Location: United Kingdom
Posted: 20th Nov 2015 16:03 Edited at: 20th Nov 2015 16:05
Quote: "the direct x file format doesn't seem to load uv data using loadobjectwithchildren() command"

Since your model file is using limb animation each limb is loaded as a separate object, using GetObjectNumChildren() reveals it is composed of 11 child objects. You have to set the texture on each child object like so


Quote: " InAppPurchaseRestore() seems to be hard coded to return finished after checking only 9 items (I have 17 non-consumable items registered with iTunes connect). Items 10 onwards are ignored and will not restore."

Unfortunately the number of IAP products is hardcoded to 10 on iOS, I could just increase this limit for now, but it probably needs a better method of handling it. I'll increase it to 25 for the next version

Quote: "SetObjectTransparency(Obj,2) : the additive mode doesn't work (tested on win8 and android)"

Fixed for the next version

Quote: "the pointlight seems to be bugged on android (tested on samsung galaxynote 10.1) "

I've attempted to fix this for the next version, but it is dependent on the world scale. Some Android devices have a very limited range for floating point values in their pixel shaders, so I scale the light calculations to fit in this range. It may not work at all world sizes.

Quote: "I have problems with apps using GPS on my iPhone 6s+ (iOS 9.1). "

I upgraded to 9.1 and managed to replicate the problem. Fixed for the next version

Quote: "If I use SetObjectCullMode(2,0) and SetObjectTransparency(obj,1), to see the faces front and back, sometimes the front is the back is drawn behind the front."

Unfortunately this is a problem with the Z buffer interfering with alpha transparency. To draw alpha transparent objects properly Z write is turned off, so if the polygons are drawn in the wrong order they draw over the top of each other. Turning Z write on would make the transparent parts of the polygon hide polygons behind that should be drawn. The only way around it would be to make your tree out of several objects, e.g. one object per leaf, and AppGameKit will order the objects correctly. Unfortunately it can't order the polygons inside an object.

You can use FixObjectToObject() to create a tree out of leaf objects, or get the modeling program to export each leaf as a limb and use LoadObjectWithChildren to preserve the structure.

Quote: "Tweening alpha doesn't seem to work:"

It works here, did you use SetObjectTransparency(ID,1) and UpdateAllTweens() >
SoftMotion3D
AGK Developer
19
Years of Service
User Offline
Joined: 24th Aug 2005
Location: Calgary,Alberta
Posted: 20th Nov 2015 17:01
@paul
Quote: "for i = 1 to GetObjectNumChildren(1)
setobjectimage(GetObjectChildID(1,i),1,0)
next i"


shouldnt agk just do this on its own if i ask it to set the objects image regardless of how many child limbs it has? I know if i do it in darkbasic it will set the image on all the child objects the same and i dont need to code a loop like this.

but your call.... i can code a function to fix this i guess and thanks for pointing me in that direction on how to do it.
www.sheldonscreations.com
Paul Johnston
TGC Developer
22
Years of Service
User Offline
Joined: 16th Nov 2002
Location: United Kingdom
Posted: 20th Nov 2015 17:13
Quote: "shouldnt agk just do this on its own if i ask it to set the objects image regardless of how many child limbs it has?"

I considered doing it this way, but then it would be impossible to set an image on the base object without that image propagating to all child objects. Each child object may be using its own image.
SoftMotion3D
AGK Developer
19
Years of Service
User Offline
Joined: 24th Aug 2005
Location: Calgary,Alberta
Posted: 20th Nov 2015 18:10 Edited at: 20th Nov 2015 18:15
i think it should do that... and if a person wanted to texture a limb differently they could go in with code to make changes and apply textures separately.

my thoughts...
if i call the command "setobjectimage(objid,image,0)" it should set the object and all child limbs to that texture.
and if i call a command like "setobjectlimbimage(objid,limbid,stage)" then it would change it individually.

ah ! i see how you've coded it. a limb is loaded in as another object that could be modified with the base object command set. will this cause a conflict somewhere?

example if i say loadobjectwithchildren(1,"filename") it has 20 limb objects and then i load another object into an id thats already been taken as a limb object not knowing? what range of id's are limb objects using? hopefully a hi range area?
www.sheldonscreations.com
Paul Johnston
TGC Developer
22
Years of Service
User Offline
Joined: 16th Nov 2002
Location: United Kingdom
Posted: 20th Nov 2015 18:33
Quote: "if i call the command "setobjectimage(objid,image,0)" it should set the object and all child limbs to that texture."

But if you use FixObjectToObject() then it also becomes a child, should images set to the base object now also affect that new child? I went with no and images have to be set on a per object basis.

Quote: "if i call a command like "setobjectlimbimage(objid,limbid,stage)" then it would change it individually."

I want to avoid duplicating the command set, like DBPro had limb commands that were duplicates of the object commands. In AppGameKit limbs are actually objects in their own right, and can be detached from their parents if desired.

Quote: "a limb is loaded in as another object that could be modified with the base object command set. will this cause a conflict somewhere?"

Correct, limbs are loaded as objects and placed in IDs above 100,000.
SoftMotion3D
AGK Developer
19
Years of Service
User Offline
Joined: 24th Aug 2005
Location: Calgary,Alberta
Posted: 20th Nov 2015 22:53
Quote: "Correct, limbs are loaded as objects and placed in IDs above 100,000."
perfect as it doesn't conflict with my existing code thanks!

Its very understandable not to duplicate commands for no reason.... but now i'm forced to duplicate the texturing command process just to texture my objects correctly. No problem! and again thanks for all your hard work!

ill just make a function like this...




www.sheldonscreations.com
Preben
AGK Studio Developer
20
Years of Service
User Offline
Joined: 30th Jun 2004
Location:
Posted: 21st Nov 2015 00:55
FYI:
SetObjectLightMode(animobject,0)
if you turn off light on a animated object you get a shader error.
Vertex shader failed to compile … undeclared identifier ‘agk_ViewProj’.

best regards Preben Eriksen,
MikeMax
AGK Academic Backer
12
Years of Service
User Offline
Joined: 13th Dec 2011
Location: Paris
Posted: 21st Nov 2015 01:14 Edited at: 21st Nov 2015 01:14
Hi,

on Linux and in version 2.0.15d, It seems that GetMaxDeviceWidth() and GetMaxDeviceHeight() and SetWindowSize() are bounded to 1024x768 max (and fullscreen flag doesn't work anymore)...
(but maybe other issues relies on this problem ...?)
ouch !
--------------
Jeku
Moderator
21
Years of Service
User Offline
Joined: 4th Jul 2003
Location: Vancouver, British Columbia, Canada
Posted: 21st Nov 2015 01:51
Quote: "It works here, did you use SetObjectTransparency(ID,1)"


Thanks, that worked
Senior Software Engineer - RotoGrinders
Space Dream Studios
Competition Prize Winner 2014
14
Years of Service
User Offline
Joined: 3rd Mar 2010
Location:
Posted: 21st Nov 2015 14:06
Quote: "I upgraded to 9.1 and managed to replicate the problem. Fixed for the next version"

Thanks a lot Paul, sounds great!
When could we expect the next version?
Preben
AGK Studio Developer
20
Years of Service
User Offline
Joined: 30th Jun 2004
Location:
Posted: 23rd Nov 2015 15:30
FYI:

SaveImage , makes changes to the RGB colors based on the Alpha channel , so if you set the Alpha to 0 it will write out a black color in the RGB data, this is wrong , alpha can be used for other things then alpha

best regards Preben Eriksen,
Paul Johnston
TGC Developer
22
Years of Service
User Offline
Joined: 16th Nov 2002
Location: United Kingdom
Posted: 23rd Nov 2015 22:42
Quote: "if you turn off light on a animated object you get a shader error."

Fixed for the next version

Quote: "on Linux and in version 2.0.15d, It seems that GetMaxDeviceWidth() and GetMaxDeviceHeight() and SetWindowSize() are bounded to 1024x768 max (and fullscreen flag doesn't work anymore)..."

Thanks, I've fixed GetMaxDeviceWidth/Height for the next version, which will also fix SetWindowSize. However the fullscreen parameter on Linux is non-functional. The GLFW library we are using does not provide an option to change fullscreen/windowed at runtime so I'll have to dig through the Linux windowing system to find a way to do it. For now you can use a setup.agc file with the fullscreen parameter set to 1 to make it fullscreen from the start.

Quote: "When could we expect the next version?"

There is no fixed timetable, basically when I feel I have enough to justify building an update.

Quote: "SaveImage , makes changes to the RGB colors based on the Alpha channel"

On what platform are you experiencing this?
Preben
AGK Studio Developer
20
Years of Service
User Offline
Joined: 30th Jun 2004
Location:
Posted: 23rd Nov 2015 23:01
Quote: "On what platform are you experiencing this?"

Mac only.
Was just about to post here: https://forum.thegamecreators.com/thread/215885?page=1#msg2573619 , think its the same problem.
I see the same results using saveimage, random pixels.

texi = LoadImage(texture$)
memb1 = CreateMemblockFromImage(texi)
size = GetMemblockSize(memb1)
for c = 12 to size - 1 step 4
SetMemblockByte(memb1, c+3 , 10 )
next c
bakedimage = CreateImageFromMemblock(memb1)
SaveImage(bakedimage,"baked-"+texture$)

The image returned from CreateImageFromMemblock works perfectly , but the one on disk have those random pixels. i found out that it only happens when you use a low alpha value , if i set the alpha value in the sample to above 200 it looks like it works (but perhaps there are still small changes that you cant see).

Also this only happens on Mac. ( Just tried it on Android where the saved image is perfect. )
best regards Preben Eriksen,
Blendman
10
Years of Service
User Offline
Joined: 17th Feb 2014
Location: Arkeos
Posted: 24th Nov 2015 07:28 Edited at: 24th Nov 2015 07:36
Hi Paul

Quote: "It sounds like you want an ambient occlusion map, which could be achieved with a custom shader."
For the moment, I have made a custom shader which work great . It's very simple, I will post it on the forum.

Quote: "(pointlight bug on android) it is dependent on the world scale"
If I scale all the objects in the world, I shouldn't have this lighting problem ? I have add a general Scale for all object/position and

Quote: "
Unfortunately this is a problem with the Z buffer interfering with alpha transparency. To draw alpha transparent objects properly Z write is turned off, so if the polygons are drawn in the wrong order they draw over the top of each other. Turning Z write on would make the transparent parts of the polygon hide polygons behind that should be drawn. The only way around it would be to make your tree out of several objects, e.g. one object per leaf, and AppGameKit will order the objects correctly. Unfortunately it can't order the polygons inside an object."
I understand, but I have another problem with transparency.
I have Two objects : the tree.obj and the shado.obj : sometimes the shadow is drawn before the tree, sometimes, the shadow is drawn after the tree (which is correct) :
I don't know how I can fixe that ^^.

When the camera (and the player which is fixed to the camera) is near the tree and the shadow, all is fine :


But when the camera is far the tree and the shadow, there is the bug (the shadow is drawn before the tree :


For the moment, I use an ambient occlusion map for the shadow, but sometimes, I need to have transparents objects and I have this bug.
http://www.dracaena-studio.com
Paul Johnston
TGC Developer
22
Years of Service
User Offline
Joined: 16th Nov 2002
Location: United Kingdom
Posted: 24th Nov 2015 21:31 Edited at: 24th Nov 2015 21:31
Quote: "I have Two objects : the tree.obj and the shado.obj : sometimes the shadow is drawn before the tree, sometimes, the shadow is drawn after the tree"

It will be based on the object position and the position and angle of the camera, so if it gets to the point where the position of the shadow object appears closer to the camera than the position of the tree object then it will draw the shadow after the tree. It looks like I will have to write a better sorting algorithm, but you could work around it with some clever use of FixObjectPivot, the aim is to get the shadow object's position further away from the camera whilst keeping the vertices where they are.
xCept
21
Years of Service
User Offline
Joined: 15th Dec 2002
Location:
Posted: 25th Nov 2015 04:03 Edited at: 25th Nov 2015 04:03
Paul, any chance of adding a banner size parameter for Admob yet? AppGameKit still only supports 320px banners, which do not scale and appear very tiny on HD tablets. Ideally we should be able to pass a parameter which will call the appropriate banner ad size when initializing Admob banners (i.e., BANNER = 320x50, FULL_BANNER = 460x68, LEADERBOARD = 728x90, SMART_BANNER = screen width * 32|50|90 depending on screen size). At a minimum, Admob and iAds support SMART_BANNER so when using Admob mediation it'd allow for full-width banners across both networks using the existing AppGameKit advert commands. Admob details here.
SpecTre
Developer
21
Years of Service
User Offline
Joined: 24th Feb 2003
Location: UK
Posted: 26th Nov 2015 01:06
Quote: "
If I put the running AppGameKit Player into the background and want to bring it back to the front, the device freezes and mostly I'm getting a black screen... Any idea? Didn't we had that before on earlier releases too?
"


I get this when I broadcast from Mac to my Android device. No black screen but freezes. I am on 15d, thought this was fixed early on?
The Amiga and Amos were great!
My website LEAP - Download Paint Pot here!
Scary Little Rabbit
15
Years of Service
User Offline
Joined: 4th Aug 2009
Location: Chelyabinsk, Russian Federation.
Posted: 26th Nov 2015 08:22
howdy! I'm here after more than a year long hiatus.

Quote: "For now you can use a setup.agc file with the fullscreen parameter set to 1 to make it fullscreen from the start."

doesn't work on my Ubuntu 14.04.

compiler can't play with UTF-8 encoded sources again.

also 'replace tab with spaces' option of IDE doesn't work.
error #1:
\"too many stars, too many stares. disembody.\"
WIP: MIND!! | free fonts for your AGKs
Bigsofty
10
Years of Service
User Offline
Joined: 7th Nov 2014
Location:
Posted: 26th Nov 2015 15:32
Changing the angle on a joint with a motor and turning on the motor makes the attached body instantly translate into infinity. Tried turning off joint to parent collision no effect, changes to mass has no effect either, the angles of any of the motored joints cant be changed.
m0y
9
Years of Service
User Offline
Joined: 4th Aug 2015
Location:
Posted: 26th Nov 2015 18:30
Hi Paul,
Do you have some news about a complete implementation of multiplayer using game center on Basic language? and about Android?

Thanks!
Space Dream Studios
Competition Prize Winner 2014
14
Years of Service
User Offline
Joined: 3rd Mar 2010
Location:
Posted: 26th Nov 2015 19:49
@spectrepaul:
Quote: "I get this when I broadcast from Mac to my Android device. No black screen but freezes. I am on 15d, thought this was fixed early on?"

Works here! I'm broadcasting from my Mac to an ANDROID device too. Could it be that you haven't replaced your agk player on the ANDROID device with the latest one?
SpecTre
Developer
21
Years of Service
User Offline
Joined: 24th Feb 2003
Location: UK
Posted: 26th Nov 2015 20:53
Quote: "Works here! I'm broadcasting from my Mac to an ANDROID device too. Could it be that you haven't replaced your agk player on the ANDROID device with the latest one?"


No it's all updated so strange. I have just tried it again and works fine unless I broadcast an app using render images so not sure if it something to do with that.
In the app I press the home screen and then go back into the player and it is frozen, then the Android message comes up saying do you want to wait or force close.
The Amiga and Amos were great!
My website LEAP - Download Paint Pot here!
BatVink
Moderator
21
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 26th Nov 2015 22:26
I have an Android app using Render Images. I will try tomorrow and let you know the result. My workaround until now has been to save to a memblock and restore the memblock on returning to the program.
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Quidquid latine dictum sit, altum sonatur
TutCity is being rebuilt
SpecTre
Developer
21
Years of Service
User Offline
Joined: 24th Feb 2003
Location: UK
Posted: 26th Nov 2015 22:43
Cheers BatVink,

Quote: "My workaround until now has been to save to a memblock and restore the memblock on returning to the program."


I quite like this idea for some other uses, never thought of that but would be good to save the screen when exiting an app so when loading the app again you could continue for example a drawing from where you finished off. Cool
The Amiga and Amos were great!
My website LEAP - Download Paint Pot here!
BatVink
Moderator
21
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 27th Nov 2015 07:45
Quote: "you could continue for example a drawing from where you finished off"


That is exactly my purpose Because I am already doing this to save a drawing image, I just extended it to fix this problem.

Fear not, I am not trespassing on your territory of children's art programs
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Quidquid latine dictum sit, altum sonatur
TutCity is being rebuilt
SpecTre
Developer
21
Years of Service
User Offline
Joined: 24th Feb 2003
Location: UK
Posted: 27th Nov 2015 20:48
Quote: "Fear not, I am not trespassing on your territory of children's art programs"


Haha nothing wrong with a bit of healthy competition
The Amiga and Amos were great!
My website LEAP - Download Paint Pot here!
Timshark
17
Years of Service
User Offline
Joined: 30th Jun 2007
Location: Oslo, Norway
Posted: 28th Nov 2015 20:35 Edited at: 28th Nov 2015 20:38
Paul, update3d() and render3d() does not seem to update pointlights - is this correct?

I´m trying to reduce my 3d light amount/load by using 1 point light and moving it around before swapping.
This is my main loop:



The globe object updates to give the illusion of 72 objects (globes) but not the point light
Space Dream Studios
Competition Prize Winner 2014
14
Years of Service
User Offline
Joined: 3rd Mar 2010
Location:
Posted: 30th Nov 2015 10:51
Paul, would be great to see a new update released very soon since it looks like that my old app, which I sell over the iTunes store too, is crashing on users iOS devices after they upgrated to iOS 9.1!!! I asume that this crashes are related to the http request problem I posted before and you marked as "fixed for the next release". Please publish a new uodate, it's needed! Thanks a lot in advance!
Rozen Software
FPSC Reloaded TGC Backer
10
Years of Service
User Offline
Joined: 22nd Nov 2014
Location: Poland
Posted: 30th Nov 2015 13:26
In my project I need to restrict rotation of a 3D object with dynamic body physics in X and Z axis. I could not find any such command. How can I do this in the latest AppGameKit 2 version?
How it is possible to set a new position (x, y, z) for 3D object with physics on it?
I saw that after creating a 3D physics body I cannot modify its rotation or position except SetObject3DPhysicsLinearVelocity command, which seems to not be sufficient to my needs.

Thank you.
CJB
Valued Member
20
Years of Service
User Offline
Joined: 10th Feb 2004
Location: Essex, UK
Posted: 30th Nov 2015 14:35 Edited at: 30th Nov 2015 14:36
Quote: "In my project I need to restrict rotation of a 3D object with dynamic body physics in X and Z axis. I could not find any such command. How can I do this in the latest AppGameKit 2 version?
How it is possible to set a new position (x, y, z) for 3D object with physics on it?
I saw that after creating a 3D physics body I cannot modify its rotation or position except SetObject3DPhysicsLinearVelocity command, which seems to not be sufficient to my needs. "


You can use joints to restrict physics in x and z axis, although that would only allow movement along a single axis which might be better served with none-physics engine code (i.e. with tweens, or some simple maths).

Position your object before enabling physics on it (otherwise the physics "object" remains where the original object was, leaving behind an invisible body when you move your 3d object).

In addition to being able to set Linear Velocity, you can also set rotational velocity with SetObject3DPhysicsAngularVelocity.
V2 T1 (Mostly)
Phone Tap!
Uzmadesign
Space Dream Studios
Competition Prize Winner 2014
14
Years of Service
User Offline
Joined: 3rd Mar 2010
Location:
Posted: 30th Nov 2015 21:48 Edited at: 30th Nov 2015 22:19
Found another issue: Looks like that SetEditBoxActive(index,active) doesn't work. If I deactivate an editbox it is still clickable and reacts to input, but it shouldn't!
Please verify!
Space Dream Studios
Competition Prize Winner 2014
14
Years of Service
User Offline
Joined: 3rd Mar 2010
Location:
Posted: 30th Nov 2015 22:17 Edited at: 30th Nov 2015 22:41
ChooseRawFile() doesn't work (open file browser) on my Mac with el Capitan. Works on my Windows installation with PARALLELS on my Mac, but the returning path is not correct. Please verify.
Blendman
10
Years of Service
User Offline
Joined: 17th Feb 2014
Location: Arkeos
Posted: 1st Dec 2015 07:59
Hi Paul

In the thread [href= https://forum.thegamecreators.com/thread/215931] https://forum.thegamecreators.com/thread/215931[/href], you have given some code to use a shader with light.
But, it seams the direction and the color of the Directionnal Light doesn't change, if we use "agk_DLightDir" and "agk_DLightColor"
The light has always the same color (white) and the direction is always the same.

In the code (vertex shader + pixel shader) I have replaced agk_DLightDir by DLightDir and agk_DLightColor by DLightColor and it works.
Perhap's there is a bug with agk_DLightDir and agk_DLightColor ?
http://www.dracaena-studio.com
Preben
AGK Studio Developer
20
Years of Service
User Offline
Joined: 30th Jun 2004
Location:
Posted: 2nd Dec 2015 10:16
Quote: "But, it seams the direction and the color of the Directionnal Light doesn't change, "


As i remember agk_DLightDir is working fine you just need to use, SetSunDirection and SetSunColor to define them , you cant use SetShaderConstantByName as these are already set by agk. thats why "DLightColor ..." is working for you.


best regards Preben Eriksen,
Suji007
AGK Backer
11
Years of Service
User Offline
Joined: 6th Jul 2013
Location:
Posted: 2nd Dec 2015 14:15
Hi,

I'm having an issue with loading a .x model which has no textures and contains materials embedded inside the .X file. The issue I have is that the simple model is shown on screen without its colours. In DirectX I would load the materials in manually when I load the mesh into memory, but in AppGameKit there's no means of loading these materials. The materials do not refer to images stored on file, so how can I show these on the model?

Example screenshots are attached for what I obtain from AppGameKit and what I should see. The code within .x file which handles materials is in a block like this:



I'm using Tier 2 but have tried in Tier 1 with same results. The object does change colour depending upon which colour I assign the light in the room, but that's not the result I want.

I'm loading in the model using:



The model is not animated. is there a way of assigning colours manually to the parts which make up the model? If so, how do I load these individual parts in AppGameKit? Looking through the .x file I've come across three names for the components under the heading 'Frame': mesh_eagle, mesh_thrus, mesh_cockp which would correspond to the three parts of the ship.

Thanks for any assistance.
S G-K

Attachments

Login to view attachments
SoftMotion3D
AGK Developer
19
Years of Service
User Offline
Joined: 24th Aug 2005
Location: Calgary,Alberta
Posted: 5th Dec 2015 21:44 Edited at: 6th Dec 2015 00:03
@paul...

is there any plans to give us commands that access the index data of a 3d memblock mesh being able to modify them? It would be nice to be able to build an object from scratch into a memblock. Or have control of modifying triangle/quad connections... ie. flipping faces etc... The truth of the matter is that every 3d mesh has faces.... and what defines the faces does not seam to be editable in the mesh memblock or .... we are missing information on how the memblock is structured and how to do that.

Is the index data stored inside the memblock mesh? Is there any info on letting us know if its a quad mesh or tri mesh? etc...etc...
www.sheldonscreations.com
AJCodes
9
Years of Service
User Offline
Joined: 6th Jan 2015
Location:
Posted: 6th Dec 2015 01:10
SoftMotion3D...you can get at that now. I can't remember which of the 3D memblock commands has it, but one of them explains the layout of the memblock and explains how you can index into the memblock to get to anything...including object indices.

Born. Currently living.
BatVink
Moderator
21
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 6th Dec 2015 11:47
The commands available are these. Vertex commands are available but not indices (although they are in the mesh data and the memblock).



SoftMotion3D is right, you can't add or remove faces / indices / vertices easily. You would have to create a second memblock and rewrite everything.

I have shared some code here to extract and access all of the index data and more.
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Quidquid latine dictum sit, altum sonatur
TutCity is being rebuilt
CodeMonkey
11
Years of Service
User Offline
Joined: 6th Mar 2013
Location: Ireland
Posted: 7th Dec 2015 15:53
For the next build please fix the issues with CloneObject/InstanceObject, causing crashes.

The player controller doesn't work at the moment either. It won't even create one. I would use standard shapes but I can't set axis-specific movement without disrupting the other axes.

Hope these get updated soon. The slow updates of AppGameKit are really holding my project up...
Stab in the Dark software
Valued Member
21
Years of Service
User Offline
Joined: 12th Dec 2002
Playing: Badges, I don't need no stinkin badges
Posted: 7th Dec 2015 16:09
Quote: "The player controller doesn't work at the moment either. It won't even create one. I would use standard shapes but I can't set axis-specific movement without disrupting the other axes."


Are you referring to the 3D physics character controller? If so I can help you with that.
The coffee is lovely dark and deep,and I have code to write before I sleep.
Scary Little Rabbit
15
Years of Service
User Offline
Joined: 4th Aug 2009
Location: Chelyabinsk, Russian Federation.
Posted: 7th Dec 2015 16:30
in case of getFileExists() with empty string as parameter app crashes with no error message on Ubuntu 14.04.
error #1:
'too many stars, too many stares. disembody.'
WIP: MIND!! free fonts for your AGKs

Login to post a reply

Server time is: 2024-11-25 15:39:38
Your offset time is: 2024-11-25 15:39:38