Search Results

Search found 23 results on 1 pages for 'neurofluxation'.

Page 1/1 | 1 

  • Which language is best for OpenGL?

    - by Neurofluxation
    Well, this is silly - I've had to post a question about programming on a site other than stackoverflow... Worst thing they have ever done.. I have the following list of languages: C++ C# VB.Net D Delphi Euphoria GLUT Java Power Basic Python REALbasic Visual Basic I would like to know what people think is the: *a) Best (most efficient) language to work with OpenGL* and b) What is the easiest language to work with OpenGL Thanks in advance guys n gals!

    Read the article

  • Smooth animation on a persistently refreshing canvas

    - by Neurofluxation
    Yo everyone! I have been working on an Isometric Tile Game Engine in HTML5/Canvas for a little while now and I have a complete working game. Earlier today I looked back over my code and thought: "hmm, let's try to get this animated smoothly..." And since then, that is all I have tried to do. The problem I would like the character to actually "slide" from tile to tile - but the canvas redrawing doesn't allow this - does anyone have any ideas....? Code and fiddle below... Fiddle with it! http://jsfiddle.net/neuroflux/n7VAu/ <html> <head> <title>tileEngine - Isometric</title> <style type="text/css"> * { margin: 0px; padding: 0px; font-family: arial, helvetica, sans-serif; font-size: 12px; cursor: default; } </style> <script type="text/javascript"> var map = Array( //land [[0,0,0],[0,0,0],[0,0,0],[0,0,0],[0,0,0],[0,0,0],[0,0,0],[0,0,0],[0,0,0],[0,0,0]], [[0,0,0],[0,0,0],[0,0,0],[0,0,0],[0,0,0],[0,0,0],[0,0,0],[0,0,0],[0,0,0],[0,0,0]], [[0,0,0],[0,0,0],[0,0,0],[0,0,0],[0,0,0],[0,0,0],[0,0,0],[0,0,0],[0,0,0],[0,0,0]], [[0,0,0],[0,0,0],[0,0,0],[0,0,0],[0,0,0],[0,0,0],[0,0,0],[0,0,0],[0,0,0],[0,0,0]], [[0,0,0],[0,0,0],[0,0,0],[0,0,0],[0,0,0],[0,0,0],[0,0,0],[0,0,0],[0,0,0],[0,0,0]], [[0,0,0],[0,0,0],[0,0,0],[0,0,0],[0,0,0],[0,0,0],[0,0,0],[0,0,0],[0,0,0],[0,0,0]], [[0,0,0],[0,0,0],[0,0,0],[0,0,0],[0,0,0],[0,0,0],[0,0,0],[0,0,0],[0,0,0],[0,0,0]], [[0,0,0],[0,0,0],[0,0,0],[0,0,0],[0,0,0],[0,0,0],[0,0,0],[0,0,0],[0,0,0],[0,0,0]], [[0,0,0],[0,0,0],[0,0,0],[0,0,0],[0,0,0],[0,0,0],[0,0,0],[0,0,0],[0,0,0],[0,0,0]], [[0,0,0],[0,0,0],[0,0,0],[0,0,0],[0,0,0],[0,0,0],[0,0,0],[0,0,0],[0,0,0],[0,0,0]] ); var tileDict = Array("http://www.wikiword.co.uk/release-candidate/canvas/tileEngine/land.png"); var charDict = Array("http://www.wikiword.co.uk/release-candidate/canvas/tileEngine/mario.png"); var objectDict = Array("http://www.wikiword.co.uk/release-candidate/canvas/tileEngine/rock.png"); //last is one more var objectImg = new Array(); var charImg = new Array(); var tileImg = new Array(); var loaded = 0; var loadTimer; var ymouse; var xmouse; var eventUpdate = 0; var playerX = 0; var playerY = 0; function loadImg(){ //preload images and calculate the total loading time for(var i=0;i<tileDict.length;i++){ tileImg[i] = new Image(); tileImg[i].src = tileDict[i]; tileImg[i].onload = function(){ loaded++; } } i = 0; for(var i=0;i<charDict.length;i++){ charImg[i] = new Image(); charImg[i].src = charDict[i]; charImg[i].onload = function(){ loaded++; } } i = 0; for(var i=0;i<objectDict.length;i++){ objectImg[i] = new Image(); objectImg[i].src = objectDict[i]; objectImg[i].onload = function(){ loaded++; } } } function checkKeycode(event) { //key pressed var keycode; if(event == null) { keyCode = window.event.keyCode; } else { keyCode = event.keyCode; } switch(keyCode) { case 38: //left if(!map[playerX-1][playerY][1] > 0){ playerX--; } break; case 40: //right if(!map[playerX+1][playerY][1] > 0){ playerX++; } break; case 39: //up if(!map[playerX][playerY-1][1] > 0){ playerY--; } break; case 37: //down if(!map[playerX][playerY+1][1] > 0){ playerY++; } break; default: break; } } function loadAll(){ //load the game if(loaded == tileDict.length + charDict.length + objectDict.length){ clearInterval(loadTimer); loadTimer = setInterval(gameUpdate,100); } } function drawMap(){ //draw the map (in intervals) var tileH = 25; var tileW = 50; mapX = 80; mapY = 10; for(i=0;i<map.length;i++){ for(j=0;j<map[i].length;j++){ var drawTile= map[i][j][0]; var xpos = (i-j)*tileH + mapX*4.5; var ypos = (i+j)*tileH/2+ mapY*3.0; ctx.drawImage(tileImg[drawTile],xpos,ypos); if(i == playerX && j == playerY){ you = ctx.drawImage(charImg[0],xpos,ypos-(charImg[0].height/2)); } } } } function init(){ //initialise the main functions and even handlers ctx = document.getElementById('main').getContext('2d'); loadImg(); loadTimer = setInterval(loadAll,10); document.onkeydown = checkKeycode; } function gameUpdate() { //update the game, clear canvas etc ctx.clearRect(0,0,904,460); ctx.fillStyle = "rgba(255, 255, 255, 1.0)"; //assign color drawMap(); } </script> </head> <body align="center" style="text-align: center;" onload="init()"> <canvas id="main" width="904" height="465"> <h1 style="color: white; font-size: 24px;">I'll be damned, there be no HTML5 &amp; canvas support on this 'ere electronic machine!<sub>This game, jus' plain ol' won't work!</sub></h1> </canvas> </body> </html>

    Read the article

  • jQuery and Colorbox "Is Not A Function"

    - by Neurofluxation
    Hey you lot, I've been working on integrating Colorbox (a lightbox alternative) into a site. Ok, so my head file is: <head> <script language="javascript" type="text/javascript" src="js/jquery.js"></script></script>- <link type="text/css" media="screen" rel="stylesheet" href="../colorbox/colorbox.css" /> <script type="text/javascript" src="../colorbox/jquery.colorbox.js"></script> <script type="text/javascript"> function saveToBook() { $.fn.colorbox({inline:false, href:'../index.html'}); }; </script> </head> My Link is as follows: <a href="#save-to-book" onclick="javascript:parent.saveToBook();return false;" class="recipe-links">Save to Cookbook</a> The only output I recieve (from FireBug) is: $.fn.colorbox is not a function

    Read the article

  • Colorbox (Lightbox clone) and moving the Close button

    - by Neurofluxation
    I have integrated my Colorbox, the set up is as follows: MAIN PAGE:   IFRAME     COLORBOX LINK But I have it so, you click the COLORBOX LINK and it opens the Colorbox in the parent page (MAIN PAGE). Now, the problem I have is that the Close button is stuck inside this pageframe. Is there anyway I can have a Close Button outside of the Colorbox and to have the Colorbox Close Button open seperately? sigh, deary me...

    Read the article

  • Audio looping in Objective-C/iPhone

    - by Neurofluxation
    So, I'm finishing up an iPhone App. I have the following code in place to play the file: while(![player isPlaying]) { totalSoundDuration = soundDuration + 0.5; //Gives a half second break between sounds sleep(totalSoundDuration); //Don't play next sound until the previous sound has finished [player play]; //Play sound NSLog(@" \n Sound Finished Playing \n"); //Output to console } For some reason, the sound plays once then the code loops and it outputs the following: Sound Finished Playing Sound Finished Playing Sound Finished Playing etc... This just repeats forever, I don't suppose any of you lovely people can fathom what could be the boggle? Cheers!

    Read the article

  • Cannot hide a UIButton - Please help!

    - by Neurofluxation
    Hey again, I have the following code: visitSite.hidden = YES; For some reason, when I click a UIButton and call this piece of code, the visitSite button does not hide. The code is within this block: -(IBAction)welcomeButtonPressed:(id)sender { [UIButton beginAnimations:@"welcomeAnimation" context:NULL]; [UIButton setAnimationDuration:1.5]; [UIButton SetAnimationDidStopSelector:@selector(nowHideThisSiteButton:finished:context:)]; [UIButton setAnimationTransition:UIViewAnimationTransitionCurlUp forView:self.view cache:YES]; ((UIView *)sender).hidden = YES; [UIButton commitAnimations]; } and the stop selector below: -(void)nowHideThisSiteButton:(NSString *)animationID finished:(BOOL *)finished context:(void *)context { visitSite.hidden = YES; } I've also tried [visitSite setHidden:YES]; and that fails as well. ALSO I've noticed that the setAnimationDidStopSelector does not get called at all. Also, visitSite (when NSLogged) equals: <UIButton: 0x1290f0; frame = (0 0; 320 460); opaque = NO; autoresize = RM+BM; layer = <CALayer: 0x1290f0>> visitSite.hidden (when NSLogged) equals: NULL Any more ideas? :(

    Read the article

  • Facebook and retrieving a users "wall"

    - by Neurofluxation
    I have been given the dubious task of working with the Facebook API. I have managed to get quite far with all the little bits and pieces (bringing in "fan pages" and "friend lists"). However, I cannot seem to import a users wall into my App using SOLELY Javascript. I have this code to bring in the users friends: var widget_div = document.getElementById("profile_pics"); FB.ensureInit(function () { FB.Facebook.get_sessionState().waitUntilReady(function() { FB.Facebook.apiClient.friends_get(null, function(result) { var markup = ""; var num_friends = result ? Math.min(100, result.length) : 0; if (num_friends > 0) { for (var i=0; i<num_friends; i++) { markup += "<div align='left' class='commented' style='background-color: #fffbcd; border: 1px solid #9d9b80; padding: 0px 10px 0px 0px; margin-bottom: 5px; width: 75%; height: 50px; font-size: 16px;'><fb:profile-pic size='square' uid='"+result[i]+"' facebook-logo='true'></fb:profile-pic><div style='float: right; padding-top: 15px;'><fb:name uid='"+result[i]+"'></fb:name></div></div>"; } } widget_div.innerHTML = markup; FB.XFBML.Host.parseDomElement(widget_div); }); }); }); /*******YOUR FRIENDS******/ FB.XFBML.Host.parseDomTree(); Any idea whether I can change this to retrieve the Walls? Thanks in advance you great people! ^_^

    Read the article

  • Cannot hide a UIButton

    - by Neurofluxation
    Hey again, I have the following code: visitSite.hidden = YES; For some reason, when I click a UIButton and call this piece of code, the visitSite button does not hide. The code is within this block: -(IBAction)welcomeButtonPressed:(id)sender { [UIButton beginAnimations:@"welcomeAnimation" context:NULL]; [UIButton setAnimationDuration:1.5]; [UIButton setAnimationTransition:UIViewAnimationTransitionCurlUp forView:self.view cache:YES]; ((UIView *)sender).hidden = YES; [UIButton commitAnimations]; visitWebsite.hidden = YES; //THIS DOESN'T WORK! } Help!!

    Read the article

  • Random directions, with no repeat.. (Bad Description)

    - by Neurofluxation
    Hey there, So I'm knocking together a random pattern generation thing. My code so far: int permutes = 100; int y = 31; int x = 63; while (permutes > 0) { int rndTurn = random(1, 4); if (rndTurn == 1) { y = y - 1; } //go up if (rndTurn == 2) { y = y + 1; } //go down if (rndTurn == 3) { x = x - 1; } //go right if (rndTurn == 4) { x = x + 1; } //go left setP(x, y, 1); delay(250); } My question is, how would I go about getting the code to not go back on itself? e.g. The code says "Go Left" but the next loop through it says "Go Right", how can I stop this? NOTE: setP turns a specific pixel on. Cheers peoples!

    Read the article

  • last-child CSS issues

    - by Neurofluxation
    Hey you guys (and girls), I have implemented the following CSS: #tab-navigation ul li:last-child { background-image: url(../images/tabs-end.gif); background-repeat: no-repeat; color: #fff; display: block; border: 1px solid red; background-position: right; } However, for some reason this is not working at all in IE (surprise!) - I read (after some research) that IE requires a DOCTYPE, but I already have <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> defined. Any ideas peeps?

    Read the article

  • jQuery Lightbox Clone is not initialising properly

    - by Neurofluxation
    Hey, I have the following function on an onClick call: function addComment() { jQuery.noConflict() jQuery('head').append('<link rel="stylesheet" media="screen" type="text/css" href="colorbox/colorbox-images.css" />'); //this doesn't add correctly. jQuery.fn.colorbox({inline:false, href:'boxes/add-comment.html'}); return false; }; However, the STYLESHEET append line doesn't seem to initialise properly. Screenshots below:

    Read the article

  • jQuery and IE not playing nice

    - by Neurofluxation
    Hello, I have this section of code: function createDownload() { var category, format, specification, download; $('#submitform').click(function() { category = $('#cate').val(); format = $('#form').val(); specification = $('#spec').val(); if (category == "NULL" || format == "NULL" || specification == "NULL") { alert("Please select all options."); return false; } else { download = "pdfs/"+specification+format+category+".pdf"; window.open(download); } }); } Now... In Internet Explorer it says there is an "Error on the page" - Message: 'return' statement outside of function and I have to click the button again. In Firefox, Chrome and Safari - I have to click the button twice to get the PDF to appear... (and no errors)... Now why could that be?! As per request - My Form declaration: <form method="post" action="javascript: return false;" onSubmit="createDownload();">

    Read the article

  • UIButton Transition Curl Up problem

    - by Neurofluxation
    Hello again SO peeps! Basically, I am trying to UIViewAnimationTransitionCurlUp a UIButton. The animation works perfectly but the button stays there. i.e. The button curls up, but there is another instance of the button still underneath. My code as follows: [UIButton beginAnimations:nil context:nil]; [UIButton setAnimationDuration:0.5]; [UIButton setAnimationBeginsFromCurrentState:YES]; [UIButton setAnimationTransition:UIViewAnimationTransitionCurlUp forView:self.view cache:YES]; [UIButton commitAnimations];

    Read the article

  • jQuery Appending to Parent

    - by Neurofluxation
    I have an iFrame on the page, how can I append an element to the parent page? Current Code: $content = $div("body").append( $close = $div("Close") ); Something like this would be nice: $content = parent.$div("body").append( $close = $div("Close") ); Any ideas StackOverflow wizards?

    Read the article

  • Audio/Voice Visualization

    - by Neurofluxation
    Hey you Objective-C bods. Does anyone know how I would go about changing (transforming) an image based on the input from the Microphone on the iPhone? i.e. When a user speaks into the Mic, the image will pulse or skew. Thanking you!!

    Read the article

  • FlexScroll and IFRAMES

    - by Neurofluxation
    Hey, I was wondering whether there is a way to use FlexScroll (JavaScript custom image based scrollbars) with IFRAMES instead of the DIVS. Yes, I know scrollable DIVS are better than IFRAMES. This is my clients requirement though. Cheers.

    Read the article

  • How to read from CSS files with jQuery

    - by Neurofluxation
    Ok, I have a HTML page with jQuery included. I have a CSS file with a good load of lines in, I would like to read all styles for a given element from the external CSS file... Not the inline styles... I have the following code (which looks like it should work...): var styleProperties= {}; var getCssProperties = ['width', 'margin', 'height']; for (c=0;i<=returnStyleProps.length;c++) { styleProperties[returnStyleProps[c]] = $('div#container').css(returnStyleProps[c]); alert(styleProperties); } alert(styleProperties); But this only seems to alert: "[Object Object]" Any ideas you clever people?

    Read the article

  • jQuery Custom Lightbox issue

    - by Neurofluxation
    I have been writing my own Lightbox script (to learn more about jQuery). My code for the captions are as follows (the problem is that the captions are the same on every image): close.click(function(c) { c.preventDefault(); if (hideScrollbars == "1") { $('body').css({'overflow' : 'auto'}); } overlay.add(container).fadeOut('normal'); $('#caption').animate({ opacity: 0.0 }, "5000", function() { $('div').remove('#caption'); }); }); $(prev.add(next)).click(function(c) { c.preventDefault(); $('div').remove('#caption') areThereAlts = ""; var current = parseInt(links.filter('.selected').attr('lb-position'),10); var to = $(this).is('.prev') ? links.eq(current - 1) : links.eq(current + 1); if(!to.size()) { to = $(this).is('.prev') ? links.eq(links.size() - 1) : links.eq(0); } if(to.size()) { to.click(); } });

    Read the article

  • Multiple stylesheets for a Lightbox clone.

    - by Neurofluxation
    Hey! I have a Lightbox clone (colorbox), which works fine and has no real issues. What I would like is an extra arguement that would say: [pseudocode] if (linksRel == "lightbox1") { add stylesheet1 to this lightbox } else { add stylesheet2 to this lightbox } [/pseudocode] Currently, I have a page with a "colorbox.css" file attached and the" jquery.colorbox.js" file as well - But I want the JS file to import the required CSS dependant on what link was clicked... Urgh, does that make sense? Does anyone have any ideas? I'm stumped!

    Read the article

1