• What are you working on? January 2012
    3,401 replies, posted
[QUOTE=Octave;34450639]CRC in my atrocious-looking language [code]inc: dup st 1 add set . crc: 104 101 97 100 0 0 0 5 st 4 ne while 5 st st 8 shl 4 dup st rot xor set 4 st out 10 outc 6 st 8 ne while 4 st 32768 and dup 1 gte if 4 st 1 shl 4129 xor 4 swap set . 1 lt if 4 4 st 1 shl set . 4 4 st 65535 and set 6 (inc) 6 st 8 ne . 6 0 set 5 (inc) 5 st 4 ne . . (crc) 4 st out [/code]Finally it does something useful :v: [sp]that took like two hours to get working, i suck at stack oriented programming[/sp][/QUOTE] I'm using actual + and -s and such for the math operations, and { }s for the blocks of code, looks a ton better.
So, I put more work into the sprite editor. Preview/Navigation bar was quite a bitch to get going really nice, but I got there. I didn't expect [url=http://puu.sh/ceHk]this shit[/url] would get this far. [vid]http://puu.sh/f3k6[/vid] Anyway, other things I added in asides from that navigation bar is limited onion skinning (currently only shows the previous frame), frame duplication, and more control where you remove and add frames.
Okay, did 1000 Fibonacci numbers in 0.118 seconds. Wheeee
[QUOTE=BlackPhoenix;34447967][video=youtube;ryjlk3WD7hg]http://www.youtube.com/watch?v=ryjlk3WD7hg[/video][/QUOTE] [img]http://i.imgur.com/WkpBq.png[/img]
I don't know exactly where I went wrong, but my network layer flips out when I open 50 instances of the client at the same time. I am going to rewrite the reliable packet to use a hash table instead of a list, that will hopefully fix some thing.
[QUOTE=Jawalt;34454100]I'm using actual + and -s and such for the math operations, and { }s for the blocks of code, looks a ton better.[/QUOTE] It does look better, I decided to use end's for my ends of blocks though. [code]inc: dup st 1 + := end crc: 104 101 97 100 0 0 0 5 st 4 != while 5 st st 8 << 4 dup st rot ^ := 4 st out 10 outc 6 st 8 != while 4 st 32768 & dup 1 >= if 4 st 1 << 4129 ^ 4 swap := end 1 < if 4 4 st 1 << := end 4 4 st 65535 & := 6 (inc) 6 st 8 != end 6 0 := 5 (inc) 5 st 4 != end end (crc) 4 st out[/code]
[media]http://www.youtube.com/watch?v=0qmJX3YKuQQ&feature=youtu.be[/media] It's for a university project I have to finish in the next 16 days, might actually go with it and turn it into a game after that though (right now I'm only looking into making the terrain look somewhat nice and editable).
[code]def fx pop fsx sx indx sx test ax prt ax ret table tx sndx tx func fx sndx tx test 0x10 table ux sndx ux test 0x1 push fsx ux tcal tx func mthd tx func prt done[/code] Now I've got index calling and method calling. Just one step closer to Objects [editline]29th January 2012[/editline] That prints 1, then 16
[QUOTE=ZenX2;34454806]Okay, did 1000 Fibonacci numbers in 0.118 seconds. Wheeee[/QUOTE] that is not very fast
[QUOTE=swift and shift;34455737]that is not very fast[/QUOTE] It's interpreted as it goes, and it's running within Lua withing Love And it's my first moderately successful language
why is everyone making a language? and why make them hard to read?
[QUOTE=ZenX2;34455766]It's interpreted as it goes, and it's running within Lua withing Love And it's my first moderately successful language[/QUOTE] oh, that's alright then!
[QUOTE=The Kakistocrat;34455861]why is everyone making a language? and why make them hard to read?[/QUOTE] Because it's fun
[QUOTE=ZenX2;34455881]Because it's fun[/QUOTE] I can understand that, but why is it so hard to read? I thought the point of interpreted languages was to be easier to use.
[QUOTE=The Kakistocrat;34455898]I can understand that, but why is it so hard to read? I thought the point of interpreted languages was to be easier to use.[/QUOTE] Even if that's true, that's not the point of making your own language.
[IMG]http://i.imgur.com/lfAUP.png[/IMG] LOVE2D is fantastic!
[QUOTE=Smashmaster;34455947]Even if that's true, that's not the point of making your own language.[/QUOTE] I know it's not the point, I just wonder why you would make a language with weird syntax.
[QUOTE=Hexxeh;34422748]Okay so I've got an initial version of the Facepunch API working now that garry's added the tiny patch required on Facepunch's server. Here's how it works. Firstly, login. You don't need to login. This is a design decision. All requests must have GET parameters username and password, where password is the MD5 hash of the user's password. All responses are JSON, format isn't quite fixed yet. I could use some help writing documentation, since I suck at it. You must also pass a GET parameter called action, see the list below for the possible values of this parameter. Bolded word is the action paramter value. Soon you'll also be able to register for an API key, to get stats on your applications usage of the API. These won't be required, totally optional, but there might be advantages to using an API key in the future.[/QUOTE] So I've got the API mostly working (Implemented [url=https://github.com/traitor/Facepunch-App/blob/master/src/nl/vertinode/facepunch/FacepunchAPI.java]here[/url]). However, specifying a page doesn't change anything. Doesn't change the page of a forum, or a thread. Also, all thread's statuses are "sticky". Dunno if that's the intended result. And if you could add the poster's post count and join date to getposts that'd be awesome.
a language is one of the most fun things you can program
[QUOTE=The Kakistocrat;34455978]I know it's not the point, I just wonder why you would make a language with weird syntax.[/QUOTE] Making a language with syntax like that of lua or python requires much more skill and time, just to parse it. I've only been programming for four months (technically I did do perl and other things like 6 years ago, but I only did web development between that time and October or so) and I don't have the skill to make a fancy parser; I tried and failed a lot with lex and yacc so I just decided to say screw it and make an assembly-like language. It's obviously more advanced than just assembly now, but it's still easy to parse. Still, I've never written more code or spent more time on any project than this one.
[QUOTE=Octave;34456334]Making a language with syntax like that of lua or python requires much more skill and time, just to parse it. I've only been programming for four months (technically I did do perl and other things like 6 years ago, but I only did web development between that time and October or so) and I don't have the skill to make a fancy parser; I tried and failed a lot with lex and yacc so I just decided to say screw it and make an assembly-like language. It's obviously more advanced than just assembly now, but it's still easy to parse. Still, I've never written more code or spent more time on any project than this one.[/QUOTE] lex and yacc make the easy parts of writing a parser easier and the hard parts harder. Recursive-descent parsing is actually very easy once you get the hang of it works. I've written a few parsers now and I much prefer writing one from scratch over using a parser generator. Hand written parsers are often significantly faster too. [editline]30th January 2012[/editline] If you're interested in this stuff, I think you'd benefit from grabbing a copy of the Dragon Book. You can get it second hand off Amazon for about $40
Working on implementing a Quad Tree, I haven't really ever done it before so I thought it could be interesting. Also, that feel when Resharper lights your code up green: [img]http://puu.sh/f4nl[/img]
How do multiplayer games that support 64+ clients work? I am simulating about 100 clients connecting in extremely short intervals (4-8 connections per second). In this time each client sends a connection request and a ping to the server to get a their latency, the server has to send 2 or 3 packets of varying size(usually 20-50 bytes) back to the client, sends their own ping request to the client to get a handle on their latency as well. Latency jumps from 0ms to 2000ms. And steadily rises as more clients connect... Mind you this is on localhost. I don't have a clue what I am doing. Ugh.
[QUOTE=false prophet;34456630]How do multiplayer games that support 64+ clients work? I am simulating about 100 clients connecting in extremely short intervals (4-8 connections per second). In this time each client sends a connection request and a ping to the server to get a their latency, the server has to send 2 or 3 packets of varying size(usually 20-50 bytes) back to the client, sends their own ping request to the client to get a handle on their latency as well. Latency jumps from 0ms to 2000ms. And steadily rises as more clients connect... Mind you this is on localhost. I don't have a clue what I am doing. Ugh.[/QUOTE] [url]http://ai.eecs.umich.edu/soar/Classes/494/talks/lecture-15.pdf[/url]
[QUOTE=Helix Alioth;34457325][url]http://ai.eecs.umich.edu/soar/Classes/494/talks/lecture-15.pdf[/url][/QUOTE] Oh man, thank you. This forum needs a Boner rating.
[QUOTE=false prophet;34456630]How do multiplayer games that support 64+ clients work? I am simulating about 100 clients connecting in extremely short intervals (4-8 connections per second). In this time each client sends a connection request and a ping to the server to get a their latency, the server has to send 2 or 3 packets of varying size(usually 20-50 bytes) back to the client, sends their own ping request to the client to get a handle on their latency as well. Latency jumps from 0ms to 2000ms. And steadily rises as more clients connect... Mind you this is on localhost. I don't have a clue what I am doing. Ugh.[/QUOTE] Also this: [url]http://gafferongames.com/networking-for-game-programmers/[/url]
[QUOTE=raBBish;34457591]Also this: [url]http://gafferongames.com/networking-for-game-programmers/[/url][/QUOTE] I don't like that guy. He once ridiculed someone about some ideas for P2P networking in a forum and multiple blog posts, then showcased the very same technique in a presentation at a developer conference.
I've been taking a look at [url]c55.me/minetest/[/url]. It's a pretty cool C++ minecraft-like with Lua modding, but despite running pretty darn fast and being cool and all, it's entirely made of the bad kind of programmer art. Also the Lua api is pretty scary. I feel kinda bad about how hard it is to look at. I think I'll see if I can do some work on tidying up the api. [editline]29th January 2012[/editline] Okay, I've made a lot of these functions easier to look at/access. Some of these things I've been able to bundle up into a single table indexing.
[QUOTE=swift and shift;34453730]Oh come on now, it's not that bad. You just need to create a FileStream object and a Buffer object and then create a StreamReader object which reads the FileStream object into the Buffer object which you can then create a StringBuffer object to read the Buffer object into a String object with a UnicodeEncoding object. Pretty straight forward really[/QUOTE] [cpp]Reader r=new FileReader("myfile.txt"); int read; while((read=r.read())>=0){ char c=(char)read; //do stuff }[/cpp] Not really that hard. [B]Edit:[/B] Or alternatively using Apache Commons [cpp]String fileContent=IOUtils.toString(new FileInputStream("myfile.txt"));[/cpp]
I really hope mono doesn't release 2.12 till after May. Cause then I can say that mono has a backlog of releases over a year old. [url]https://bugzilla.novell.com/show_bug.cgi?id=691115[/url] Fixed back in May of 2011 and said to be in the 2.12 release. Well 2.11 isn't even out yet...
Sorry, you need to Log In to post a reply to this thread.