Mythruna
April 18, 2024, 08:29:04 PM *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News: Welcome to the new forums. See "Announcements" for a note for new users.
 
   Home   Help Search Login Register  
Pages: [1] 2
  Print  
Author Topic: Working screw (boat)  (Read 17794 times)
Iggyjeckel
Donators
Hero Member
***
Posts: 510


View Profile
« on: October 15, 2012, 05:28:44 PM »

Ok just an idea since I havent had a chance to get it all set up and played with fire/buckets yet but ive been inspired and was curious if this idea would work

I have two bp, one for a button, another for a screw

Ok now the super simple logic idea of it (i understand the code would be more in depth but im just brainstorming

When button is hit it is turned on....lets say variable x = true

While x == true
{
rotate screw 10 °
check x
}



again please dont tell me "your syntax is wrong" lol im just curious if my idea would actually work
Logged
pspeed
Administrator
Hero Member
*****
Posts: 5612



View Profile
« Reply #1 on: October 15, 2012, 06:04:41 PM »

Ok just an idea since I havent had a chance to get it all set up and played with fire/buckets yet but ive been inspired and was curious if this idea would work

I have two bp, one for a button, another for a screw

Ok now the super simple logic idea of it (i understand the code would be more in depth but im just brainstorming

When button is hit it is turned on....lets say variable x = true

While x == true
{
rotate screw 10 °
check x
}



again please dont tell me "your syntax is wrong" lol im just curious if my idea would actually work

No, because your script would never return and it would lock up the game.

There is no formal API support for animation of this kind but Mythruna does support it.  Eventually objects will be able to hook into a configurable heartbeat event that they can use to update themselves periodically.
Logged
Iggyjeckel
Donators
Hero Member
***
Posts: 510


View Profile
« Reply #2 on: October 15, 2012, 07:23:51 PM »

Oh I knew there would be more needed, was just wondering if that form of animation would be possible. Which youve said basically not yet lol


Well, guess I plan something else, if I have more questtions (only the ones on what every bit of code would actually look like lol *ahem* unn *ahem*)

 im sorry something seemed to have caught in my throat
Logged
Michael
Donators
Hero Member
***
Posts: 2166



View Profile
« Reply #3 on: October 15, 2012, 07:31:49 PM »

Oh I knew there would be more needed, was just wondering if that form of animation would be possible. Which youve said basically not yet lol


Well, guess I plan something else, if I have more questtions (only the ones on what every bit of code would actually look like lol *ahem* unn *ahem*)

 im sorry something seemed to have caught in my throat
Code:
//unnaturallife
unnaturallife == false
if Paul.teach(unnaturallife) {
println "Wow, Paul actually taught unn something!";
} else {
println "Lol, fail unn." }
Yes, I know I did not assign Paul to anything Smiley
Logged
Iggyjeckel
Donators
Hero Member
***
Posts: 510


View Profile
« Reply #4 on: October 15, 2012, 07:37:57 PM »

Wait, miss-read, you said no formal animation, but mythruna does support it.

So are you saying that with true code I could pull it off, granted with probably a bit of ugly code
Logged
FutureB
Donators
Hero Member
***
Posts: 512


RAWR


View Profile
« Reply #5 on: October 15, 2012, 07:53:03 PM »

wouldnt water waves count as animation? or are they huge ammounts of code lol
Logged


Say the opposite of these words:
1)Always.
2)Coming.
3)From.
4)Take.
5)Me.
6)Down.
pspeed
Administrator
Hero Member
*****
Posts: 5612



View Profile
« Reply #6 on: October 15, 2012, 07:55:43 PM »

Wait, miss-read, you said no formal animation, but mythruna does support it.

So are you saying that with true code I could pull it off, granted with probably a bit of ugly code

Yeah, there just isn't a "nice" way to do it.  You have to know where to poke and the poking isn't as pretty.

Something like:
Code:
animation = MainStart.globalStateManager.getState( AnimationState.class );
animation.add( new AnimationTask() {
        public boolean animate( AnimationState anim, float seconds ) {
            // Do something every frame
            return true; // true to keep going next frame
        }
    });

The "do something every frame" part isn't that pretty either.
Logged
pspeed
Administrator
Hero Member
*****
Posts: 5612



View Profile
« Reply #7 on: October 15, 2012, 07:56:18 PM »

wouldnt water waves count as animation? or are they huge ammounts of code lol

Water waves are done differently.  They are sort of animated in the shader... like the grass and flowers blowing in the wind.
Logged
belgariad87
Donators
Hero Member
***
Posts: 507


RPG player for life


View Profile
« Reply #8 on: October 16, 2012, 04:05:39 AM »

I can't wait till i can finally free up some time to try n code something. I don't think i've ever worked with API, is it just where all the graphical representation of the code is?
Logged

Specs for future reference:
Windows 7 64bit ; Intel Quad Core ; 8GB RAM ; AMD Radeon HD 6800 ; TB HD
pspeed
Administrator
Hero Member
*****
Posts: 5612



View Profile
« Reply #9 on: October 16, 2012, 11:50:15 AM »

I can't wait till i can finally free up some time to try n code something. I don't think i've ever worked with API, is it just where all the graphical representation of the code is?

API = "Application programming interface"

It's the stuff I've exposed to make writing scripts easier.  But since Groovy has access to all of the Java classes, you can bypass the API in cases where I haven't exposed nice things yet.
Logged
belgariad87
Donators
Hero Member
***
Posts: 507


RPG player for life


View Profile
« Reply #10 on: October 16, 2012, 03:07:08 PM »

I can't wait till i can finally free up some time to try n code something. I don't think i've ever worked with API, is it just where all the graphical representation of the code is?

API = "Application programming interface"

It's the stuff I've exposed to make writing scripts easier.  But since Groovy has access to all of the Java classes, you can bypass the API in cases where I haven't exposed nice things yet.
In that case i'll probably just use groovy, since its already installed. The only thing i really will need to figure out is how to go about actually getting things to *happen* in the game according to the code i put in, though i'm sure thats just a matter of poking through whats already coded.
Logged

Specs for future reference:
Windows 7 64bit ; Intel Quad Core ; 8GB RAM ; AMD Radeon HD 6800 ; TB HD
pspeed
Administrator
Hero Member
*****
Posts: 5612



View Profile
« Reply #11 on: October 16, 2012, 03:14:33 PM »

I can't wait till i can finally free up some time to try n code something. I don't think i've ever worked with API, is it just where all the graphical representation of the code is?

API = "Application programming interface"

It's the stuff I've exposed to make writing scripts easier.  But since Groovy has access to all of the Java classes, you can bypass the API in cases where I haven't exposed nice things yet.
In that case i'll probably just use groovy, since its already installed. The only thing i really will need to figure out is how to go about actually getting things to *happen* in the game according to the code i put in, though i'm sure thats just a matter of poking through whats already coded.

That's what I talk about when I say "API"... the "how to do it".  Some of the API is covered through examples.  Some of the API has yet to be written.   The Java classes can sort of be considered an "undocumented API" at this point.
Logged
belgariad87
Donators
Hero Member
***
Posts: 507


RPG player for life


View Profile
« Reply #12 on: October 16, 2012, 03:39:43 PM »

I can't wait till i can finally free up some time to try n code something. I don't think i've ever worked with API, is it just where all the graphical representation of the code is?

API = "Application programming interface"

It's the stuff I've exposed to make writing scripts easier.  But since Groovy has access to all of the Java classes, you can bypass the API in cases where I haven't exposed nice things yet.
In that case i'll probably just use groovy, since its already installed. The only thing i really will need to figure out is how to go about actually getting things to *happen* in the game according to the code i put in, though i'm sure thats just a matter of poking through whats already coded.

That's what I talk about when I say "API"... the "how to do it".  Some of the API is covered through examples.  Some of the API has yet to be written.   The Java classes can sort of be considered an "undocumented API" at this point.
Ohhh ok. Right, thats what i meant when i said poking through whats already coded. I don't want to really start trying stuff until i have a day of free time to set aside.
Logged

Specs for future reference:
Windows 7 64bit ; Intel Quad Core ; 8GB RAM ; AMD Radeon HD 6800 ; TB HD
Iggyjeckel
Donators
Hero Member
***
Posts: 510


View Profile
« Reply #13 on: October 16, 2012, 03:56:02 PM »

Yeah I plan on getting the fire/match/bucket working, then play around with own ideas. But I have exams in my java/advanced c++, political science, and systems analysis and design classes coming up......fun fun
Logged
Sean
Donators
Hero Member
***
Posts: 598



View Profile
« Reply #14 on: October 16, 2012, 04:32:39 PM »

Oh I knew there would be more needed, was just wondering if that form of animation would be possible. Which youve said basically not yet lol


Well, guess I plan something else, if I have more questtions (only the ones on what every bit of code would actually look like lol *ahem* unn *ahem*)

 im sorry something seemed to have caught in my throat
Code:
//unnaturallife
unnaturallife == false
if Paul.teach(unnaturallife) {
println "Wow, Paul actually taught unn something!";
} else {
println "Lol, fail unn." }
Yes, I know I did not assign Paul to anything Smiley
Good job, you have passed "Hello World"
They grow up so fast don't they :')
Logged

"People willing to trade their freedom for temporary security deserve neither and will lose both." - Benjamin Franklin
Pages: [1] 2
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.20 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!