1. Post #801
    Gold Member
    ThePuska's Avatar
    October 2005
    3,418 Posts
    I made a program that calculates the longitude and latitude of the point on Earth where the sun is at the zenith at a specific date/time. Figuring out the math was harder than it should've been ಠ_ಠ




    Plotting a day/night map of the Earth is trivial. I just need a projection of Earth, calculate the lon-lat of each pixel and compare the angles to the angle of the sun - if it's greater than 90 degrees, it's night. But since it's cooler than just printing numbers, I'll do that next. I just need to find a good free map.

    I'm probably making it into a Rainmeter skin because it's the kind of useless info you might want to clutter your desktop.
    Reply With Quote Edit / Delete Windows 7 Finland Show Events Programming King Programming King x 17Winner Winner x 6 (list)

  2. Post #802
    asdfghjkl.
    Erasus's Avatar
    May 2011
    2,117 Posts
    That looks awesome, I meant to rate winner btw.. haha
    Reply With Quote Edit / Delete Windows 7 United Kingdom Show Events

  3. Post #803
    PLEASE DON'T EAT ME!
    Doritos_Man's Avatar
    June 2009
    2,901 Posts
    That looks awesome, I meant to rate winner btw.. haha
    You do know you can change ratings if you reload the page right?
    Reply With Quote Edit / Delete Windows 7 United States Show Events Agree Agree x 4 (list)

  4. Post #804
    asdfghjkl.
    Erasus's Avatar
    May 2011
    2,117 Posts
    Yes
    Reply With Quote Edit / Delete Windows 7 United Kingdom Show Events Informative Informative x 2Programming King Programming King x 1 (list)

  5. Post #805

    August 2007
    14 Posts
    You can cheat easily by right-clicking.
    Fixed.
    Also,I overlooked that sometimes when swapping the quadrants of the cells,I could put them in the same place-this shouldn't be the case anymore.

    Edit:Fuck.did not actually fix the cheating-can't seem to block right-click globally :(
    Reply With Quote Edit / Delete Linux Lithuania Show Events Friendly Friendly x 1 (list)

  6. Post #806
    ArgvCompany's Avatar
    June 2012
    549 Posts
    i don't recall saying it's difficult, i just said I didn't understand some of the terms
    Could you give me an example of such a term?
    Reply With Quote Edit / Delete Windows 7 Germany Show Events

  7. Post #807
    Gold Member
    vexx21322's Avatar
    December 2008
    10,581 Posts
    I'm not the best at javascript, but I wanted to see how far I could get with the google image search api since I've never worked with GET requests.
    Code:
    <script type='text/javascript'>
    	document.head.innerHTML = '<style type="text/css">img{width: 150;}</style>';
    	var site = '';
    	var xmlhttp = {};
    	var html = '';
    
    	function setHTML(num, max)
    	{
    		console.log('setHTML called with page ' + num + ', out of ' + max);
    		if(num == max)
    		{
    			document.getElementById('container').innerHTML += html;
    		}
    	}
    
    
    	function gsearch()
    	{
    		document.getElementById('container').innerHTML = '';
    		var numpages = document.getElementById('num').value;
    		var query = document.getElementById('searchbox').value;
    		var p = 0;
    		html = '';
    
    		for(var page = 0; page < numpages; page++)
    		{
    			site = 'http://ajax.googleapis.com/ajax/services/search/images?q=' + encodeURI(query) + '&v=1.0&safe=off&rsz=8&start=' + p;
    			console.log(site);
    
    			xmlhttp = new XMLHttpRequest();
    			xmlhttp.pagenumber = page + 1;
    			xmlhttp.onreadystatechange = function()
    			{
    				if(this.readyState == 4 && this.status == 200)
    				{	
    					try
    					{
    						var results = JSON.parse(this.responseText).responseData.results;
    					}
    					catch(err)
    					{
    						console.log(err);
    					}
    
    					var count = 0;
    					for(var i = 0; i < results.length; i++)
    					{
    						var url = results[i].tbUrl;
    
    						html += '<img src="' + url + '"/>';
    						url = null;
    
    						count++;
    					}
    
    					count = null;
    
    					setHTML(this.pagenumber, numpages);
    				}
    				else if(this.status != 200)
    				{
    					console.log("readystate = " + this.readyState + ", status = " + this.status);
    				}
    			}
    			
    			xmlhttp.open("GET", site);
    			//xmlhttp.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
    			xmlhttp.send();
    
    			p += 8;
    		}
    	}
    </script>
    
    <input type='text' id='searchbox' onkeyup="if(event.keyCode == 13){gsearch();}"></input>
    <input type='number' id='num' value='1' min='1' max='8'></input>
    <input type='button' id='btn' onclick="gsearch();" value="Search"></input>
    <div id='container'>-images go here-</div>
    This feels pretty dirty to me. I couldn't think of a better way to transfer the page number to the setHTML method.I know there's a ordering bug because one page could load faster than the others (as shown in the console if you run this).
    I'm probably goes about this entirely the wrong way, but I just wanted to be done with it.

    Could I get some feedback on some mistakes or other things that I could have done better?

    Also, This isn't in the web subforum because this isn't for any sites.
    Reply With Quote Edit / Delete Windows 7 United States Show Events

  8. Post #808
    asdfghjkl.
    Erasus's Avatar
    May 2011
    2,117 Posts
    Could you give me an example of such a term?
    love.graphics.setColor(255,255,255,255)
    for i,v in ipairs(hero.shots) do
    love.graphics.rectangle("fill", v.x, v.y, 2, 5)
    end
    just been out and bought "Mike McGrath: Java in easy steps" looked the most user friendly there, so I chose it.
    Reply With Quote Edit / Delete Windows 7 United Kingdom Show Events

  9. Post #809

    August 2007
    14 Posts
    Code:
    for i,v in ipairs(hero.shots) do
    As i understand it,ipairs returns a list of pairs-i.e something like [(0,2),(1,14),...] .

    when saying for i,v in pairs , i and v will take the value of the left and right attribute of the pair respectively,for each pair in the list.
    This is a specialised for-each loop.

    Code:
    love.graphics.rectangle("fill", v.x, v.y, 2, 5)
    This means that you're accessing an attribute of an object.
    In short,objects are a collections of values (usually called fields,when wrapped in an object) and functions (usually called methods etc.), so object.val evaluates as val , and object.fun(x,y) calls the function fun with parameters x and y.
    Reply With Quote Edit / Delete Linux Lithuania Show Events Disagree Disagree x 2Friendly Friendly x 1 (list)

  10. Post #810
    asdfghjkl.
    Erasus's Avatar
    May 2011
    2,117 Posts
    Code:
    for i,v in ipairs(hero.shots) do
    As i understand it,ipairs returns a list of pairs-i.e something like [(0,2),(1,14),...] .

    when saying for i,v in pairs , i and v will take the value of the left and right attribute of the pair respectively,for each pair in the list.
    This is a specialised for-each loop.

    Code:
    love.graphics.rectangle("fill", v.x, v.y, 2, 5)
    This means that you're accessing an attribute of an object.
    In short,objects are a collections of values (usually called fields,when wrapped in an object) and functions (usually called methods etc.), so object.val evaluates as val , and object.fun(x,y) calls the function fun with parameters x and y.
    Ahh! Makes some sense, thanks man :)

    Edited:

    Progress.


    Reply With Quote Edit / Delete Windows 7 United Kingdom Show Events Winner Winner x 2Programming King Programming King x 2 (list)

  11. Post #811
    MitchvW's Avatar
    September 2011
    1,489 Posts
    Ahh! Makes some sense, thanks man :)

    Edited:

    Progress.


    Dude, you have to share the sourcecode on that.
    Reply With Quote Edit / Delete Windows 7 Netherlands Show Events Funny Funny x 17Agree Agree x 4Dumb Dumb x 1 (list)

  12. Post #812
    asdfghjkl.
    Erasus's Avatar
    May 2011
    2,117 Posts
    no way man not happening
    Reply With Quote Edit / Delete Windows 7 United Kingdom Show Events Agree Agree x 7Funny Funny x 2Friendly Friendly x 1 (list)

  13. Post #813
    Top secret
    Reply With Quote Edit / Delete Windows 7 Netherlands Show Events Agree Agree x 4 (list)

  14. Post #814
    asdfghjkl.
    Erasus's Avatar
    May 2011
    2,117 Posts
    So, this java book is telling me to do some constants and stuff.
    Code:
    class Constants
    { 
    public static void main ( String[] args ) {       
    final int TOUCHDOWN = 6 ;
    final int CONVERSION = 1 ;
    final int FIELDGOAL = 3 ;
    int td , pat , fg , total ;
    td = 4 * TOUCHDOWN ; 
    pat = 3 * CONVERSION ;
    fg = 2 * FIELDGOAL ; 
    total = ( td + pat + fg ) ; 
    System.out.println( "Score: " + total ) ; }
    }
    There we go!
    Now I'm going to try my own version off the top of my head..
    (based off a 12 year olds Facepunch account)
    Code:
     class Constants
    { 
    public static void main ( String[] args ) {       
    final int FUNNIES = 1 ; 
    final int DUMBS = 1 ; 
    final int WINNERS = 1 ; 
    int fn , pat , wn , total ; 
    fn = 2 * FUNNIES ;
    pat = 300 * DUMBS ;
    wn = 1 * WINNERS ;
    total = ( fn + pat + wn ) ; 
    System.out.println( "Score: " + total ) ; 
    }
     
     }
    I got it all but I forgot to initialize the total. I think that's ok?

    Did another one, tallied up some random snooker scores:
    Code:
    class NewConstants
    {
    public static void main ( String[] args) {
    final int RED = 1 ;
    final int YELLOW = 2; 
    final int GREEN = 3 ;
    final int BROWN = 4;
    final int BLUE = 5;
    final int PINK = 6;
    final int BLACK = 7;
    int rd , yl , gr , br , bl , pi , ba , total ;
    rd = 15 * RED ;
    yl = 2 * YELLOW ;
    gr = 1 * GREEN ; 
    br = 2 * BROWN ; 
    bl = 1 * BLUE ;
    pi = 2 * PINK ;
    ba = 4 * BLACK ;
    total = ( rd + yl + gr + br + bl + pi + ba ) ;
    System.out.println( "Score: " + total ) ;
     }
     }
    Turns out his score was 75. I'm doing a few little things on the side just to make sure I fully understand what I'm doing. I do, but I also need to fucking learn to put ; on the end of the majority of stuff. I also feel like I'm going to annoy you guys by keeping posting my updates.. Sorry.
    Reply With Quote Edit / Delete Windows 7 United Kingdom Show Events Programming King Programming King x 3 (list)

  15. Post #815
    Follow me on github!
    benjojo's Avatar
    January 2009
    2,619 Posts
    Reply With Quote Edit / Delete Windows 8 United Kingdom Show Events Artistic Artistic x 21Winner Winner x 2 (list)

  16. Post #816
    Gold Member
    ShaunOfTheLive's Avatar
    November 2007
    9,831 Posts
    Dude, you have to share the sourcecode on that.
    I'll give you the source, but some of this shit is secret so I obfuscated the important stuff.

    Code:
    import java.net.URLDecoder;
     
    class Main {
        public static void main(String[] args) {
            System.out.println(java.net.URLDecoder.decode("%48%65%6C%6C%6F%20%57%6F%72%6C%64%21"));
        }
    }
    Reply With Quote Edit / Delete Windows 8 Canada Show Events Funny Funny x 18 (list)

  17. Post #817
    www.bff-hab.de
    Dennab
    February 2009
    7,832 Posts
    I might be involved in a kickass project soon:

    In glider sports, pretty much every single planes is equipped with a collision warning system, called FLARM (Flight Alarm):

    This little device compares the flight trajectories of all planes in range and sounds a loud and flashy warning when you're on collision course with other planes, as well generally indicating the location of other planes.

    Now you might already see where this is going: The Flarm has a connector on it's back, allowing the readout of not only your own data, but the data of all devices in range.

    We want to use this fact to make the airport controller job a lot easier for us, as you have to write down the starting and landing time of each plane.

    So basically we tap into the device and display every plane on a 2d (or maybe even 3d) map, and try to automatically determine when a plane takes off or is in landing approach, and then lands.
    We planned to use a raspberry pi as a portable low power solution, as it also has a hardware serial port that can be used almost directly with the FLARM.
    Reply With Quote Edit / Delete Windows 7 Germany Show Events Winner Winner x 24Informative Informative x 1 (list)

  18. Post #818
    Gold Member
    Trumple's Avatar
    September 2009
    6,225 Posts
    That is so cool. So how many devices do you have? Or are you working with the airport controller to provide this system?
    Reply With Quote Edit / Delete Windows 7 United Kingdom Show Events Agree Agree x 1 (list)

  19. Post #819
    asdfghjkl.
    Erasus's Avatar
    May 2011
    2,117 Posts
    So, in my book (I haven't got very far into it yet, but I've done constants, variables and other general things), it does describe a lot. but a friend of mine made this "number guessing game" using loops and stuff where you need to guess a number between 0 - 100 and you have 10 lives etc etc, do you think my book will teach me how to even use that kind of stuff? It's too big to just skim through and I'm not sure if it's in the index.
    Reply With Quote Edit / Delete Windows 7 United Kingdom Show Events

  20. Post #820
    www.bff-hab.de
    Dennab
    February 2009
    7,832 Posts
    That is so cool. So how many devices do you have? Or are you working with the airport controller to provide this system?
    Every plane in our club has one (8 planes), and we also have a spare one.
    It's not really a big airport, it's just us gliders here, so it usually is a very relaxed job, and it's executed by members of our club. You just have to be 21 years old and have some experience to do it.
    Reply With Quote Edit / Delete Windows 7 Germany Show Events

  21. Post #821
    Gold Member
    thomasfn's Avatar
    July 2008
    2,960 Posts
    Implemented script parsing and execution, as well as most other types of file the riven archives contain. Also implemented the base engine.



    Hotspots are highlighted in red (green for hovered) for debug purposes.
    Reply With Quote Edit / Delete Windows 7 United Kingdom Show Events Winner Winner x 12 (list)

  22. Post #822
    Gold Member
    robmaister12's Avatar
    January 2008
    4,969 Posts
    Implemented script parsing and execution, as well as most other types of file the riven archives contain. Also implemented the base engine.



    Hotspots are highlighted in red (green for hovered) for debug purposes.
    Wow, that's awesome! I'm gonna go look through my old games and find one to reverse engineer, maybe learn a new language at the same time...
    Reply With Quote Edit / Delete Windows 7 United States Show Events

  23. Post #823
    Gold Member
    thomasfn's Avatar
    July 2008
    2,960 Posts
    I kinda cheated because I got this, it was still alot of hard work to implement though because the formats are all so old that you have to write decoders and stuff for them yourself.

    Edited:

    I mean seriously, someone was having an incredibly bad day when they invented this image format: http://insidethelink.ortiche.net/wik..._Decompression
    Reply With Quote Edit / Delete Windows 7 United Kingdom Show Events Funny Funny x 8 (list)

  24. Post #824
    Gold Member
    Trumple's Avatar
    September 2009
    6,225 Posts
    Every plane in our club has one (8 planes), and we also have a spare one.
    It's not really a big airport, it's just us gliders here, so it usually is a very relaxed job, and it's executed by members of our club. You just have to be 21 years old and have some experience to do it.
    Awesome
    You could take it a step further and make some sort of live map online
    Reply With Quote Edit / Delete Windows 7 United Kingdom Show Events

  25. Post #825
    Gold Member
    robmaister12's Avatar
    January 2008
    4,969 Posts
    I kinda cheated because I got this, it was still alot of hard work to implement though because the formats are all so old that you have to write decoders and stuff for them yourself.

    Edited:

    I mean seriously, someone was having an incredibly bad day when they invented this image format: http://insidethelink.ortiche.net/wik..._Decompression
    Yeah, I want to try something that hasn't been done before. Out of the many games I chose, these are the ones I can't find any sort of information for:

    - Jazz Jackrabbit (the second one apparently has been reverse engineered)
    - Hellbender
    - Lego Alpha Team
    - A Bug's Life Action Game
    - Toy Story

    Leaning towards Lego Alpha Team right now...
    Reply With Quote Edit / Delete Windows 7 United States Show Events

  26. Post #826
    Tamschi's Avatar
    December 2009
    3,258 Posts
    So, in my book (I haven't got very far into it yet, but I've done constants, variables and other general things), it does describe a lot. but a friend of mine made this "number guessing game" using loops and stuff where you need to guess a number between 0 - 100 and you have 10 lives etc etc, do you think my book will teach me how to even use that kind of stuff? It's too big to just skim through and I'm not sure if it's in the index.
    You should be able to do that by the end of chapter 3 and you need almost all of the previous chapters.
    It's usually best to read this kind of book more or less in order if you have no programming experience.

    It seems you'll have to look up a few things somewhere else but otherwise it should teach you most of the basics.
    Reply With Quote Edit / Delete Windows 7 Germany Show Events

  27. Post #827
    itty-bitty pretty kitty
    Dennab
    September 2008
    9,837 Posts
    Does anyone have any resources for reverse engineering formats?
    Reply With Quote Edit / Delete Windows 7 United States Show Events

  28. Post #828
    Gold Member
    thomasfn's Avatar
    July 2008
    2,960 Posts
    Does anyone have any resources for reverse engineering formats?
    I guess you'd open up the file in a hex editor or something, look at the bytes for any obvious patterns (strings of text, shorts or ints that might represent version IDs or other useful info), then change things and see what happens in the game as a result. By trial and error you can figure out what the format is. Also remember old games (including Riven) often use big endian instead of the more widely use little endian, most hex editors should have a way to change the endianness when viewing data types.
    Reply With Quote Edit / Delete Windows 7 United Kingdom Show Events Agree Agree x 3Informative Informative x 1 (list)

  29. Post #829
    Gold Member
    robmaister12's Avatar
    January 2008
    4,969 Posts
    Yeah, it's also good to study common, well documented formats that accomplish the same task. Usually they'll all follow some patterns. e.g. a container format will always contain a file name and some method of determining file size. Several different implementations I've seen are:

    1) offset/size/names are all defined together at the top of the file, with all the data following it packed after.
    2) size/name are all defined together at the top of the file with the data below that. Usually they'll also include the header size or the offset to the data in the file header. If you wanted to extract a single file, you'd have to add up all the sizes leading up to that file and read from the offset you calculate.
    3) name/size/data are all defined together, one after another. This way you don't have to calculate an offset since the data is always right after the size you read.

    And if you can't see any clear pattern immediately, there's probably some compression going on and you should try to run the file through some common compression algorithms like zip, 7z, rar, gzip, bzip2, etc.
    Reply With Quote Edit / Delete Windows 7 United States Show Events Agree Agree x 2Informative Informative x 1 (list)

  30. Post #830
    Gold Member
    Downsider's Avatar
    July 2007
    1,999 Posts
    I posted TWO (see: two) new videos on my YouTube today.

    You guys HAVE to listen to the music, too.

    A demo of my MMO engine..
    And a demo of a modified version of some guy's remote desktop that improves latency/performance and input.
    And another demo of my MMO engine. This one's from a few weeks ago I think.
    Reply With Quote Edit / Delete Windows 7 United States Show Events Winner Winner x 12Programming King Programming King x 5 (list)

  31. Post #831
    open.gl
    Overv's Avatar
    February 2007
    7,431 Posts
    I kinda cheated because I got this, it was still alot of hard work to implement though because the formats are all so old that you have to write decoders and stuff for them yourself.

    Edited:

    I mean seriously, someone was having an incredibly bad day when they invented this image format: http://insidethelink.ortiche.net/wik..._Decompression
    Looks like someone took RLE and started tripping.

    Also, think of the guy who had to invent the encoder.
    Reply With Quote Edit / Delete Windows 7 Netherlands Show Events

  32. Post #832

    January 2012
    416 Posts
    I thought that looked like graal aha.
    Reply With Quote Edit / Delete Windows 7 Canada Show Events

  33. Post #833
    Hack's Avatar
    March 2011
    261 Posts
    Right now I am working on Paradox, a 3D Game for PC, Mac, Xbox 360, and Windows Phone. I hope to finish it before Summer is over and I go off to Grade 12.

    Update Log 003:

    You can view all my progress on http://www.bytecode.ca

    You can also see all my Windows Phone apps here: http://bytecode.ca/?page_id=55


    Image of the battleground:


    Note: The models are not final. Different models will be used. Only Battlestar Galatica Models will be used for the Pre-Alpha Release coming on Wednesday or Thursday.
    Reply With Quote Edit / Delete Windows 7 Canada Show Events Artistic Artistic x 3Winner Winner x 2 (list)

  34. Post #834
    Gold Member
    robmaister12's Avatar
    January 2008
    4,969 Posts
    So I spent a greater part of the afternoon learning Python and finding my way around Lego Alpha Team's container format. I haven't written the actual code to dump the file contents yet, but I have been able to walk through the file manually with a hex editor. I'm just stuck on the last 8 bytes of a file table entry.

    As ints, the values are extremely high, so I'm thinking it might be a checksum, but grabbing the checksum of the file contents in a bunch of common formats doesn't match up with any part of those 8 bytes, in both big and little endian. So now I'm thinking that it might be some sort of file permissions setting, but that doesn't seem necessary in a container format...

    Edited:

    I'm going to see if any of the game dlls have exported symbols, method names should hold some clues...
    Reply With Quote Edit / Delete Windows 7 United States Show Events

  35. Post #835
    my portfolio
    Dennab
    April 2012
    1,392 Posts


    Is this Lua?
    Reply With Quote Edit / Delete Windows 7 United Kingdom Show Events Disagree Disagree x 2Dumb Dumb x 1 (list)

  36. Post #836
    BMCHa's Avatar
    August 2007
    852 Posts
    Doesn't look like Lua. Might be GameMonkey though.
    http://www.gmscript.com/
    Reply With Quote Edit / Delete Windows 7 United States Show Events

  37. Post #837
    Gold Member
    ZenX2's Avatar
    February 2009
    4,969 Posts
    No, that .dialog thing would be invalid

    Also, figured out my zoom problem, it turns out it was shittingly simple.

    translate(w / 2, h / 2)
    
    scale(ZOOM)
    
    translate(-CameraPos.x, -CameraPos.y)

    I spent two days on this

    Also, some basic terrain generation:



    That's drawn from a grid of canvases, because drawing individual hexes is too slow, and drawing one huge canvas isn't kosher with my graphics card

    Edited:

    "If you roll 7 and place it on me I will punch you in the face."

    Average evening of Settlers for me.

    I'd love to play that. I have the old Settlers of Catan for XP somewhere around here.
    I started on this after playing for the first time in a while. At one point in the game I told my brother the remains of his citizens would be indistinguishable from the feces of my soldiers. Too bad you can't destroy cities
    Reply With Quote Edit / Delete Windows 7 United States Show Events Artistic Artistic x 4Programming King Programming King x 1 (list)

  38. Post #838

    January 2012
    133 Posts
    Code:
    for i,v in ipairs(hero.shots) do
    As i understand it,ipairs returns a list of pairs-i.e something like [(0,2),(1,14),...] .

    when saying for i,v in pairs , i and v will take the value of the left and right attribute of the pair respectively,for each pair in the list.
    This is a specialised for-each loop.

    Code:
    love.graphics.rectangle("fill", v.x, v.y, 2, 5)
    This means that you're accessing an attribute of an object.
    In short,objects are a collections of values (usually called fields,when wrapped in an object) and functions (usually called methods etc.), so object.val evaluates as val , and object.fun(x,y) calls the function fun with parameters x and y.
    I may be a bit late on this, but no.

    So, for example we got a table (array):
    awesomeTable = {10, 20, 30, 40, 50}
    
    Then we iterate all the elements with a default loop:
    for iterator = 1, #awesomeTable do
        local element = awesomeTable[iterator]
        print("In table 'awesomeTable', at index ".. iterator .. " this is what inside: " .. element)
    end
    
    This code works, and a very tiny bit faster than other loops, but it's big and in case of table being empty, results in an error.

    So, we use a nifty for loop:
    for iterator, element in ipairs(awesomeTable) do
        -- element is the same as awesomeTable[iterator]. Also this is a comment
        print("In table 'awesomeTable', at index ".. iterator .. " this is what inside: " .. element)
    end
    

    They both are equal.


    This code is even simplier:
    love.graphics.rectangle("fill", v.x, v.y, 2, 5)
    'v' is just renamed 'element' (and in reverse) so everytime we iterate table, we have it.
    So, we have another table:
    snowflakes = {
        {x = 10, y = 40},
        {x = 20, y = 30},
        {x = 30, y = 20},
        {x = 40, y = 10}
    }
    
    And iterate it again:

    -- I renamed iterator and element here, to make code easier to read
    for i,v in ipairs(snowflakes) do
        -- in every loop v equals snowflakes[i] so,
        -- if i for example, equals 1 then the v then will be {x = 10, y = 40}
        -- and v.x then will be 10
        love.graphics.rectangle("fill", v.x, v.y, 2, 5)
    end
    

    These are the one of many reasons I don't recommend Lua for beginners: it has a lot of very nifty things that are so nifty it sometimes hard to understand. Plus, many other languages don't have them, so switching to another will be harder.
    tl;dr: Java or C# as a first language is a good choice
    Reply With Quote Edit / Delete Windows XP Russian Federation Show Events Dumb Dumb x 1Agree Agree x 1 (list)

  39. Post #839
    Gold Member
    Falcqn's Avatar
    July 2010
    3,010 Posts


    Is this Lua?
    The filetype is ".gm", so at a guess it's gamemonkey.
    Reply With Quote Edit / Delete Windows 7 United Kingdom Show Events Late Late x 3Agree Agree x 1 (list)

  40. Post #840
    Gold Member
    Lexic's Avatar
    March 2009
    6,123 Posts
    I mean seriously, someone was having an incredibly bad day when they invented this image format: http://insidethelink.ortiche.net/wik..._Decompression
    "End of stream: when reaching it, the decoding is complete. No additional bytes follow. I think some bitmaps don't have this, so just stop when you have decoded enough pixels to fill the image."

    Oh wow. Do you think there was some kind of a grudge between the guy writing the encoder and the guy writing the decoder? "Hey Bill! Guess what I've written for you today?"
    Reply With Quote Edit / Delete Mac United Kingdom Show Events Funny Funny x 19Agree Agree x 3 (list)