Allegro.cc - Online Community

Allegro.cc Forums » Off-Topic Ordeals » MinorHack Attack!

This thread is locked; no one can reply to it. rss feed Print
MinorHack Attack!
Victor Williams Stafusa da Silva
Member #4,212
January 2004
avatar

CGamesPlay said:

How long do you suggest?

My suggestion: 48 hours after the binaries have been uploaded. It would be enough to everyone test every entry in calm without delaying real-life problems.

[The attack of the space bugs - Speedhack 2005] [Rambananas - Speedhack 2006] [Make clean - Speedhack 2009] [The source god - TINS 2010]

Lenman
Member #4,522
April 2004
avatar

I would sugest different times, so people from other time zones will be able to participate as well. I would have loved to take part, but programming a game in the middle of a night was no good idea because I had to go to work the next day :/
But that's a problem of a 1h compo you can't easily solve, because there will always be someone in some timezone who would have to code 1h in the middle of the night. :/

--------------------------------------------------------
My newest game: Tough Terry|Come visit my homepage!

Perhaps I should let you all in on a little secret. No one likes you in the future. This time period is looked at as being full of lazy, self-centered, civically ignorant sheep. -John Titor

CGamesPlay
Member #2,559
July 2002
avatar

See my append, above.

Quote:

My suggestion: 48 hours after the binaries have been uploaded. It would be enough to everyone test every entry in calm without delaying real-life problems.

No way. The most I might be convinced of is 24 hours after the competition starts.

[append]

Lenman: With the competition voting hopefully in place after the next competition, you will be able to have them whenever you want :) In the mean time, let me know what times (GMT) would be good for you.

--
Tomasu: Every time you read this: hugging!

Ryan Patterson - <http://cgamesplay.com/>

Victor Williams Stafusa da Silva
Member #4,212
January 2004
avatar

CGamesPlay said:

The most I might be convinced of is 24 hours after the competition starts.

So let it be. 24 hours is good enough for one hour compo. But if we got some three to six hours compos, i think 48 hours would be better because the games would tend to be more complex.

[The attack of the space bugs - Speedhack 2005] [Rambananas - Speedhack 2006] [Make clean - Speedhack 2009] [The source god - TINS 2010]

Jakub Wasilewski
Member #3,653
June 2003
avatar

Quote:

Imagine if speedhack was weekly. Would we get so many entrants so dedicated to make the game? Probably not

That's an altogether different thing:

- Speedhack requires you to have time for most of the 72 hours straight. While taking 1 hour out of your weekend is something that can almost always easily be done, having a whole weekend of free time is much harder.
- Speedhack is a taxing competition if you go all out. I remember that after my first (and only) Speedhack I was mentally exhausted for 2 days or so, and didn't do anything except reading and watching TV.

MinorHack is a one-off competition. You just sit down and make some stuff, and after an hour you're free to go. You aren't tired, and you don't have to re-work your work schedule to save some time for it.

I still think we could make it a weekly occurence, though the peer scheduling could also yield good results, if tweaked properly.

I'd also say we move it a few hours back. 18:00 GMT on a Saturday seems to be good for most of the participants. Europe is mostly GMT or GMT+1, and USA IIRC GMT-6 and something around that, so that would allow everyone from those continents to participate. Japan and Australia will be left out though, but it's impossible to avoid with all the different timezones...

---------------------------
[ ChristmasHack! | My games ] :::: One CSS to style them all, One Javascript to script them, / One HTML to bring them all and in the browser bind them / In the Land of Fantasy where Standards mean something.

Krzysztof Kluczek
Member #4,191
January 2004
avatar

Quote:

How long do you suggest? :)

24 hours for voting should be fine. :)

Quote:

The bonus rule is to prohibit cheating, even though it is very vague and doesn't really stop it.

I thought the bonus rule is for fun. The compo would be really boring without it. :)

Lenman
Member #4,522
April 2004
avatar

Jakubs suggestion (18:00 GMT) sounds pretty good to me! Also, the idea of having it on a saturday is much better than a sunday, because Monday is a day where most people have to work, while Sunday will be free to the majority of people.

--------------------------------------------------------
My newest game: Tough Terry|Come visit my homepage!

Perhaps I should let you all in on a little secret. No one likes you in the future. This time period is looked at as being full of lazy, self-centered, civically ignorant sheep. -John Titor

CGamesPlay
Member #2,559
July 2002
avatar

Quote:

I thought the bonus rule is for fun. The compo would be really boring without it. :)

The meaning of the rule really has shifted to make it fun, but the original intent was to make the game harder to create ahead of time.

[append]

Well, I've imported all of the entries into the database, which can't be browsed. 61 67 KB of source code. Wow!

--
Tomasu: Every time you read this: hugging!

Ryan Patterson - <http://cgamesplay.com/>

Kikaru
Member #7,616
August 2006
avatar

I agree with Saturday. I go to church on Sunday, and don't get back until 1:30 sometimes(EST). Maybe make it every two weeks?

User acounts could work, just store a username and password. Then, make the 'submit' and 'vote' pages member-only.

CGamesPlay
Member #2,559
July 2002
avatar

Quote:

User acounts could work, just store a username and password. Then, the 'submit' and 'vote' pages member-only. :)

No, it will log on using your Allegro.cc account.

[append]

How about September 16th at 1800 GMT?

--
Tomasu: Every time you read this: hugging!

Ryan Patterson - <http://cgamesplay.com/>

Jonatan Hedborg
Member #4,886
July 2004
avatar

Sounds good to me :)

EDIT: is something broken? I can't seem to access page 1 of this thread without changing the URL

Krzysztof Kluczek
Member #4,191
January 2004
avatar

Quote:

EDIT: is something broken? I can't seem to access page 1 of this thread without changing the URL

That's how the forums are constructed. This was brought up before, but it seems that ML is fine with it. :)

btw. CGamesPlay: You probably should sig compo site. :)

CGamesPlay
Member #2,559
July 2002
avatar

Quote:

That's how the forums are constructed. This was brought up before, but it seems that ML is fine with it. :)

The pager on the compact header bar works fine for me...

Quote:

btw. CGamesPlay: You probably should sig compo site. :)

I'll add it to the TODO :P

--
Tomasu: Every time you read this: hugging!

Ryan Patterson - <http://cgamesplay.com/>

Jonatan Hedborg
Member #4,886
July 2004
avatar

Also, if someone is intrested, here is the slightly improved version of my entry =)
I have (i think) improved the controlls and increased the difficulty slightly (its easier to make the yellow ball go where you want, but the grey ball is more dangerous now)

compile with gcc -O3 minorHack.c -o minorHack -lalleg

My highscore is 54.

Jakub Wasilewski
Member #3,653
June 2003
avatar

Hm, I've got 73 with the new version on my first try... overall, I liked the original compo version better. It's just not so fun when your ball simply goes where you want it to go :). The previous version required more skill and was more fun because of that, in my opinion.

---------------------------
[ ChristmasHack! | My games ] :::: One CSS to style them all, One Javascript to script them, / One HTML to bring them all and in the browser bind them / In the Land of Fantasy where Standards mean something.

Jonatan Hedborg
Member #4,886
July 2004
avatar

73 eh? Wallhack :(

Well, i got complaints that the game was to hard to controll before.
Perhaps i'll just keep the grey ball's movement and make the yellow one a bit more like before.

EDIT: yeah, perhaps you are right. Too easy now. I got 70 on the very next try.

Kikaru
Member #7,616
August 2006
avatar

16th works, that would be 1:00 EST... Sounds good! :)

Victor Williams Stafusa da Silva
Member #4,212
January 2004
avatar

Kikaru said:

16th works, that would be 1:00 EST... Sounds good! :)

It's ok for me too. Although I'm not sure if i will have some free time to participate.

[The attack of the space bugs - Speedhack 2005] [Rambananas - Speedhack 2006] [Make clean - Speedhack 2009] [The source god - TINS 2010]

Kikaru
Member #7,616
August 2006
avatar

Just one week till next MinorHack! Hey, I got a cool idea: You could keep an archive of the MinorHack winners. For the first one, you would put in KK and his strategy game. Then, you would just have a page to show all the winning entries, in the order the competitions were held.

CGamesPlay
Member #2,559
July 2002
avatar

http://cgamesplay.com/minorhack/competitions/past

Still in development, don't bother telling me what doesn't work.

--
Tomasu: Every time you read this: hugging!

Ryan Patterson - <http://cgamesplay.com/>

Zaphos
Member #1,468
August 2001

I was thinking a bit about code re-use -- I'm fine with the hack being opposed to code re-use, but it might be nice if it provided a template of general starter code that is 'okay' to use -- nothing game related, just the window setup and a standard logic loop. Writing that code for the 20th time just gets annoying.

I'm thinking something like this:

1#include <allegro.h>
2 
3bool quitnow = false;
4void Close() {
5 quitnow = true;
6}
7 
8int logic_time = 0;
9void logic_timer()
10{
11 logic_time++;
12}
13END_OF_FUNCTION(logic_timer);
14 
15// initialize systems!
16BITMAP* Init(int w, int h, const char *title) {
17 allegro_init();
18 install_mouse();
19 install_timer();
20 install_keyboard();
21 
22 set_color_depth(16);
23 if (set_gfx_mode(GFX_AUTODETECT_WINDOWED, w, h, 0, 0) != 0) {
24 set_color_depth(15);
25 if (set_gfx_mode(GFX_AUTODETECT_WINDOWED, w, h, 0, 0) != 0){
26 allegro_message("Couldn't set graphics mode!");
27 exit(1);
28 }
29 }
30 
31 LOCK_VARIABLE(logic_time);
32 LOCK_FUNCTION(logic_timer);
33 install_int_ex(logic_timer, BPS_TO_TIMER(60));
34 
35 set_close_button_callback(Close);
36 
37 set_window_title(title);
38 
39 return create_bitmap(w, h);
40}
41
42int main() {
43 
44 BITMAP *buffer = Init(640,480, "minorhack");
45 if (!buffer) {
46 allegro_message("Couldn't create back buffer");
47 exit(-1);
48 }
49
50
51 while (!key[KEY_ESC] && !quitnow) {
52
53 while (logic_time > 0) {
54 // game goes here
55 logic_time--;
56 }
57
58 // drawing goes here
59 blit(buffer, screen, 0, 0, 0, 0, SCREEN_W, SCREEN_H);
60 clear_to_color(buffer, makecol(255,255,255));
61 }
62} END_OF_MAIN()

I'd think that roughly that amount of code would be convenient without violating the spirit of the thing.

Jonatan Hedborg
Member #4,886
July 2004
avatar

I can agree with that. Though one in pure C would be nice as well (not that i usualy use C, but i currently take a course at uni so i try to use it for practice (like in last minorHack))

Krzysztof Kluczek
Member #4,191
January 2004
avatar

Zaphos: 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. :)

CGamesPlay
Member #2,559
July 2002
avatar

Whatever code base you agree upon, I will put it up.

--
Tomasu: Every time you read this: hugging!

Ryan Patterson - <http://cgamesplay.com/>

Krzysztof Kluczek
Member #4,191
January 2004
avatar

As I've said, no code base would be best when it comes to keeping the spirit of the compo. I'm OK with compatibility includes (like the one I've used during this compo) emulating certain Windows/Linux-specific functions on the other system, but IMHO the game should be written from scratch on at least one platform.

Here is the "base code" I've used for the compo. 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. :)

1#include <stdio.h>
2#include <stdlib.h>
3#include <string.h>
4#include <math.h>
5#include <time.h>
6 
7#include <allegro.h>
8#include "winalleg.h"
9 
10#include <vector>
11#include <string>
12#include <algorithm>
13using namespace std;
14 
15 
16int main()
17{
18 allegro_init();
19 install_keyboard();
20 install_mouse();
21 set_gfx_mode(GFX_AUTODETECT_WINDOWED,640,480,0,0);
22 BITMAP *buff = create_bitmap(SCREEN_W,SCREEN_H);
23 
24 unsigned long long t0,t1;
25 t0 = timeGetTime();
26 while(1)
27 {
28 clear(buff);
29 // rendering
30 blit(buff,screen,0,0,0,0,SCREEN_W,SCREEN_H);
31 
32 t1 = timeGetTime();
33 float delta = (t1-t0)/1000.f;
34 t0=t1;
35 
36 // logic
37 }
38 
39 return 0;
40}



Go to: