![]() |
|
Thread locks too soon |
Neil Roy
Member #2,229
April 2002
![]() |
I am pretty certain the built in font was created from scratch. If it looks similar it is because it is the English language which nobody, not even IBM, owns a copyright on. I doubt very much this was copied from anywhere. --- |
bamccaig
Member #7,536
July 2006
![]() |
I played a little bit too much last night I think. When I was trying to squeeze in 6 or so hours of sleep before work this morning I could see the game playing out in my imagination not by choice. You always know you "overdid" it when that happens. -- acc.js | al4anim - Allegro 4 Animation library | Allegro 5 VS/NuGet Guide | Allegro.cc Mockup | Allegro.cc <code> Tag | Allegro 4 Timer Example (w/ Semaphores) | Allegro 5 "Winpkg" (MSVC readme) | Bambot | Blog | C++ STL Container Flowchart | Castopulence Software | Check Return Values | Derail? | Is This A Discussion? Flow Chart | Filesystem Hierarchy Standard | Clean Code Talks - Global State and Singletons | How To Use Header Files | GNU/Linux (Debian, Fedora, Gentoo) | rot (rot13, rot47, rotN) | Streaming |
Elias
Member #358
May 2000
|
I'm pretty sure Shawn mentions somewhere he copied the font from his PC's BIOS. It also is pixel-by-pixel identical so is very likely to be the case. (According to the post above, I did not double check). However a quick Google reveals that in the US typefaces like this were not copyrightable so it is unlikely IBM obtained one. Their actual font "Courier" for example was never copyrighted. The 8x8 BIOS font might have been auto-created by someone simply scaling down a font like that and touching up afterwards... probably was a job of half an hour -- |
Neil Roy
Member #2,229
April 2002
![]() |
Personally, I tire of worrying about copyrights. I just do what I wish for the most part. If someone wants to sue me, go for it. Can't get blood out of a stone. --- |
Eric Johnson
Member #14,841
January 2013
![]() |
Today I rewrote my TINS 2016 entry in JavaScript to be playable on the Web. It's a near one-to-one remake, but with a few small tweaks and additions. {"name":"DFCLGuTUIAAS_DM.jpg:large","src":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/8\/6\/8604106cb31a93da1529f91876ec95f5.jpg","w":768,"h":448,"tn":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/8\/6\/8604106cb31a93da1529f91876ec95f5"} You can play it in your browser here. I also wrote a small blog post about it here. I plan on rewriting all of my games in JavaScript soon. I like the convenience of the Web. Edit
|
Neil Roy
Member #2,229
April 2002
![]() |
How do you like Javascript? I looked into it and was intrigued but I don't know if I have the enthusiasm to remake anything of mine with it. --- |
Eric Johnson
Member #14,841
January 2013
![]() |
JavaScript is currently my favorite language. I enjoy how flexible it is to write programs with it, and I like the convenience of being able to very easily share my creations with others (as opposed to making binaries of programs in other languages). It has its limitations though, primarily in speed. It can't match the speeds of C and the likes, but that's to be expected from an interpreted language. Still, it's pretty fast, and it continues to get faster with time. As far as writing games in JavaScript goes, it's not difficult, but it is a little different. I'm using the canvas API, but I've abstracted it with my own little game-making library called "Momo". It's only for 2D stuff though. For 3D you'd have to look into WebGL.
|
Chris Katko
Member #1,881
January 2002
![]() |
bam (and anyone else): PM me for my steam id / discord if you want to play with us. Personally, I've been loving the D language. It's C++ but refactored from the ground up to focus on productivity. The compile time function evaluation and meta programming is worlds of power and simplicity. All the "flaws" of D are slowly but surely dealt with--including the "evil" garbage collection which they're working out of the language for those who don't want it in the stdlib. Javascript's "everything is a float" is very scary. O_O But I do love being able to hit refresh in a browser and just magically see your new code. And since it's JS, everyone is "Already online". -----sig: |
Eric Johnson
Member #14,841
January 2013
![]() |
Chris Katko said: Javascript's "everything is a float" is very scary. Yeah, that's screwed me up a few times. You can treat a number as an int using parseInt() though. But despite its flaws, what I love most about JavaScript is that changes are immediately available upon refreshing the page. It's just so convenient. Quote: Personally, I've been loving the D language. I'll have to check it out. I've heard a few people rave about it, after all.
|
bamccaig
Member #7,536
July 2006
![]() |
As a side note, if you use the bitwise-or (`|`) operator in JavaScript the runtime will convert your operands to integers since it only works on integers. If you bitwise-or a variable with 0 you will get the variable as a native integer (i.e., any decimal part will be truncated, non-numbers will be zero). That is part of the asm.js spec IIRC to define an integer number, but I'm not overly up on how it affects performance. In any case, once you learn how to process your types dynamically it really isn't a problem. I rarely even think about types anymore in JavaScript (I usually just know). In fact, I was screwing around with a short script just yesterday and couldn't remember what window.location was because it's rarely useful. When my script wouldn't work I just guessed that wrapping window.location in new String() would probably get the types sorted out and fix my code. Sure enough... For the most part, just be sure to define your own data in the types that you want and don't mix types unnecessarily and you'll be fine. @Eric, you appear to be using some new fangled JavaScript syntax. Is that well supported yet? I fucking love the shorter lambdas. -- acc.js | al4anim - Allegro 4 Animation library | Allegro 5 VS/NuGet Guide | Allegro.cc Mockup | Allegro.cc <code> Tag | Allegro 4 Timer Example (w/ Semaphores) | Allegro 5 "Winpkg" (MSVC readme) | Bambot | Blog | C++ STL Container Flowchart | Castopulence Software | Check Return Values | Derail? | Is This A Discussion? Flow Chart | Filesystem Hierarchy Standard | Clean Code Talks - Global State and Singletons | How To Use Header Files | GNU/Linux (Debian, Fedora, Gentoo) | rot (rot13, rot47, rotN) | Streaming |
Eric Johnson
Member #14,841
January 2013
![]() |
bamccaig said: @Eric, you appear to be using some new fangled JavaScript syntax. Is that well supported yet? I fucking love the shorter lambdas. Yep, it's supported. It's from ECMAScript 2015. As for the bitwise operator, I know about it but don't use it. My thinking is that it's slower than using parseInt(). I'll have to run some benchmarks though. Edit
|
bamccaig
Member #7,536
July 2006
![]() |
According to this parseInt is significantly slower. There are various operators that are fast to convert strings to integers, but it seems the fastest in Firefox and Chrome is actually a bitshift. The only flaw with that benchmark is that it doesn't show the results to confirm the same output. But I'm pretty sure (after removing addition because JS always sees that as concatenation if one operand is a string). -- acc.js | al4anim - Allegro 4 Animation library | Allegro 5 VS/NuGet Guide | Allegro.cc Mockup | Allegro.cc <code> Tag | Allegro 4 Timer Example (w/ Semaphores) | Allegro 5 "Winpkg" (MSVC readme) | Bambot | Blog | C++ STL Container Flowchart | Castopulence Software | Check Return Values | Derail? | Is This A Discussion? Flow Chart | Filesystem Hierarchy Standard | Clean Code Talks - Global State and Singletons | How To Use Header Files | GNU/Linux (Debian, Fedora, Gentoo) | rot (rot13, rot47, rotN) | Streaming |
Eric Johnson
Member #14,841
January 2013
![]() |
I was mostly curious about converting a float to an integer, not a string, but that's still good to know. I'll stick with using bitwise operators from now on.
|
Neil Roy
Member #2,229
April 2002
![]() |
Quote: Apparently [jsperf.com] bitwise is the fastest. Wow! Chrome is horribly slow at these! Like, 86K/sec for Chrome verses over 2M/sec for Firefox! That's quite the discrepancy! Interesting tests. Having to do this sort of thing makes me question the language big time though. --- |
bamccaig
Member #7,536
July 2006
![]() |
It's no different than things you have to do in C or C++ to get the most speed out of them. You can write most code without thinking too hard about it, but when performance counts you have to start learning the intricacies of the platform to design the fastest program possible. I wouldn't let that scare you off. The dynamic and memory managed nature might offer you a great boost in productivity once you get the hang of the language. -- acc.js | al4anim - Allegro 4 Animation library | Allegro 5 VS/NuGet Guide | Allegro.cc Mockup | Allegro.cc <code> Tag | Allegro 4 Timer Example (w/ Semaphores) | Allegro 5 "Winpkg" (MSVC readme) | Bambot | Blog | C++ STL Container Flowchart | Castopulence Software | Check Return Values | Derail? | Is This A Discussion? Flow Chart | Filesystem Hierarchy Standard | Clean Code Talks - Global State and Singletons | How To Use Header Files | GNU/Linux (Debian, Fedora, Gentoo) | rot (rot13, rot47, rotN) | Streaming |
Eric Johnson
Member #14,841
January 2013
![]() |
Performance differs between JavaScript engines depending on what you're doing. Chrome uses V8 and Firefox uses SpiderMonkey. Firefox may be faster at converting floats to ints, but Chrome is faster in other areas. Take this regex vs substring benchmark for example; I get 835,255 ops/sec for regex in Chrome, but only 254,962 in Firefox. General performance isn't really an issue between JavaScript engines though. They're all pretty quick these days, but like you can see here, some are faster than others in certain areas, but it doesn't matter much in practice.
|
bamccaig
Member #7,536
July 2006
![]() |
Of course, one option to deal with that for programs that must be blazing fast would be to generate JavaScript for each browser on the server and return the browser-optimized code when the page is requested. That's far too much trouble to be worthwhile for 99.999% of cases, but if you were trying to host a fancy game or something it might make sense. There are already several languages that can be compiled down to JavaScript. Actually, it might even be possible to write your programs in C and have that converted to JavaScript. It just might be fun to get it all setup so that you can do graphics and sound. It has been done before I think. -- acc.js | al4anim - Allegro 4 Animation library | Allegro 5 VS/NuGet Guide | Allegro.cc Mockup | Allegro.cc <code> Tag | Allegro 4 Timer Example (w/ Semaphores) | Allegro 5 "Winpkg" (MSVC readme) | Bambot | Blog | C++ STL Container Flowchart | Castopulence Software | Check Return Values | Derail? | Is This A Discussion? Flow Chart | Filesystem Hierarchy Standard | Clean Code Talks - Global State and Singletons | How To Use Header Files | GNU/Linux (Debian, Fedora, Gentoo) | rot (rot13, rot47, rotN) | Streaming |
Eric Johnson
Member #14,841
January 2013
![]() |
I'm content continuing to use vanilla JavaScript. I was just giving an example of the performance differences between engines is all. So something interesting I encountered today: Opera doesn't like MP3 files. Ever since Opera moved to WebKit, it dropped baked-in support for playing MP3 files. It can still play MP3 files if the OS as a whole has the appropriate codecs installed though. My game, Mori, uses MP3 files, which aren't being playing in Opera. So now I'm going to try to make OGG sounds for Opera to use.
|
bamccaig
Member #7,536
July 2006
![]() |
I suspect that FLOSS browsers in *nix would also have spotty support for mp3 files so I think offering both is the way to go. -- acc.js | al4anim - Allegro 4 Animation library | Allegro 5 VS/NuGet Guide | Allegro.cc Mockup | Allegro.cc <code> Tag | Allegro 4 Timer Example (w/ Semaphores) | Allegro 5 "Winpkg" (MSVC readme) | Bambot | Blog | C++ STL Container Flowchart | Castopulence Software | Check Return Values | Derail? | Is This A Discussion? Flow Chart | Filesystem Hierarchy Standard | Clean Code Talks - Global State and Singletons | How To Use Header Files | GNU/Linux (Debian, Fedora, Gentoo) | rot (rot13, rot47, rotN) | Streaming |
Eric Johnson
Member #14,841
January 2013
![]() |
Yeah. I added both and now Opera plays nicely.
|
Neil Roy
Member #2,229
April 2002
![]() |
OGG is a much better choice. Higher quality and smaller filesize, plus you will usually see support as there are no legal issues with using it. That is probably why there is no support in that case. My Deluxe Pacman 2 game uses OGG files for sound effects and music. EVen at the lowest quality settings for OGG, I find there is very little perceptible difference in quality, but a huge difference in file size. Audacity is nice for converting (and editing of course) and FREAC is also very nice for converting. --- |
Eric Johnson
Member #14,841
January 2013
![]() |
I agree that OGG is the better choice. MP3 has better cross-browser support last I checked though. And I use Audacity for all my audio needs. Edit Edit #2
|
bamccaig
Member #7,536
July 2006
![]() |
I was leaning more towards Emscripten for Neil since he prefers C. To be fair, I think that JavaScript could be much more productive once you get over the learning curve, but it's still a neat concept to write C and compile that to something that will run in the browser. That said, I've tried now on two Linux boxes to install it and failed both times. I'm not sure how well maintained it is. If there are Windows binaries I imagine those will just work. The project definitely needs to improve its Linux support. -- acc.js | al4anim - Allegro 4 Animation library | Allegro 5 VS/NuGet Guide | Allegro.cc Mockup | Allegro.cc <code> Tag | Allegro 4 Timer Example (w/ Semaphores) | Allegro 5 "Winpkg" (MSVC readme) | Bambot | Blog | C++ STL Container Flowchart | Castopulence Software | Check Return Values | Derail? | Is This A Discussion? Flow Chart | Filesystem Hierarchy Standard | Clean Code Talks - Global State and Singletons | How To Use Header Files | GNU/Linux (Debian, Fedora, Gentoo) | rot (rot13, rot47, rotN) | Streaming |
Arthur Kalliokoski
Second in Command
February 2005
![]() |
This page is taking way too long to load now. Every time I look at it I think my computer has locked up. They all watch too much MSNBC... they get ideas. |
bamccaig
Member #7,536
July 2006
![]() |
I set my paging to 100 for these threads. -- acc.js | al4anim - Allegro 4 Animation library | Allegro 5 VS/NuGet Guide | Allegro.cc Mockup | Allegro.cc <code> Tag | Allegro 4 Timer Example (w/ Semaphores) | Allegro 5 "Winpkg" (MSVC readme) | Bambot | Blog | C++ STL Container Flowchart | Castopulence Software | Check Return Values | Derail? | Is This A Discussion? Flow Chart | Filesystem Hierarchy Standard | Clean Code Talks - Global State and Singletons | How To Use Header Files | GNU/Linux (Debian, Fedora, Gentoo) | rot (rot13, rot47, rotN) | Streaming |
|
|