How can i make a cube/box that pulsates?

@yarin1312 said:
So i dont have to give a negative value to the scale never?
whats happen if i will, i will dont see the spatial?


It's just strange and you make things harder for yourself later. It's like saying "this shape is negative 1 meter tall".

More to the point, it's entirely unnecessary.

i’m really seriously in my question it wassnt joke 0.0

and actually you didnt answer me about the question on tpf, how can i know what his value and right use

@yarin1312 said:
you set 2 variables and used 3, in varScal you mean VarScale?


If you understand the code then it's clearly supposed to be varScale. I guess it was just a typo.

@yarin1312 said:
and actually you didnt answer me about the question on tpf, how can i know what his value and right use :D


tpf is the "time per frame". You use that in calculations to make sure they your box doesn't pulse faster or slower as FPS changes.

okay and i write this code but i its say that i cant setScale Geometery, its right? its matter if i write scale or setScale to this thing?

edit:

okay i right setLocalScale and its work

and by the way thank and the people help me here,

Sorry if maddened you :frowning:

@yarin1312 said:
okay and i write this code but i its say that i cant setScale Geometery, its right? its matter if i write scale or setScale to this thing?
edit:
okay i right setLocalScale and its work


It's supposed to be setLocalScale()... just another typo.

Edit: didn't see your edit slip in.

and i’m actually dont understand a little bit because the tpf, someone can give me example about what the value of valScale will be in the first time that the method SimpleUpdate run

@yarin1312 said:
and by the way thank and the people help me here,
Sorry if maddened you :(


We're not mad or anything.

I was not trying to be insulting or "mad" when I suggested that decent Java knowledge was a requirement for using JME. When you struggle with even these beginner level things it just needed saying.

It is not an insult to suggest that. If someone shows up to an "Advanced Cooking" class and has never touched a stove it is not insulting to suggest that they start with something simpler.

3D game programming is one of the hardest types of programming. It requires you to know coding and math pretty well already. Your posts so far suggest that you are still inexperienced in both areas and may want to try something a little simpler first.

I think you need to either pick up a copy of a java book or you can freely learn java through this website:

http://www.javabeginner.com and familiarize yourself with all the java constructs, else you will not get far i’m afraid, without banging your head a lot of times

i know that to programming 3d games its hard thing but i’m really came here to learn i think that i know enough in java to start here, it just i’m still dont know what the “tpf” do, i know what is part and how he help us but i’m still dont know how to used his value, and what do you mean something simpler?

tpf is a floating point variable that represents the fraction of time that has passed from one frame to the next.



Edit:

you use this to scale any moment in the scene so that there is little difference from faster to slower machines. If I have stated that wrong someone correct me.



check this sight out for 3D and 2D game programming tutorials:

http://fivedots.coe.psu.ac.th/~ad/jg/

NOT JME just Java

you mean that if the method SimpleUptade called 10 time some tpf euqals 10?

no if SimpleUpdate was called 10 times in a second it would be like 0.1

1 Like

Try this:

[java]private float double totalTpf = 0;



public void simpleUpdate(float tpf) {

System.out.println("TPF this frame: " + tpf);



totalTpf += tpf;



System.out.println("TPF total: " + totalTpf);

}[/java]



Edit:

This will print out on the command line

1 Like

so what you offer me to do to contnue learn from this website in the tutorials of the beginner or the read a thing in this website you gave me?

and if to rean thing in your website to read anything or spacific thing?

What are you trying to do?

make a game = use the tutorials here

learn java = use google

:smiley:



Edit:

actually use google no matter what I am a programmer by trade and I use google for help



on the sight I posted I like net tour 3D

1 Like

i’m need to know Threed in java to progrmming game?

Thread?

http://docs.oracle.com/javase/tutorial/essential/concurrency/runthread.html



Use Google Im out of here

ohhhh i’m dont ask you to teach me threed i’m just ask you if i need to know because some else forum member people said me that i dont 0.0

i know exeption and GUI and inner classed and things like that and i dont learn threed

A half-decent Java programmer can write a pretty good text adventure in just a few days. All of what you’d learn doing that is applicable to game programming in general. If that seems like a task that is too hard then that’s a place to start. It’s not a bad exercise, anyway. Anyone who has never programmed a game before will learn all kinds of stuff about flexible data structures and command/game loops that is 100% applicable to other types of games.



After you get to the point where that would only take you a few days then the next big hurdle will be the math and scene graph concepts.

https://wiki.jmonkeyengine.org/legacy/doku.php/jme3:math_for_dummies

https://wiki.jmonkeyengine.org/legacy/doku.php/jme3:scenegraph_for_dummies



If the information in those links is difficult then spend some time really learning those concepts.