Thursday, July 9, 2009
Canvas only seems to work on large sizes
I will need to set it up so that all the objects are like size 90 instead of 1
for finding the rotaton of that canvas
// for(var i = 0; i < 3 ; i++){
// setTimeout( function (rotation){
// frontCanvas.transform.rotateX(-rotation);
// console.log(rotation);
// },500 * i,i);
// count = count + i;
//}
// setTimeout( function (rotation){
// frontCanvas.transform.rotateX(-rotation);
// console.log(rotation);
// },500 * i,i);
// count = count + i;
//}
o3d and primitives
Attempt to allocate zero bytes for Buffer
Check your parameters and make sure they aren't 0.
Check your parameters and make sure they aren't 0.
Wednesday, July 8, 2009
o3d and scale
Collada files can have wildly varying scales. Get the bounding boxes to see if your scales are very different.
Tuesday, July 7, 2009
Using o3d
My current project is trying to hack o3d into something that can easily display simple comics.
First week: thinkin
next week: trying to hack home configurator(from the o3d samples) into something like what I want
now: giving up on home configurator and moving onto the simple scene viewer. The last straw was when the home configurator for whatever reason wouldn't show my created stickfigure.
First week: thinkin
next week: trying to hack home configurator(from the o3d samples) into something like what I want
now: giving up on home configurator and moving onto the simple scene viewer. The last straw was when the home configurator for whatever reason wouldn't show my created stickfigure.
Tuesday, June 9, 2009
How to create an internal stackoverflow using drupal
For a while I was trying to find an internal stackoveflow website to use at my company. At first I looked at stacked , but in the time it took to get that setup that was taken down for legal reasons.
However I had recently been working with drupal and thought that there must be some combination of mods that you could use to make a stackoverflow. It turns out there is.
Here is how I got it running.
First for the most difficult part. Installing drupal. You want something like the WAMP which simplifies quite a bit. But that is windows only and the server it is running on is a mac. So how do you set it up on a mac? Use MAMP
Next, the module that you want to use is the finder module.
For configuring it you want to configure the finder module and add a content type.
For the content type you want to add is a regular content type with a title and a body. Name it something like questions.
Next you want to create the appropriate finder. For it you want to set the autocomplete option and make it search on titles.
And there you go. This doesn't recreate every option stackoverflow has, but its a pretty nice start. For additional usage like tags you can use modules like heirarchical select and create as many tag as you like for your data.
However I had recently been working with drupal and thought that there must be some combination of mods that you could use to make a stackoverflow. It turns out there is.
Here is how I got it running.
First for the most difficult part. Installing drupal. You want something like the WAMP which simplifies quite a bit. But that is windows only and the server it is running on is a mac. So how do you set it up on a mac? Use MAMP
Next, the module that you want to use is the finder module.
For configuring it you want to configure the finder module and add a content type.
For the content type you want to add is a regular content type with a title and a body. Name it something like questions.
Next you want to create the appropriate finder. For it you want to set the autocomplete option and make it search on titles.
And there you go. This doesn't recreate every option stackoverflow has, but its a pretty nice start. For additional usage like tags you can use modules like heirarchical select and create as many tag as you like for your data.
Sunday, February 22, 2009
Drupal is a remarkable tool
I've recently been trying out drupal because the webhosting I bought had it to where you could click on a button and install it.
Drupal is remarkable in the sense that it just seems to work and it works via gui. You get the sense that someone who isn't a programmer could administer a site.
Drupal is remarkable in the sense that it just seems to work and it works via gui. You get the sense that someone who isn't a programmer could administer a site.
Sunday, January 4, 2009
shallow copies in python
I had a fairly interesting bug today.
When going to cast a second spell the grid targeting was hitting every previous unit and position.
I tracked it down to the fact that I made a copy of the executing object.
Now I made a copy to it so that it wouldn't interfere with the objects on the unit. So why did that cause more problems?
Because in my code for the object I would say add 3 units to a list. Because its a shallow copy it would also add it to the previous object. And you cant use deep copyies as that would duplicate the units.
However when I went to clear the list to reset it I just created a new one like self.list = []
So what it did was clear the copied variable and not the original. Thus making the copy actually made things worse as it made the copy interfere in only some ways. So I just removed the copy method and things started working again.
This is an interesting bug because I could have clearly spent less time on it and still fixed it by clearing the list. But I spent the extra time to actually remove the copy method because I knew that would cause me trouble in the future if I didn't
It should be noted though that the actions must be updated to deal with repeated use for example on my move object. This is however much more simple and better than trying to debug the copying stuff. Either could be done, but the latter is like doing security in php
When going to cast a second spell the grid targeting was hitting every previous unit and position.
I tracked it down to the fact that I made a copy of the executing object.
Now I made a copy to it so that it wouldn't interfere with the objects on the unit. So why did that cause more problems?
Because in my code for the object I would say add 3 units to a list. Because its a shallow copy it would also add it to the previous object. And you cant use deep copyies as that would duplicate the units.
However when I went to clear the list to reset it I just created a new one like self.list = []
So what it did was clear the copied variable and not the original. Thus making the copy actually made things worse as it made the copy interfere in only some ways. So I just removed the copy method and things started working again.
This is an interesting bug because I could have clearly spent less time on it and still fixed it by clearing the list. But I spent the extra time to actually remove the copy method because I knew that would cause me trouble in the future if I didn't
It should be noted though that the actions must be updated to deal with repeated use for example on my move object. This is however much more simple and better than trying to debug the copying stuff. Either could be done, but the latter is like doing security in php
Saturday, January 3, 2009
Updates to voices
I went back and forth for a long time on how to best do conversations.
I tried just a long mp3, but the timing was too variable.
I wanted something that was simple to where a whole bunch of text doesn't have to be put in to start a conversation.
I ended up with adding a name to the scripting event and have the conversation be that in order. So the first one is convo1, second is convo2, etc.
And then to top it off I wrote
To automatically generate some espeak voices. Then you can import the list in audacity. and batch convert them to ogg files and you are good to go.
I tried just a long mp3, but the timing was too variable.
I wanted something that was simple to where a whole bunch of text doesn't have to be put in to start a conversation.
I ended up with adding a name to the scripting event and have the conversation be that in order. So the first one is convo1, second is convo2, etc.
And then to top it off I wrote
unitmap = {fighter1:"en\\en-sc+m3",fighter2:"en\\en-sc+m2",alluvia:"en\\en-sc+f3",oath:"en\\en-wm+f3",balla:"en\\en-n+f3"}
name = "convo"
y = 1
for x in convo1:
if isinstance(x, tuple):
toex = 'C:\\eclipse\\eSpeak\\espeak.exe -w C:\\eclipse\\eSpeak\\'+name+str(y)+'.wav -a 50 -v '+unitmap[x[0]]+' "'+x[1]+'"'
os.system(toex)
print toex
y +=1
To automatically generate some espeak voices. Then you can import the list in audacity. and batch convert them to ogg files and you are good to go.
Thursday, January 1, 2009
Further adventures in sound
It looks like the latest versions of pygame's music module don't work well with py2exe. So if you wanna hear the music for now the executable wont work.
Subscribe to:
Posts (Atom)