![]() |
|
MinorHack Attack! |
Zaphos
Member #1,468
August 2001
|
Quote: Though one in pure C would be nice as well That one compiles in gcc -- I'm not sure what I'd have to do to make it pure C? Quote: If you leave out error checking, 15-bit fall back, closing callback and timers (use timeGetTime()/gettimeofday()) you don't really need much time do create the framework. But I want error checking, programs that work, programs that close nicely, and programs that use a portable timer. And I wouldn't want to worry about the idiosyncrasies of a delta timing system in an hour-long hack ... Quote: Retyping it takes almost no thinking and just about 3 minutes of coding, which is really small price for the fact that you can state that your game is 100% coded during one hour. Is retyping from memory any different from a stupid version of copy-paste? Personally I get no pride from that at all.
|
Derezo
Member #1,666
April 2001
![]() |
Woops. I was suppose to participate last sunday! "He who controls the stuffing controls the Universe" |
CGamesPlay
Member #2,559
July 2002
![]() |
The next one is Saturday -- Ryan Patterson - <http://cgamesplay.com/> |
Kikaru
Member #7,616
August 2006
![]() |
I agree, a simple code base to initialize allegro in the main loop, include allegro, and standard C/C++ libraries would be nice. |
Evert
Member #794
November 2000
![]() |
Quote: That one compiles in gcc C and C++ both compile with gcc. Hell, even Pascal and FORTRAN compile with gcc if it's been configured for those languages. Quote: I'm not sure what I'd have to do to make it pure C? Not use C++'s standard bool type. Since I'm not planning on joining any programming competition anytime soon the following is probably not very useful, but the only game template I'd consider using is my own, because that corresponds to my coding style and way of thinking... |
CGamesPlay
Member #2,559
July 2002
![]() |
Quote: Since I'm not planning on joining any programming competition anytime soon the following is probably not very useful, but the only game template I'd consider using is my own, because that corresponds to my coding style and way of thinking... Right, which is why the kit is optional. It's designed for those who are still learning how to do what it does. -- Ryan Patterson - <http://cgamesplay.com/> |
Zaphos
Member #1,468
August 2001
|
Okay, so here's mine again, c89 style:
Quote: the only game template I'd consider using is my own, because that corresponds to my coding style and way of thinking... Perhaps the competition could say "using a custom template which accomplishes nothing significantly more or different from the provided template is also fine."
|
Krzysztof Kluczek
Member #4,191
January 2004
![]() |
Quote: But I want error checking, programs that work, programs that close nicely, and programs that use a portable timer. And I wouldn't want to worry about the idiosyncrasies of a delta timing system in an hour-long hack ...
I haven't got Allegro get_gfx_mode error since I've moved away from my 486DX4 and switched from DOSt to using Windows 98 as a main platforms. For me pressing "Esc" counts as closing nicely for sure and timeGetTime() is portable timer if you use my gettimeofday replacement version. ________ |
Jakub Wasilewski
Member #3,653
June 2003
![]() |
I had my basic code completed in under 5 minutes (+3 for the entity system I often use here and there) and I honestly think that retyping the same old stuff is only to your advantage. Your hands have something to do, while your brain can concentrate on how to tackle the important parts of the game I already expressed my position about code reuse, so I will only do a short recap... I believe the "clean slate" approach provides much more feeling of achievement, and I honestly recommend this style, it's worth it in my opinion. On the other hand, if you feel like using a framework, I won't hold that against you or your entry. It's just another approach, and who am I to tell you what's fun for you? Quote: but delta-timing is much easier for me and using timeGetTime() takes less code than using Allegro timers
With my previous entry, I somehow thought that using allegro timers will be faster to code, but it wasn't exactly the case. I'll go with what I'm used to (DT) in the next one, with the added benefit that it'll run smoother --------------------------- |
Victor Williams Stafusa da Silva
Member #4,212
January 2004
![]() |
About code re-use for initialization only, that was exactly what i reused in my asteroid game (from Rambanana). That was just code to detect joystick, keyboard and mouse, setting up sound and MIDI, defining graphic modes (32, 24, 16, 15 and 8 bits, fullscreen and windowed), LOCK_VARIABLE, LOCK_FUNCTION, etc. It's a few messed up. Maybe i should modularize it better to make it look better and avoid the code overbloat (I.E: Sound and joystick code, which had no use in my game). I think it's very annoying and repetitive retype this whole thing again and again and again. It's very easier copy and paste it in your code and work all the 60 minutes for what really matter: develop the game. [The attack of the space bugs - Speedhack 2005] [Rambananas - Speedhack 2006] [Make clean - Speedhack 2009] [The source god - TINS 2010] |
CGamesPlay
Member #2,559
July 2002
![]() |
Quote: for what really matter: develop the game. MinorHack isn't about developing a game I think I will put up both a C and a C++ template sometime this week. It will set a graphics mode, install a keyboard, mouse, and timer at 30 BPS, and set up a double buffer. That should be enough to get people off to a good start without giving them too much of an advantage. Objections? -- Ryan Patterson - <http://cgamesplay.com/> |
Onewing
Member #6,152
August 2005
![]() |
Quote: I think I will put up both a C and a C++ template sometime this week. As long as it's optional. I don't think there's anything wrong with having initialization code and a very generic framework laid out beforehand. I have my code that, although slightly bloated, works well for me. It consists of an init function (setting up allegro, keyboard, joysticks, etc.), a game init function (for setting up game variables), a play_game function (runs the main loop), a game_update function (for doing all the update functions) and a game_draw function (for handling all the drawing functions). With this simple layout, all I have to worry about is making the game. ------------ |
Victor Williams Stafusa da Silva
Member #4,212
January 2004
![]() |
CGamesPlay said: It's about developing a game in 1 hour
I said: work all the 60 minutes for what really matter: develop the game.
[The attack of the space bugs - Speedhack 2005] [Rambananas - Speedhack 2006] [Make clean - Speedhack 2009] [The source god - TINS 2010] |
CGamesPlay
Member #2,559
July 2002
![]() |
No, you miss the point. The idea of Minorhack isn't to have a high-quality game that you can show off to friends. It's to have a low-quality game that you can show off to your friends and say "yeah, I did this entirely in 1 hour". Quote: Retyping it takes almost no thinking and just about 3 minutes of coding, which is really small price for the fact that you can state that your game is 100% coded during one hour.
-- Ryan Patterson - <http://cgamesplay.com/> |
Onewing
Member #6,152
August 2005
![]() |
Quote: Copying and Pasting takes no thinking and just about 30 seconds, which is really small price for the fact that you can state that your game is 97% coded during one hour. Fixed.;D ------------ |
CGamesPlay
Member #2,559
July 2002
![]() |
Right, right. That's why we are allowing using templates. To each his own. On a side note, I just got clearance for the Allegro.cc authentication, so I will be adding that in in just a few hours. I am also conviniently leaving work early. -- Ryan Patterson - <http://cgamesplay.com/> |
Onewing
Member #6,152
August 2005
![]() |
Quote: Right, right. That's why we are allowing using templates. To each his own. Heh, I'm just giving you a hard time. Whatever format you choose, we shall abide to (or not do entirely). ------------ |
Victor Williams Stafusa da Silva
Member #4,212
January 2004
![]() |
CGamesPlay said: The idea of Minorhack isn't to have a high-quality game that you can show off to friends.
Of course. Actually, Chuck Norris is the only person that is capable of doing a high-quality game in one hour. CGamesPlay said: It's to have a low-quality game that you can show off to your friends and say "yeah, I did this entirely in 1 hour". Or maybe "I did this entirely in 1 hour after copying and pasting this code".:P [The attack of the space bugs - Speedhack 2005] [Rambananas - Speedhack 2006] [Make clean - Speedhack 2009] [The source god - TINS 2010] |
Krzysztof Kluczek
Member #4,191
January 2004
![]() |
Quote: Copying Quake 3 source code takes absolutely no thinking and just about 5 seconds, which is really small price for the fact that you can state that your game is 0% coded during one hour.
Fixed the fix. Anyway, do whatever you enjoy, I'll be starting from scratch to get 100% one hour coded game. ________ |
Jakub Wasilewski
Member #3,653
June 2003
![]() |
Quote: Anyway, do whatever you enjoy, I'll be starting from scratch to get 100% one hour coded game.
We should get a "100% natural product, no artificial ingredients" sticker for our games --------------------------- |
Krzysztof Kluczek
Member #4,191
January 2004
![]() |
Quote:
We should get a "100% natural product, no artificial ingredients" sticker for our games
And in our case "Teraz Polska" would accompany it nicely (especially considering our last MinorHack results). ________ |
Jonatan Hedborg
Member #4,886
July 2004
![]() |
my girlfriend (she's polish) is laughing at me because i got beaten by two polish guys
|
relpatseht
Member #5,034
September 2004
![]() |
Being beaten by two Poles is most certainly not a pleasant experience, I imagine. Nevertheless, I will risk that beating to participate in the next MicroHack, assuming some unfortunate event does not arise during its hour.
|
Jakub Wasilewski
Member #3,653
June 2003
![]() |
Quote: my girlfriend (she's polish) is laughing at me because i got beaten by two polish guys
Well, tell her that at least you have beaten both of us to her, and that's probably more of an achievement Quote: Being beaten by two Poles is most certainly not a pleasant experience, I imagine. I'm wondering, how is it any worse than being beaten by two other random guys? Honestly, I'm curious. --------------------------- |
Zaphos
Member #1,468
August 2001
|
Quote: Honestly, I'm curious. It was a pun.
|
|
|