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 Chat / Nead a cube with only one visible face..

Author
Message
Cliff Mellangard 3DEGS
Developer
12
Years of Service
User Offline
Joined: 20th Feb 2006
Location: Sweden
Posted: 15th Apr 2018 18:11 Edited at: 15th Apr 2018 18:12
I dont have a modeling tool so far and blender looks frustrating

I nead a cube just like the one created by agk but with only one face visible.
The others should be completely transparent if anyone could do one for me?
Its going to be used for my current experiment...


If iam not wrong so should you be able to make the other faces material completely transparent?
george++
11
Years of Service
User Offline
Joined: 13th May 2007
Location: Hellas
Posted: 15th Apr 2018 19:05
I hope that it will work as you expect. I didn't test it though.

Attachments

Login to view attachments
puzzler2018
1
Years of Service
User Offline
Joined: 8th Oct 2017
Location:
Posted: 15th Apr 2018 19:12 Edited at: 15th Apr 2018 19:16
AGK CreateCube will display all 6 faces, you will have to create own cube using 6 planes instead

and make use of SetObjectVisible

Like



If I have time, ill post how to construct one

EDIT: Or if you only just want one side - just use CreateObjectPlane ( sizex#,sizey#) instead lol
GarBenjamin
2
Years of Service
User Offline
Joined: 30th Nov 2016
Location: USA
Posted: 15th Apr 2018 19:23
Your graphics in the platformer look awesome Cliff!
TI/994a (BASIC) -> C64 (BASIC/PASCAL/ASM/Others) -> Amiga (AMOS/BLITZ/ASM/C/Gamesmith) -> DOS (C/C++/Allegro) -> Windows (C++/C#/Monkey X/GL Basic/Unity/Others)
smallg
Valued Member
13
Years of Service
User Offline
Joined: 8th Dec 2005
Location: steam
Posted: 15th Apr 2018 20:41
indeed, try CreateObjectPlane( width, height )
life's one big game
spec= 4ghz, 16gb ram, AMD R9 2700 gpu
Cliff Mellangard 3DEGS
Developer
12
Years of Service
User Offline
Joined: 20th Feb 2006
Location: Sweden
Posted: 15th Apr 2018 21:21
Planes dont work with collisions later on and already tried it
I use planes for no collision objects.
And i want the object Creation to a mini mall in agk.
So dont want to create a cube out off planes..
Thanks gar its actually stuff i modified from assets pack 1 or 2 from tgc.
And a few of my own thrown in
c0d3r9
1
Years of Service
Recently Online
Joined: 2nd Oct 2017
Location:
Posted: 15th Apr 2018 21:31 Edited at: 15th Apr 2018 21:31
Don´t know if that helps because i don´t know what you wanna do with it.
Look at the attached cube. Single sided for textures and i flip normals on 5 surfaces.

Attachments

Login to view attachments
Cliff Mellangard 3DEGS
Developer
12
Years of Service
User Offline
Joined: 20th Feb 2006
Location: Sweden
Posted: 15th Apr 2018 23:30
I Think i solved it by playing around with sun direction ?
Because i dont se any seaams anymore?
Going to est some more tomorrow?

Thanks for all help so far
c0d3r9
1
Years of Service
Recently Online
Joined: 2nd Oct 2017
Location:
Posted: 15th Apr 2018 23:40 Edited at: 16th Apr 2018 01:05
Take a look at this.

edit: if you would take this box for your 3d tiles you could take it.but you the same way you could use planes an then set SetObjectShapeBox(1, 1, 1, 1) i.e.
So that planes have a bigger collisionbox.

Attachments

Login to view attachments
TomToad
User Offline
Joined: 6th Jan 2018
Location:
Posted: 16th Apr 2018 01:05
Create a transparent cube. Create an opaque plane. Attach the plane to the cube. Use the cube for your collisions. Maybe?
c0d3r9
1
Years of Service
Recently Online
Joined: 2nd Oct 2017
Location:
Posted: 16th Apr 2018 01:21
A plane with SetObjectShapeBox(obj, x, y, Z) works too. For Collisions.
Cliff Mellangard 3DEGS
Developer
12
Years of Service
User Offline
Joined: 20th Feb 2006
Location: Sweden
Posted: 16th Apr 2018 17:10
That command is not documented?
SetObjectShapeBox(obj, x, y, Z)
I looked for something like it but cant find it in the documentation?
Cliff Mellangard 3DEGS
Developer
12
Years of Service
User Offline
Joined: 20th Feb 2006
Location: Sweden
Posted: 16th Apr 2018 17:35 Edited at: 16th Apr 2018 17:36
I tested it but must say that 3d physics only complicated a very simple game Engine so i removed it again ..

to use shape do i nead to create a 3d physics World.
then create a kinematicbody and the change the shape.
and it goes on..

The good thing is that using built in cubes works great after adjusting the directional light ( sun )
c0d3r9
1
Years of Service
Recently Online
Joined: 2nd Oct 2017
Location:
Posted: 16th Apr 2018 18:23
you´ve right, but for that you can write a simple method/function.
The question is if its faster to use that what i post or adjusting the light.
This code makes all the same.The comments are the other ways to handle that.
I´m actually not familar with 3D in AppGameKit so i don´t took a look what is easier with the build in cubes.
Do you mean CreateObjectBox ? So you have to add a shape too, or not?

shadey
8
Years of Service
User Offline
Joined: 25th Jan 2010
Location:
Posted: 16th Apr 2018 18:34 Edited at: 16th Apr 2018 22:58
Well,seen as I had nowt else to do atm, Here is an example with a cube done in blender showing just 1 face, the trick is to make parts of the png transparent, well zero alpha or whatever the jargon is, and set the cubes transparency.. Well, of course you have to get your hands dirty learning to uv edit and in particular separating all the cubes faces..
Been using blender for a while now,and I thought the same until you get into learning it and realise it is perfect!! You need to learn a bit about uv editing mostly in blender, but it aint all that scary, else I would've ran off ages ago.
Hail to the king, baby!
c0d3r9
1
Years of Service
Recently Online
Joined: 2nd Oct 2017
Location:
Posted: 16th Apr 2018 18:49
I used AC3D for the cube above.
But in AppGameKit you have to set a shape or not?
And so you can take a plane too and then a shape with a Z value depend on what you need for collision.

I´m interesting to rewrite for a test my platformer -> 3D ortho-view.
shadey
8
Years of Service
User Offline
Joined: 25th Jan 2010
Location:
Posted: 16th Apr 2018 18:54 Edited at: 16th Apr 2018 19:03
I use physics so yeh i set the physics body and physics shape, I have a function for that!
3D orth view, you just rotate the camera 90 on the Y axis
Hail to the king, baby!
c0d3r9
1
Years of Service
Recently Online
Joined: 2nd Oct 2017
Location:
Posted: 16th Apr 2018 19:04 Edited at: 16th Apr 2018 19:06
Okay.
At the moment I'm thinking about how to solve slopes.
Does Create3DPhysicsStaticBody (1) make it?
But there again all faces are rendered.
As workaround a simple triangle and a plane(or planes) for collision in a modeller in one object.
Or i could make bigger level parts instead of 3D tiles.(a big plane depend how the level looks and then collision planes in a 90 degree angle)
But as I said, right now I'm just thinking about it.
shadey
8
Years of Service
User Offline
Joined: 25th Jan 2010
Location:
Posted: 16th Apr 2018 19:09 Edited at: 17th Apr 2018 08:24


here is the function I use, to explain,you call it with say
createobjectphysics(ObjID,1,2)
this will give it a static body (1) and a cube shape, which is fine for slopes,or you can use a static poly if the object in question has no aspirations of being dynamic
Just make sure you call Step3DPhysicsWorld() in your main loop,also it is best to call it at the top of the loop for some wack reason...
after you call this function, it is then you set the other stuff like restitution...friction and damping on the object.
near the top of the program.before the main loop, use..
Create3DPhysicsWorld()
Before anything physical!
If the scale of the cube is too big,or too small,you will have to scale it up/down in blender or use agk scaling commands!
I have no idea what sizes you are using...
Hail to the king, baby!
c0d3r9
1
Years of Service
Recently Online
Joined: 2nd Oct 2017
Location:
Posted: 16th Apr 2018 20:02
Are there any examples how the shapes looks?
Especially polygon and compound shape.
Debugging doesn´t work atm i read in help.
shadey
8
Years of Service
User Offline
Joined: 25th Jan 2010
Location:
Posted: 16th Apr 2018 20:15 Edited at: 16th Apr 2018 21:11
I think you can look on the net in general if you search for each shape,it will explain.. Just to add i think I have the scale about right to a default AppGameKit one so have updated the file with this change..however,if it aint, I can do one easy again. Of course proper terminology is box,not cube, in AppGameKit, guess agk likes to be different
Just to add finally if you want to see both sides of that one face,you have to change the object culling to 0.
so.... SetObjectCullMode(cube,0)

Hail to the king, baby!
shadey
8
Years of Service
User Offline
Joined: 25th Jan 2010
Location:
Posted: 16th Apr 2018 21:11
I am pretty sure my efforts deserve a badge! Are you listening Admins!
Hail to the king, baby!
puzzler2018
1
Years of Service
User Offline
Joined: 8th Oct 2017
Location:
Posted: 16th Apr 2018 21:13
Has cliff stated that this is fixed and happy first lol
shadey
8
Years of Service
User Offline
Joined: 25th Jan 2010
Location:
Posted: 16th Apr 2018 21:18
hmm,well don't know if I got the scale right, but I can if he needs it!
Just a quick bit of blendering.
Hail to the king, baby!
c0d3r9
1
Years of Service
Recently Online
Joined: 2nd Oct 2017
Location:
Posted: 16th Apr 2018 21:45
Of course box+partial transparent texture is a way too
shadey
8
Years of Service
User Offline
Joined: 25th Jan 2010
Location:
Posted: 16th Apr 2018 22:21
Got the scale correct, updated files!
Hail to the king, baby!
Cliff Mellangard 3DEGS
Developer
12
Years of Service
User Offline
Joined: 20th Feb 2006
Location: Sweden
Posted: 22nd Apr 2018 19:24
Nice to see i got some Brains working here
I have bin offline for a few Days so sorry everyone..

Login to post a reply

Server time is: 2018-12-17 13:32:17
Your offset time is: 2018-12-17 13:32:17