pipmak-users Mailing List for Pipmak Game Engine (Page 3)
Status: Alpha
Brought to you by:
cwalther
You can subscribe to this list here.
2004 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
(1) |
Aug
(1) |
Sep
(16) |
Oct
(4) |
Nov
|
Dec
|
---|---|---|---|---|---|---|---|---|---|---|---|---|
2005 |
Jan
|
Feb
|
Mar
(1) |
Apr
|
May
|
Jun
(11) |
Jul
(6) |
Aug
|
Sep
(6) |
Oct
(8) |
Nov
(1) |
Dec
(5) |
2006 |
Jan
|
Feb
(1) |
Mar
(36) |
Apr
(2) |
May
(7) |
Jun
|
Jul
(1) |
Aug
(5) |
Sep
(22) |
Oct
(20) |
Nov
(3) |
Dec
(15) |
2007 |
Jan
(9) |
Feb
(2) |
Mar
(10) |
Apr
(14) |
May
(16) |
Jun
(30) |
Jul
(15) |
Aug
|
Sep
(2) |
Oct
(4) |
Nov
(11) |
Dec
(19) |
2008 |
Jan
(42) |
Feb
(8) |
Mar
(6) |
Apr
(12) |
May
(33) |
Jun
(9) |
Jul
(42) |
Aug
(7) |
Sep
(1) |
Oct
(21) |
Nov
(19) |
Dec
(6) |
2009 |
Jan
(22) |
Feb
(2) |
Mar
(5) |
Apr
(8) |
May
(12) |
Jun
(17) |
Jul
(5) |
Aug
|
Sep
(21) |
Oct
(32) |
Nov
(16) |
Dec
(24) |
2010 |
Jan
(1) |
Feb
|
Mar
(4) |
Apr
(5) |
May
(5) |
Jun
(8) |
Jul
|
Aug
|
Sep
(7) |
Oct
(4) |
Nov
(12) |
Dec
(4) |
2011 |
Jan
(7) |
Feb
(12) |
Mar
(13) |
Apr
(4) |
May
|
Jun
(4) |
Jul
(2) |
Aug
(5) |
Sep
|
Oct
(16) |
Nov
(8) |
Dec
(14) |
2012 |
Jan
(7) |
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2013 |
Jan
|
Feb
(1) |
Mar
(4) |
Apr
|
May
|
Jun
|
Jul
|
Aug
(1) |
Sep
(1) |
Oct
(3) |
Nov
|
Dec
|
2014 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
(1) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(4) |
2015 |
Jan
|
Feb
|
Mar
(2) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2017 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
(3) |
Jul
(4) |
Aug
|
Sep
(4) |
Oct
(2) |
Nov
|
Dec
|
2020 |
Jan
|
Feb
(1) |
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: James C. W. <jfc...@ya...> - 2011-12-08 23:01:49
|
Sorry for taking so long to respond... So actually that "if" problem was just a typo on my part, sorry. However, a new spanner is in the works: Pipmak still doesn't seem to translate the concatenation into the literal string needed. It just prints out the standard "Unused key 13 pressed" and does nothing when I press enter (the trigger for this whole thing). Note that if I replace the string "HELP" in the query with the raw concatenation, pipmak finds equality and it works.(But of course that doesn't help, cause that just makes Pipmak see anything the player types as being correct.) Here's the chunk that seems to be the problem: elseif key == pipmak.key_return then local execute = table.concat(keypress) if execute == "HELP" then pipmak.schedule(2, function() preScreen = pipmak.newimage(460, 340) preScreen:color(100, 33, 248) screen:setimage(preScreen) preScreen:drawtext(50, 90, ">:_" .. table.concat(keypress) .. "", "../fonts/Daniel_J_-_Deka.otf", 18, pipmak.left) preScreen:drawtext(50, 120, "VISITOR LOG \nMAP \nCOMMUNICATION \nEMERGENCY", "../fonts/Daniel_J_-_Deka.otf", 18, pipmak.left) screen:setimage(preScreen) end) return true else return false end Thanks, James CW --- On Wed, 11/30/11, Christian Walther <cwa...@gm...> wrote: From: Christian Walther <cwa...@gm...> Subject: Re: Combining tabled strings To: pip...@li... Date: Wednesday, November 30, 2011, 3:48 PM James C. Wilson wrote: > local execute = ""..keypress[1]..""..keypress[2]..""..keypress[3].. > ""..keypress[4].. ""..keypress[5].. ""..keypress[6].. ""..keypress[7].. > ""..keypress[8].. ""..keypress[9].. ""..keypress[10].. "" > > if execute == "map" then Works for me. By the way, you don't need all these empty strings - this works too: local execute = keypress[1]..keypress[2]..keypress[3].. keypress[4]..keypress[5]..keypress[6]..keypress[7]..keypress[8].. keypress[9]..keypress[10] And if you want to save some typing, or handle variable-sized lists, a shorter version is local execute = table.concat(keypress) (see http://www.lua.org/manual/5.0/manual.html#5.4 ) > I receive an "unexpected symbol near "if" error. That suggests that there is something wrong with what comes before the "if" - Lua is not expecting an "if" there, but something that completes whatever comes before. -Christian ------------------------------------------------------------------------------ All the data continuously generated in your IT infrastructure contains a definitive record of customers, application performance, security threats, fraudulent activity, and more. Splunk takes this data and makes sense of it. IT sense. And common sense. http://p.sf.net/sfu/splunk-novd2d _______________________________________________ Pipmak-Users mailing list Pip...@li... news://news.gmane.org/gmane.games.devel.pipmak.user https://lists.sourceforge.net/lists/listinfo/pipmak-users |
From: Christian W. <cwa...@gm...> - 2011-11-30 20:50:27
|
James C. Wilson wrote: > local execute = ""..keypress[1]..""..keypress[2]..""..keypress[3].. > ""..keypress[4].. ""..keypress[5].. ""..keypress[6].. ""..keypress[7].. > ""..keypress[8].. ""..keypress[9].. ""..keypress[10].. "" > > if execute == "map" then Works for me. By the way, you don't need all these empty strings - this works too: local execute = keypress[1]..keypress[2]..keypress[3].. keypress[4]..keypress[5]..keypress[6]..keypress[7]..keypress[8].. keypress[9]..keypress[10] And if you want to save some typing, or handle variable-sized lists, a shorter version is local execute = table.concat(keypress) (see http://www.lua.org/manual/5.0/manual.html#5.4 ) > I receive an "unexpected symbol near "if" error. That suggests that there is something wrong with what comes before the "if" - Lua is not expecting an "if" there, but something that completes whatever comes before. -Christian |
From: Christian W. <cwa...@gm...> - 2011-11-30 20:49:15
|
James C. Wilson wrote: > So I've got a potential bug relating to layered patch rendering... > > I've got a slide node with a blank, opaque background. Over the > background there are two patches: One, is a wider-then-background image > which scrolls back and forth over the background. The second, is a PNG > with a part in the middle made transparent, so you can see the scrolling > image behind it. It all works fine, however, I can see a seam, one pixel > wide, running on the left and right edges of the patch, peeking down > onto the scrolling image and the opaque background. > > This seam is also present in another node where the patch underneath is > smaller then the background and not scrollling. > > If the cause of this is well known I'd appreciate a heads-up. I've > already checked the PNG to see if I accidently created this seam myself > while editing; that wasn't the case. You are probably seeing what is described in the manual, section 2.9 "Patches", as follows: Subsection "Image": > For technical reasons (interpolation), the outermost pixels along > each edge of a patch image should either be identical to the > corresponding pixels of the background image or fully transparent. In > other words, the patch image should be one pixel larger on each side > than absolutely necessary. Otherwise, the patch may appear cut off > along some edges. Subsection "Advanced Placement in 3D": > Width and height of the patch can also be specified in normalized > units using the nw and nh parameters. Unlike w and h, which give the > total width and height of the patch, these parameters describe the > visible width and height. On panoramas and slides, this is one patch > pixel less than the total width or height because a margin of half a > pixel is cut off each side of the patch, so that the centers of the > outermost pixels lie on the edge, to enable a bilinearly interpolated > patch to blend seamlessly into a bilinearly interpolated background > image. This is similar to what’s done with the cube faces as > described under “Making Cubic Panoramas” in section 2.8 “Cubic > Panoramas”. You should be able to see this if you make your window so big that you can clearly see the interpolation of the pixels (at least 3 or 4 times as big as the original size of the background image). The upshot of it is that to do what you want, the covering patch must be strictly wider (not the same width) as what it's supposed to cover. In the wider-than-background case, that patch must be wider-than-background too. (Because you're stacking multiple patches rather than just putting a patch on the background image, replace "background image" in the first manual quotation with "whatever is behind it".) If you come to the conclusion that this is not what you're seeing, then it's entirely possible that we don't handle wider-than-background patches properly. I don't think I have ever tested those. In that case I would appreciate a complete reproducing example. It has recently occurred to me that it could under some circumstances be useful to be able to display only a (movable) subrectangle of an image on a patch. That would remove the need for a wider-than-background patch (and for covering up most of it) in your case too, I think. -Christian |
From: James C. W. <jfc...@ya...> - 2011-11-29 22:05:29
|
I'm trying to combine the values of several variables into a single literal string for checking equality. In this case the subject is an ingame computer into which the player must type commands. I've got everything to work perfectly except for this one issue: local execute = ""..keypress[1]..""..keypress[2]..""..keypress[3].. ""..keypress[4].. ""..keypress[5].. ""..keypress[6].. ""..keypress[7].. ""..keypress[8].. ""..keypress[9].. ""..keypress[10].. "" Each tabled variable represents either a typed character or a space, depending on what the player has typed, all combined into a single string. if execute == "map" then The purpose of this is to check if the player typed "map" and if so direct further action. However it seems that Pipmak does not interpret and break down this combined string in the same way it would if the string were the filename of a patch or the text of a drawtext() operation, which is what I was hoping for. Instead I receive an "unexpected symbol near "if" error. Thanks, James CW |
From: James C. W. <jfc...@ya...> - 2011-11-29 22:03:50
|
So I've got a potential bug relating to layered patch rendering... I've got a slide node with a blank, opaque background. Over the background there are two patches: One, is a wider-then-background image which scrolls back and forth over the background. The second, is a PNG with a part in the middle made transparent, so you can see the scrolling image behind it. It all works fine, however, I can see a seam, one pixel wide, running on the left and right edges of the patch, peeking down onto the scrolling image and the opaque background. This seam is also present in another node where the patch underneath is smaller then the background and not scrollling. If the cause of this is well known I'd appreciate a heads-up. I've already checked the PNG to see if I accidently created this seam myself while editing; that wasn't the case. Thanks, James CW |
From: Christian W. <cwa...@gm...> - 2011-11-20 08:37:26
|
> there are also programming aspects that I'm not familiar with, such as where to tie the audio tracks to the dial settings. > ... > The only thing I'm uncertain I can do is make the correct combination of buttons in node 18 trigger the key appearing in node 16. The current button combination (assuming that it doesn't automatically reset once you leave, as the knobs in the original demo do) is part of your game state, so you store it in the global "state" table. In node 16, you then make the visibility of the key dependent on that state, and in node 18, the audio track. -Christian |
From: Jonathan M. <jon...@gm...> - 2011-11-19 17:11:36
|
Hi Christian! Thank you. The more I thought about it, it seemed like maybe it would be easier for me to just erase the knobs all together and go with buttons. I appreciate your help, but even aside from the math of moving the wheels, there are also programming aspects that I'm not familiar with, such as where to tie the audio tracks to the dial settings. If I make buttons, and then either learn to make a hotspot map or perhaps just add a bunch of handles, then I think I can work within my present knowledge. The only thing I'm uncertain I can do is make the correct combination of buttons in node 18 trigger the key appearing in node 16. Still, with enough elbow grease I think I can reason it out. Nonetheless, trying to make sense of your code (with the aid of the comments) is helping me get a better handle on the math involved, though I still have to look up some of the programming vernacular. Jonathan On Fri, Nov 18, 2011 at 12:12 PM, Christian Walther <cwa...@gm...> wrote: > IndianaScones wrote: > > I am attempting to change the behavior of the RGB knobs in the building. > > Instead of a smooth range of motion, I would like to make them each have > 4 > > settings (when you click and drag a knob, it jumps through each of the 4 > > settings). Each of these settings will play a different looped audio > track. > > The key in the doorway behind you (when at the controls) will be > invisible > > at first, but it will appear when you have set the knobs to the correct > > combination. > > > > Here is an example of what I'm trying to accomplish (the settings with > > asterisks would be the secret combination): > > http://old.nabble.com/file/p32859425/screen.jpg > > > > ... > > > > It may be a lot of help to ask for (I don't know), but if someone can > even > > point me in the right direction, I would greatly appreciate it. When I > look > > at all that stuff in node 18 dealing with the RGB controls, I am > completely > > lost. > > I understand - there is a bit of math involved in moving something on a > circle, and then there is the animated gauge and all that adding more > complexity to the script of node 18. > > Here's a replacement mousestilldown function for the red knob that snaps > the knob to five regularly spaced positions on its circle, and hopefully > makes things a bit clearer with the comments: > > onmousestilldown = function() > -- center of the circle > local x0, y0 = 219, 422 > -- mouse location relative to the center of the circle > local x, y = pipmak.mouseloc() > x = x - x0 > y = y - y0 > -- if the mouse is exactly in the center, treat it as > slightly above > if x == 0 and y == 0 then y = -1 end > -- angle, clockwise from the top, in radians ([0..2*pi)) > local a = math.atan2(x, -y) > -- angle in fifth-circles ([0..5)) > a = a/(2*math.pi)*5 > -- round to the closest whole number > a = math.floor(a + 0.5) > -- convert back to radians > a = a/5*2*math.pi > -- convert from angle back to coordinates ([-1..1]) > x = math.sin(a) > y = -math.cos(a) > -- place the knob: center of the knob on a circle of radius > 21 around the center coordinates, therefore its top left corner 8 pixels > offset from that horizontally and vertically > redknob:moveto(x0 + x*21 - 8, y0 + y*21 - 8) > end > > To have irregularly spaced positions, as you depict, instead of rounding > the angle to the nearest whole number, you need to check if it's inside > each of the five ranges individually, and then snap it to the respective > position. > > Does that help? > > -Christian > > ------------------------------------------------------------------------------ > All the data continuously generated in your IT infrastructure > contains a definitive record of customers, application performance, > security threats, fraudulent activity, and more. Splunk takes this > data and makes sense of it. IT sense. And common sense. > http://p.sf.net/sfu/splunk-novd2d > _______________________________________________ > Pipmak-Users mailing list > Pip...@li... > news://news.gmane.org/gmane.games.devel.pipmak.user > https://lists.sourceforge.net/lists/listinfo/pipmak-users > |
From: Christian W. <cwa...@gm...> - 2011-11-18 20:13:26
|
IndianaScones wrote: > I am attempting to change the behavior of the RGB knobs in the building. > Instead of a smooth range of motion, I would like to make them each have 4 > settings (when you click and drag a knob, it jumps through each of the 4 > settings). Each of these settings will play a different looped audio track. > The key in the doorway behind you (when at the controls) will be invisible > at first, but it will appear when you have set the knobs to the correct > combination. > > Here is an example of what I'm trying to accomplish (the settings with > asterisks would be the secret combination): > http://old.nabble.com/file/p32859425/screen.jpg > > ... > > It may be a lot of help to ask for (I don't know), but if someone can even > point me in the right direction, I would greatly appreciate it. When I look > at all that stuff in node 18 dealing with the RGB controls, I am completely > lost. I understand - there is a bit of math involved in moving something on a circle, and then there is the animated gauge and all that adding more complexity to the script of node 18. Here's a replacement mousestilldown function for the red knob that snaps the knob to five regularly spaced positions on its circle, and hopefully makes things a bit clearer with the comments: onmousestilldown = function() -- center of the circle local x0, y0 = 219, 422 -- mouse location relative to the center of the circle local x, y = pipmak.mouseloc() x = x - x0 y = y - y0 -- if the mouse is exactly in the center, treat it as slightly above if x == 0 and y == 0 then y = -1 end -- angle, clockwise from the top, in radians ([0..2*pi)) local a = math.atan2(x, -y) -- angle in fifth-circles ([0..5)) a = a/(2*math.pi)*5 -- round to the closest whole number a = math.floor(a + 0.5) -- convert back to radians a = a/5*2*math.pi -- convert from angle back to coordinates ([-1..1]) x = math.sin(a) y = -math.cos(a) -- place the knob: center of the knob on a circle of radius 21 around the center coordinates, therefore its top left corner 8 pixels offset from that horizontally and vertically redknob:moveto(x0 + x*21 - 8, y0 + y*21 - 8) end To have irregularly spaced positions, as you depict, instead of rounding the angle to the nearest whole number, you need to check if it's inside each of the five ranges individually, and then snap it to the respective position. Does that help? -Christian |
From: IndianaScones <jon...@gm...> - 2011-11-17 03:21:55
|
Hello! I am attempting to change the behavior of the RGB knobs in the building. Instead of a smooth range of motion, I would like to make them each have 4 settings (when you click and drag a knob, it jumps through each of the 4 settings). Each of these settings will play a different looped audio track. The key in the doorway behind you (when at the controls) will be invisible at first, but it will appear when you have set the knobs to the correct combination. Here is an example of what I'm trying to accomplish (the settings with asterisks would be the secret combination): http://old.nabble.com/file/p32859425/screen.jpg The nodes in question are: 18 http://old.nabble.com/file/p32859425/node18.lua node18.lua (the RGB controls) & 16 http://old.nabble.com/file/p32859425/node16.lua node16.lua (where the key is) I've managed to fumble through a few scripting changes (making the colored light switches on the platform take you to a new node when you press the correct combination of buttons), but I am a sound designer, and I think what I'm going for here might be beyond me. It may be a lot of help to ask for (I don't know), but if someone can even point me in the right direction, I would greatly appreciate it. When I look at all that stuff in node 18 dealing with the RGB controls, I am completely lost. -- View this message in context: http://old.nabble.com/Adding-modular-functionality-to-the-RGB-knobs-in-the-demo-tp32859425p32859425.html Sent from the pipmak-users mailing list archive at Nabble.com. |
From: Christian W. <cwa...@gm...> - 2011-10-30 07:29:12
|
> ..And here's what I feel would be a bit clearer: > > 3.6.2 Inter-Node Communication > Often some way of communication between two or more simultaneously displayed nodes is needed. > > How does that look? Looks good - changed, thanks! http://pipmak.svn.sourceforge.net/viewvc/pipmak?view=revision&revision=231 -Christian |
From: James C. W. <jfc...@ya...> - 2011-10-29 20:53:05
|
Oh, thanks. I personally didn't get that from the manual..Here's the original section: 3.6.2 Inter-Node Communication Often some way of communication between one displayed node and another is needed. The obvious naive way of achieving this would be defining a global function in node A and calling it from node B. However, this doesn’t work as expected in many cases: Lua doesn’t care in which file a function was defined. Even if it was defined in the node.lua file of node A, calling the function from node B will make the code run in node B. Anything it does that makes an implicit assumption about the “current node” will affect node B, not node A. To solve this problem, a messaging system is provided. By including messages { messagename = handler, ... } in its node.lua, a node can define a set of messages to which it responds. Each entry in the messages table links a string messagename to a handler function that will be called when the corresponding message is received. The message handler function then runs in the node where it was defined, not in the one who sent the message. To send a message to a node, use its message method. ..And here's what I feel would be a bit clearer: 3.6.2 Inter-Node Communication Often some way of communication between two or more simultaneously displayed nodes is needed. How does that look? Thanks, James --- On Sat, 10/29/11, Christian Walther <cwa...@gm...> wrote: From: Christian Walther <cwa...@gm...> Subject: Re: Messaging To: "Content creation for the Pipmak Game Engine" <pip...@li...> Date: Saturday, October 29, 2011, 5:19 AM > The way you phrased your question leads me to belive the messaging system can only be used for nodes visible at the same time...is that so? Yes. Is the documentation not clear enough about that? How could it be improved? > The point is when a hotspot is clicked in one node, to move to node 34 and execute a function(in this case, panning to a different angle as a light flickers on). There is no need for inter-node messaging for that. You can execute that function in an enternode handler of node 34, and if it shouldn't be done every time you enter the node, you decide whether or not based on some global setting, either an entry in the "state" table if it should be part of saved games or a plain global variable if it shouldn't, that you can set from the previous node. -Christian ------------------------------------------------------------------------------ Get your Android app more play: Bring it to the BlackBerry PlayBook in minutes. BlackBerry App World™ now supports Android™ Apps for the BlackBerry® PlayBook™. Discover just how easy and simple it is! http://p.sf.net/sfu/android-dev2dev _______________________________________________ Pipmak-Users mailing list Pip...@li... news://news.gmane.org/gmane.games.devel.pipmak.user https://lists.sourceforge.net/lists/listinfo/pipmak-users |
From: Christian W. <cwa...@gm...> - 2011-10-29 09:19:58
|
> The way you phrased your question leads me to belive the messaging system can only be used for nodes visible at the same time...is that so? Yes. Is the documentation not clear enough about that? How could it be improved? > The point is when a hotspot is clicked in one node, to move to node 34 and execute a function(in this case, panning to a different angle as a light flickers on). There is no need for inter-node messaging for that. You can execute that function in an enternode handler of node 34, and if it shouldn't be done every time you enter the node, you decide whether or not based on some global setting, either an entry in the "state" table if it should be part of saved games or a plain global variable if it shouldn't, that you can set from the previous node. -Christian |
From: James C. W. <jfc...@ya...> - 2011-10-28 18:10:23
|
Both are background nodes. The point is when a hotspot is clicked in one node, to move to node 34 and execute a function(in this case, panning to a different angle as a light flickers on). Would create a problem? The way you phrased your question leads me to belive the messaging system can only be used for nodes visible at the same time...is that so? Thanks, James --- On Fri, 10/28/11, Christian Walther <cwa...@gm...> wrote: From: Christian Walther <cwa...@gm...> Subject: Re: Messaging To: "Content creation for the Pipmak Game Engine" <pip...@li...> Date: Friday, October 28, 2011, 6:49 AM > Is this what you meant? > Including this in node 34: > onenternode(function() medCtr_recordsRoom = pipmak.thisnode() end) > > And the message to 34: > medCtr_recordsRoom:message("lightFlicker") > > If I do that pipmak says medCtr_recordsRoom has no "message" function. That should work. Can you give more details about your situation? Is node 34 the background node and the other node an overlay, or the other way around, or both overlays? At what time (in response to what) are you calling the message method? -Christian ------------------------------------------------------------------------------ The demand for IT networking professionals continues to grow, and the demand for specialized networking skills is growing even more rapidly. Take a complimentary Learning@Cisco Self-Assessment and learn about Cisco certifications, training, and career opportunities. http://p.sf.net/sfu/cisco-dev2dev _______________________________________________ Pipmak-Users mailing list Pip...@li... news://news.gmane.org/gmane.games.devel.pipmak.user https://lists.sourceforge.net/lists/listinfo/pipmak-users |
From: Christian W. <cwa...@gm...> - 2011-10-28 10:49:20
|
> Is this what you meant? > Including this in node 34: > onenternode(function() medCtr_recordsRoom = pipmak.thisnode() end) > > And the message to 34: > medCtr_recordsRoom:message("lightFlicker") > > If I do that pipmak says medCtr_recordsRoom has no "message" function. That should work. Can you give more details about your situation? Is node 34 the background node and the other node an overlay, or the other way around, or both overlays? At what time (in response to what) are you calling the message method? -Christian |
From: James C. W. <jfc...@ya...> - 2011-10-26 19:47:15
|
Is this what you meant? Including this in node 34: onenternode(function() medCtr_recordsRoom = pipmak.thisnode() end) And the message to 34: medCtr_recordsRoom:message("lightFlicker") If I do that pipmak says medCtr_recordsRoom has no "message" function. Thanks, James --- On Sat, 10/22/11, Christian Walther <cwa...@gm...> wrote: From: Christian Walther <cwa...@gm...> Subject: Re: Messaging (was: Possible bug in system node -11) To: "Content creation for the Pipmak Game Engine" <pip...@li...> Date: Saturday, October 22, 2011, 6:38 AM > One other thing: I'm not certain how the messaging system works. How do I tell pipmak which node to contact? If I just do "34:message(lightFlicker)" or "34:getid():message(lightflicker)" pipmak says "unexpected symbol near 34", both times. 34 is a number and doesn't have a "message" method (numbers don't have methods at all, which explains the error message). What you want is the node object that represents node 34. How to obtain that depends on how you displayed node 34 - see section 3.6.3 "Node Objects" in the manual. (If node 34 is not being displayed, no node object for it exists and you can't message it.) -Christian ------------------------------------------------------------------------------ The demand for IT networking professionals continues to grow, and the demand for specialized networking skills is growing even more rapidly. Take a complimentary Learning@Cisco Self-Assessment and learn about Cisco certifications, training, and career opportunities. http://p.sf.net/sfu/cisco-dev2dev _______________________________________________ Pipmak-Users mailing list Pip...@li... news://news.gmane.org/gmane.games.devel.pipmak.user https://lists.sourceforge.net/lists/listinfo/pipmak-users |
From: Christian W. <cwa...@gm...> - 2011-10-22 10:38:48
|
> One other thing: I'm not certain how the messaging system works. How do I tell pipmak which node to contact? If I just do "34:message(lightFlicker)" or "34:getid():message(lightflicker)" pipmak says "unexpected symbol near 34", both times. 34 is a number and doesn't have a "message" method (numbers don't have methods at all, which explains the error message). What you want is the node object that represents node 34. How to obtain that depends on how you displayed node 34 - see section 3.6.3 "Node Objects" in the manual. (If node 34 is not being displayed, no node object for it exists and you can't message it.) -Christian |
From: James C. W. <jfc...@ya...> - 2011-10-21 20:34:09
|
Yeah, that sounds exactly right. Thanks for clarifying! One other thing: I'm not certain how the messaging system works. How do I tell pipmak which node to contact? If I just do "34:message(lightFlicker)" or "34:getid():message(lightflicker)" pipmak says "unexpected symbol near 34", both times. I'm probably making a stupid mistake but I don't know what it is. Thanks, James --- On Thu, 10/20/11, Christian Walther <cwa...@gm...> wrote: From: Christian Walther <cwa...@gm...> Subject: Re: Possible bug in system node -11 To: "Content creation for the Pipmak Game Engine" <pip...@li...> Date: Thursday, October 20, 2011, 4:13 PM > There may or may not be a bug in pipmak's system nodes-- specifically node -11. > In a few nodes in my project, there are several sounds which, while declared in node.lua are not yet placed in the project folder. Whenever I enter one of these nodes, pipmak prints the expected "The system cannot find the file specified". However, about 3 times out of 5, it also prints: > "Error running text editor keydown handler: -11/node.lua:76: calling 'selection' on bad self (texteditor expected, got userdata) > stack traceback: > [C]: in function 'selection' > -11/node.lua:76: in function <-11/node.lua:33>" Node -11 is the Lua command line. I think what you're seeing is what was fixed in revision 211 <http://pipmak.svn.sourceforge.net/viewvc/pipmak?view=revision&revision=211>. I'm not sure about the details without more information about your situation, but one way to provoke that error message (before r211) is as follows: You have node A open, and the Lua command line above it. You do pipmak.gotonode(B). The node.lua of node B has an error that prevents the node from loading (a missing sound file should not be sufficient for that). Node A has already been left, but node B could not be entered, which means that the Lua command line (node -11) is now the bottommost node in the node stack, i.e. the background node. (*) Now you do pipmak.gotonode(C). This leaves node -11 and enters node C, and the former is what triggers the error message, since node -11 is designed to work as an overlay, not as a background node that can be left in that way, so it is confused by that. Maybe you can align this explanation with your experience somehow, and if not, at least find a reliable way of reproducing the error. You should easily be able to recognize situation (*) by the fact that the Lua command line appears on top of a gray striped background rather than on top of one of your nodes. -Christian ------------------------------------------------------------------------------ The demand for IT networking professionals continues to grow, and the demand for specialized networking skills is growing even more rapidly. Take a complimentary Learning@Cisco Self-Assessment and learn about Cisco certifications, training, and career opportunities. http://p.sf.net/sfu/cisco-dev2dev _______________________________________________ Pipmak-Users mailing list Pip...@li... news://news.gmane.org/gmane.games.devel.pipmak.user https://lists.sourceforge.net/lists/listinfo/pipmak-users |
From: Christian W. <cwa...@gm...> - 2011-10-20 20:14:35
|
> There may or may not be a bug in pipmak's system nodes-- specifically node -11. > In a few nodes in my project, there are several sounds which, while declared in node.lua are not yet placed in the project folder. Whenever I enter one of these nodes, pipmak prints the expected "The system cannot find the file specified". However, about 3 times out of 5, it also prints: > "Error running text editor keydown handler: -11/node.lua:76: calling 'selection' on bad self (texteditor expected, got userdata) > stack traceback: > [C]: in function 'selection' > -11/node.lua:76: in function <-11/node.lua:33>" Node -11 is the Lua command line. I think what you're seeing is what was fixed in revision 211 <http://pipmak.svn.sourceforge.net/viewvc/pipmak?view=revision&revision=211>. I'm not sure about the details without more information about your situation, but one way to provoke that error message (before r211) is as follows: You have node A open, and the Lua command line above it. You do pipmak.gotonode(B). The node.lua of node B has an error that prevents the node from loading (a missing sound file should not be sufficient for that). Node A has already been left, but node B could not be entered, which means that the Lua command line (node -11) is now the bottommost node in the node stack, i.e. the background node. (*) Now you do pipmak.gotonode(C). This leaves node -11 and enters node C, and the former is what triggers the error message, since node -11 is designed to work as an overlay, not as a background node that can be left in that way, so it is confused by that. Maybe you can align this explanation with your experience somehow, and if not, at least find a reliable way of reproducing the error. You should easily be able to recognize situation (*) by the fact that the Lua command line appears on top of a gray striped background rather than on top of one of your nodes. -Christian |
From: James C. W. <jfc...@ya...> - 2011-10-20 18:30:35
|
There may or may not be a bug in pipmak's system nodes-- specifically node -11. In a few nodes in my project, there are several sounds which, while declared in node.lua are not yet placed in the project folder. Whenever I enter one of these nodes, pipmak prints the expected "The system cannot find the file specified". However, about 3 times out of 5, it also prints: "Error running text editor keydown handler: -11/node.lua:76: calling 'selection' on bad self (texteditor expected, got userdata) stack traceback: [C]: in function 'selection' -11/node.lua:76: in function <-11/node.lua:33>" I don't know if this is just somehow due to me not yet including the sound files or whether there is something else at work... |
From: Christian W. <cwa...@gm...> - 2011-10-13 19:31:01
|
> On another note, is there a way to chain other calls to run right after my animation is complete other then seperatly timing them with pipmak.schedule? There's no way around pipmak.schedule, but instead of timing them from the beginning, you could also trigger your additional calls from the scheduled function that displays the last frame of your animation. -Christian |
From: James C. W. <jfc...@ya...> - 2011-10-12 17:34:41
|
Oh, right, I forgot about patches being declarative..Sorry about that. On another note, is there a way to chain other calls to run right after my animation is complete other then seperatly timing them with pipmak.schedule? Thanks, James --- On Tue, 10/11/11, Christian Walther <cwa...@gm...> wrote: From: Christian Walther <cwa...@gm...> Subject: Re: Argument not being accepted by function To: "Content creation for the Pipmak Game Engine" <pip...@li...> Date: Tuesday, October 11, 2011, 3:28 PM > Is this what you meant by quotation marks? > playVid("stairDoorOpenLeft", 20, 4, 333, 400, 15) Yes (but I don't know if it's what *you* meant). > If so, there's apparently another problem. Now pipmak gives another error message, but this time it says that "global patch" is a "nil value", which is odd because it's obviously nothing of the sort, it's just a regular patch object, as you can see in my function, not a global. Then you're calling the function at another time than node loading, and the error message is completely correct. It's not talking about any patch object, it's talking about the global function "patch" that you're trying to call here. The configuration functions like "patch" are only available at node loading time and are nil otherwise. You shouldn't think of them as functions, but as declarative statements. See <http://thread.gmane.org/gmane.games.devel.pipmak.user/721/focus=722>. You currently can't create new patches while a node is running, all patches you need must already be present in the original node configuration. (Calling this same playVid() function at node loading time however isn't a good idea either, you shouldn't schedule timers or perform other actions at node loading time - it will currently work, but in a future version the node description may also be loaded at other times than when you enter the node it, e.g. to populate a project map. You must separate the creation of the patch and the starting of the animation.) -Christian ------------------------------------------------------------------------------ All the data continuously generated in your IT infrastructure contains a definitive record of customers, application performance, security threats, fraudulent activity and more. Splunk takes this data and makes sense of it. Business sense. IT sense. Common sense. http://p.sf.net/sfu/splunk-d2d-oct _______________________________________________ Pipmak-Users mailing list Pip...@li... news://news.gmane.org/gmane.games.devel.pipmak.user https://lists.sourceforge.net/lists/listinfo/pipmak-users |
From: Christian W. <cwa...@gm...> - 2011-10-11 19:28:41
|
> Is this what you meant by quotation marks? > playVid("stairDoorOpenLeft", 20, 4, 333, 400, 15) Yes (but I don't know if it's what *you* meant). > If so, there's apparently another problem. Now pipmak gives another error message, but this time it says that "global patch" is a "nil value", which is odd because it's obviously nothing of the sort, it's just a regular patch object, as you can see in my function, not a global. Then you're calling the function at another time than node loading, and the error message is completely correct. It's not talking about any patch object, it's talking about the global function "patch" that you're trying to call here. The configuration functions like "patch" are only available at node loading time and are nil otherwise. You shouldn't think of them as functions, but as declarative statements. See <http://thread.gmane.org/gmane.games.devel.pipmak.user/721/focus=722>. You currently can't create new patches while a node is running, all patches you need must already be present in the original node configuration. (Calling this same playVid() function at node loading time however isn't a good idea either, you shouldn't schedule timers or perform other actions at node loading time - it will currently work, but in a future version the node description may also be loaded at other times than when you enter the node it, e.g. to populate a project map. You must separate the creation of the patch and the starting of the animation.) -Christian |
From: James C. W. <jfc...@ya...> - 2011-10-11 18:12:04
|
Hi, Is this what you meant by quotation marks? playVid("stairDoorOpenLeft", 20, 4, 333, 400, 15) If so, there's apparently another problem. Now pipmak gives another error message, but this time it says that "global patch" is a "nil value", which is odd because it's obviously nothing of the sort, it's just a regular patch object, as you can see in my function, not a global. Thanks, James --- On Mon, 10/10/11, Christian Walther <cwa...@gm...> wrote: From: Christian Walther <cwa...@gm...> Subject: Re: Argument not being accepted by function To: "Content creation for the Pipmak Game Engine" <pip...@li...> Date: Monday, October 10, 2011, 3:23 PM > I'm having a bit of difficulty writing up a function to simplify image sequences and make them playable by one line: playVid(stairDoorOpenLeft, 20, 4, 333, 400, 15) > The first argument specifies the folder the images are in, then the number of frames, then the cube face, the x/y coords, and the framerate. Trouble is when I run it it tells me this : attempt to concatenate local folder, a nil value The function looks OK in that regard, so if the above is your actual call, then probably the variable stairDoorOpenLeft actually has value nil - have you checked that? Or possibly you didn't mean it to be a variable, but a string literal, i.e. you forgot the quotation marks? -Christian > function playVid(folder, frameCnt, face, locX, locY, framerate) > > local animpos = 0 > local vid = patch { face = face, x = locX, y = locY, image = " " .. folder .. "/" .. animpos .. ".jpg" } > > > pipmak.schedule( > framerate, > function(now, last) > animpos = animpos + 1 > if animpos > frameCnt then animpos = 0 end > vid:setimage ( " " .. folder .. "/" .. animpos .. ".jpg" ) > return framerate > end > ) > end ------------------------------------------------------------------------------ All the data continuously generated in your IT infrastructure contains a definitive record of customers, application performance, security threats, fraudulent activity and more. Splunk takes this data and makes sense of it. Business sense. IT sense. Common sense. http://p.sf.net/sfu/splunk-d2dcopy1 _______________________________________________ Pipmak-Users mailing list Pip...@li... news://news.gmane.org/gmane.games.devel.pipmak.user https://lists.sourceforge.net/lists/listinfo/pipmak-users |
From: Christian W. <cwa...@gm...> - 2011-10-10 19:23:42
|
> I'm having a bit of difficulty writing up a function to simplify image sequences and make them playable by one line: playVid(stairDoorOpenLeft, 20, 4, 333, 400, 15) > The first argument specifies the folder the images are in, then the number of frames, then the cube face, the x/y coords, and the framerate. Trouble is when I run it it tells me this : attempt to concatenate local folder, a nil value The function looks OK in that regard, so if the above is your actual call, then probably the variable stairDoorOpenLeft actually has value nil - have you checked that? Or possibly you didn't mean it to be a variable, but a string literal, i.e. you forgot the quotation marks? -Christian > function playVid(folder, frameCnt, face, locX, locY, framerate) > > local animpos = 0 > local vid = patch { face = face, x = locX, y = locY, image = " " .. folder .. "/" .. animpos .. ".jpg" } > > > pipmak.schedule( > framerate, > function(now, last) > animpos = animpos + 1 > if animpos > frameCnt then animpos = 0 end > vid:setimage ( " " .. folder .. "/" .. animpos .. ".jpg" ) > return framerate > end > ) > end |
From: James C. W. <jfc...@ya...> - 2011-10-09 18:57:13
|
Hi all, I'm having a bit of difficulty writing up a function to simplify image sequences and make them playable by one line: playVid(stairDoorOpenLeft, 20, 4, 333, 400, 15) The first argument specifies the folder the images are in, then the number of frames, then the cube face, the x/y coords, and the framerate. Trouble is when I run it it tells me this : attempt to concatenate local folder, a nil value The function is below...Anysuggestions? Thanks, James function playVid(folder, frameCnt, face, locX, locY, framerate) local animpos = 0 local vid = patch { face = face, x = locX, y = locY, image = " " .. folder .. "/" .. animpos .. ".jpg" } pipmak.schedule( framerate, function(now, last) animpos = animpos + 1 if animpos > frameCnt then animpos = 0 end vid:setimage ( " " .. folder .. "/" .. animpos .. ".jpg" ) return framerate end ) end |