![]() |
|
SpeedHack 2011 is coming soon |
Michael Jensen
Member #2,870
October 2002
![]() |
bamccaig said: I think text mode is platform specific That's the point. Quote: In theory, if you use binary mode and always use UNIX line endings then it shouldn't ever matter. In theory, if you open text files in text mode it shouldn't ever matter. >.> Matthew Leverton said: It should work. Maybe you are triggering a bug with the contents of the post. Weird, I tried changing "penis" to "p3n1s" but still won't post. Just get a completely blank page... I think the speedhack website has turned into an evil dictator that refuses to let me criticize it... Oh well. {"name":"604502","src":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/1\/9\/19bcff1a59dd9c471d3af2e4f98a2a92.png","w":269,"h":445,"tn":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/1\/9\/19bcff1a59dd9c471d3af2e4f98a2a92"}
|
23yrold3yrold
Member #1,134
March 2001
![]() |
Michael Jensen said: Would be epic if we could get Bob, 23, and X-G in on this. The world may end next year, after all. Heh; I've only entered one of these ever IIRC. The old six-hour Blitzhack. I'm tempted to think about it. I actually don't know what kind of time I'll have this weekend. REVISION: Scratch that; didn't realize it already began. -- |
Michael Jensen
Member #2,870
October 2002
![]() |
23yrold3yrold said: Heh; I've only entered one of these ever IIRC. The old six-hour Blitzhack. Weird. I thought sometime before 2004 (my first speedhack) you had done something. There was a speedhack where all the resource files were provided and everyone had to make do... Weird, I can't find that speedhack. Maybe it was something else. xD
|
23yrold3yrold
Member #1,134
March 2001
![]() |
Yeah. That was the Blitzhack. -- |
bamccaig
Member #7,536
July 2006
![]() |
Michael Jensen said: In theory, if you open text files in text mode it shouldn't ever matter.
Not if the file was created on a different platform. -- 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 |
Michael Jensen
Member #2,870
October 2002
![]() |
bamccaig said: characters in your lines, which might be a problem if you don't account for it. So what you're saying is, the text mode is a lie...? Anyway, if I had to write one of these by hand (which I wouldn't, because that's just a waste of time) I would just treat \n or \r as new lines and ignore blank lines. Keep it simple stupid. ;-) @ML: I still can't post blog updates. This one didn't even have any bad words. Just lost 5 minutes of typing. Oh well, about to head home from work, in a few hours I'll be starting in on le hack de speed. edit: 23yrold3yrold said: Yeah. That was the Blitzhack. Nice. I didn't even know there was a Blitzhack (at least, today I didn't; apparently years ago, I must have, if I downloaded and looked at the entries...) edit: Okay, I guess I'll just tweet with "#speedhack" for my blog for now. Since I can post comments fine, but not new posts. It's super lame.
|
bamccaig
Member #7,536
July 2006
![]() |
Michael Jensen said: So what you're saying is, the text mode is a lie...?
In a matter of speaking, yes. The only difference between text mode and binary mode (AFAIK) is that EOLs are converted to and from the native EOL sequence automagically. In Windows, this means converting 0A to 0D0A and back again. In Linux, it's effectively the same as binary mode, AFAIK, because the native newline is the same as the C newline (0A). Expecting anything more is ridiculous; in fact, even that much is ridiculous. -- 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 |
Michael Jensen
Member #2,870
October 2002
![]() |
Grrraw 20 hours in and I haven't had a chance to write a single line of code yet. I'm so fucked this speed hack. Oh well, at least I got my computer working again. Will try to blog about it in a second. Shit better work or I'm just not even tryin'... bamccaig said: Converting it to just 0A might be wrong. Doesn't that fly in the face of having modes with well defined behaviors? Why isn't there a mode that does that, and if you don't want that behavior you don't set it? Seems trivially silly to me.
|
Slartibartfast
Member #8,789
June 2007
![]() |
Michael Jensen said: Grrraw 20 hours in and I haven't had a chance to write a single line of code yet. I'm so fucked this speed hack.
52 hours is still a lot of time, and it's not like you were awake the entire 20 hours Meanwhile, my code looks like a steaming pile of shit with little C and C++ shaped corn, but so far it is working and looking fine ---- |
BAF
Member #2,981
December 2002
![]() |
I started coding, but plans came up last night, and today is shot for some other plans. Tonight and Sunday will be a coding blitz, that's for sure. |
Michael Jensen
Member #2,870
October 2002
![]() |
CROSS-PLATFORM TIP: #if _WIN32 #define snprintf sprintf_s #endif
Slartibartfast said: 52 hours is still a lot of time, and it's not like you were awake the entire 20 hours Actually more like 28 hours with other weekend plans, but still, this is sweet, I'm glad I'm doing Speedhack again.
|
Thomas Fjellstrom
Member #476
June 2000
![]() |
Michael Jensen said: CROSS-PLATFORM TIP: I think it has _snprintf. -- |
weapon_S
Member #7,859
October 2006
![]() |
Stupid question here. Do you use fonts? With a small file-size...? Or is there a sane way to obtain the fonts installed on somebody's system? |
MiquelFire
Member #3,110
January 2003
![]() |
That's one thing lacking from A5, there's no default font you can use without including it. --- |
Matthew Leverton
Supreme Loser
January 1999
![]() |
For SpeedHack, you need to use bitmap fonts. |
Fishcake
Member #8,704
June 2007
![]() |
My project has files grouped into directories (with .cpp and .h together), but it seems that the provided makefile doesn't detect files inside directories (inside src folder). This is a small issue for now, because I'm using Codeblocks without the makefile for the development, but I really should resolve it ASAP before the deadline. I did some search, and it seems that the way to go is to have a makefile for each folder. That seems a bit troublesome. Is there an easier way out?
|
Matthew Leverton
Supreme Loser
January 1999
![]() |
As the readme says: Quote: 3) Place all of your source code in the src folder as either .c or .cpp files. There are a few lines in the Makefile that you could copy and paste for each sub folder to add support. Or you could dump all your source files into the same main folder. |
kenmasters1976
Member #8,794
July 2007
|
weapon_S said: Stupid question here. Do you use fonts? With a small file-size...? I'm using a TTF font. It's barely 20 KB and I'm sure it's smaller when compressed. By the way, I just realized that it doesn't have some of the glyphs I need so I'll be needing another one.
|
Michael Jensen
Member #2,870
October 2002
![]() |
Matthew Leverton said: For SpeedHack, you need to use bitmap fonts. I'm assuming that's a joke (but I would like to confirm.) weapon_S said: Stupid question here. Do you use fonts? With a small file-size...? Or is there a sane way to obtain the fonts installed on somebody's system?
I wish there were, the MAllegro wrapper for .NET that I started writing could export them, but that source is long gone, and it was in VB.NET 2005. Anyway, most of the .ttf files I've found are ridiculously tiny... The font I'm using is 21K unzipped -- It's from some free-fonts archive (the same site that the allegro 5 tutorial that uses "pirulen.ttf" links to.)
|
Matthew Leverton
Supreme Loser
January 1999
![]() |
Michael Jensen said: Matthew Leverton said: For SpeedHack, you need to use bitmap fonts. I'm assuming that's a joke (but I would like to confirm.) I just mean that while verdana.ttf is 200KB, if you create a bitmap font with the size you need, it will be very small. Of course if you use a smaller TTF with less characters or whatever, then you'll be okay from a size perspective. |
Bruce Perry
Member #270
April 2000
|
Are we allowed to submit as a 7-Zip archive? -- |
MiquelFire
Member #3,110
January 2003
![]() |
Nope. --- |
kenmasters1976
Member #8,794
July 2007
|
Bruce Perry said: Are we allowed to submit as a 7-Zip archive? The rules state that all entries must be supplied in a ZIP file. 7z might be problematic, particularly for some Linux users, I guess.
|
Bruce Perry
Member #270
April 2000
|
I thought Shawn once submitted as a tar.gz -- |
LennyLen
Member #5,313
December 2004
![]() |
kenmasters1976 said: particularly for some Linux users, I guess. It shouldn't be, since there's a linux version.
|
|
|