|
2007 Allegro ScreenHack, 80x25 compo |
kenmasters1976
Member #8,794
July 2007
|
Well, it was hard enough for me to make this 80x25 code. Anything under that is obviously out of my league.
|
Matthew Leverton
Supreme Loser
January 1999
|
The 20 line competition was different because it went by semicolons. Some people cheated by using commas as semicolons, but I avoided that. http://www.matthewleverton.com/misc/20lines.html I think 80x25 is a harder challenge simply because there is a finite limit to the number of characters you can use. (Compare that to my line 7, which is quite long.) |
Næssén
Member #5,025
September 2004
|
And here is my and Ted's entry for the competition. For you who haven't played Cursor*10 the game probably needs some instructions. The goal of the game is to get as high score as possible.
At most levels you need to click more than one blue box and/or push more than one red circle in order to unlock the door to the next level. It may seem tough at first, but you'll get help as the game progresses. Oh, and one more thing, when the time is up you loose a life and have to restart from the first level.
Edit: We managed to squeeze in a small pause between rounds. _____________________ |
MiquelFire
Member #3,110
January 2003
|
@kenmasters1976: Dude, that has maybe the most awesome bug/misfeature I have ever seen in a Tetris game! Don't like the piece you got, just toss it off to a side. --- |
Vanneto
Member #8,643
May 2007
|
I am currently enjoying some sun in Croatia. I already made something before I left, I'll post it when I come back in Saturday. One question, must all of the 80x25 space be filled with code or can there be gaps in between? I'm just wondering. In capitalist America bank robs you. |
Kikaru
Member #7,616
August 2006
|
Use comments like this: codecodeblah//comment!
or codecodeblah/////////
to pad your lines. Ideally, the finished program's code will all be in a rectangle, 80 characters wide by 25 lines high. Or, if you wish, less than 25 lines high. |
kenmasters1976
Member #8,794
July 2007
|
Quote: @kenmasters1976: Dude, that has maybe the most awesome bug/misfeature I have ever seen in a Tetris game! Don't like the piece you got, just toss it off to a side. I know... I ran out of space for coding. I may try to fix that later... maybe.
|
Neil Black
Member #7,867
October 2006
|
I've only managed to compile the tetris game, the rest give me errors.
|
Seppl
Member #4,656
May 2004
|
Now with deallocation of the buffer bitmap.
EDIT: __________________________________ |
Næssén
Member #5,025
September 2004
|
We didn't think we would be able to squeeze more stuff into our game, but we did! We added some eye candy in the form of a shake effect when clicking boxes. Also, I've attached a pre-compiled binary. See my previous post for game instructions.
Neil Black said: I've only managed to compile the tetris game, the rest give me errors. What was your error with our entry? The game has to be compiled with C, not C++. _____________________ |
Arvidsson
Member #4,603
May 2004
|
Wow, I actually finished something and it was fun too! Move left and right with arrowkeys, use X to jump and double-jump in midair and Z to boost yourself even higher up in the air. You get the boosts when collecting the coins. You win when all coins are collected and you lose if you fall off the screen. Should compile in both C and C++. Oh and press R to generate a new level.
{"name":"595181","src":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/e\/7\/e703b0e31767c4718ab280baa62362f5.png","w":323,"h":336,"tn":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/e\/7\/e703b0e31767c4718ab280baa62362f5"} edit: Oops, seems my entry is 79x25. Scite fooled me.
|
Jeff Bernard
Member #6,698
December 2005
|
Quote: It may seem tough at first, but you'll get help as the game progresses. Is the help those other cursors that appear? At first I thought I had lagged the game really bad or something because the second cursor appeared to do exactly what I had done on the first level. -- |
BAF
Member #2,981
December 2002
|
I need an idea for a game to write. |
Ted Steen
Member #9,736
April 2008
|
Jeff Bernard said: Is the help those other cursors that appear? At first I thought I had lagged the game really bad or something because the second cursor appeared to do exactly what I had done on the first level. Yes, that's your mouse from the previous round helping you. You need to do some clever cooperation with yourself to get the high scores!
Edit: |
Næssén
Member #5,025
September 2004
|
Ted Steen said: The current world record is 1510 points, I reached level 11. (see attachment) I beat your record Ted, 2720 points and I reached level 14! _____________________ |
Jeff Bernard
Member #6,698
December 2005
|
Quote: I beat your record Ted, 2720 points and I reached level 14!
pwned: 3139, level 15. It may just be a quick hack, but it's a really fun game.;D -- |
kenmasters1976
Member #8,794
July 2007
|
Updated mine too. Tweaked the drawing code, reduced almost all variable names to single letter ones and replaced all Allegro constants with numbers to save space and have room to improve it. I made the playfield 10 blocks wide as usual in Tetris games - this also fixed the problem that MiquelFire mentioned (and likely created new ones). Also added the features I couldn't include in the previous one and reduced window size to fit just the game area.
{"name":"595180","src":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/5\/7\/57c86258f645a0ce3fed379913e2afa0.gif","w":261,"h":431,"tn":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/5\/7\/57c86258f645a0ce3fed379913e2afa0"}
|
Næssén
Member #5,025
September 2004
|
kenmasters1976, your tetris game is really starting to shape up. The only thing I miss is a score counter. Jeff Bernard said: 3139, level 15 I'm impressed. _____________________ |
Ted Steen
Member #9,736
April 2008
|
Kenmasters1976, That is one squeezed game of tetris! but you could double the fun with a score counter! My suggestion is to replace these defines with functions instead. #define B() blit(O,screen,0,0,0,0,640,480) #define RF(c) rectfill(O,xo+j*16,yo+y*16,xo+j*16+16,yo+y*16+16,c) will turn into something like this Now you can almost fit them into one line. A few minor optimizations would be to replace int DL(int xo,int yo,int y,int d,int c,int sc) with *DL(xo,yo,y,d,c,sc) Now... that should be enough for a score counter |
Arvidsson
Member #4,603
May 2004
|
What the hell is wrong with me? Another entry, that is what's wrong with me. ARE YOU UP TO THE TASK TO TAKE COMMAND AND DODGE FUNNY LOOKING ASTEROIDS? Steer your spacecraft with arrowkeys. Reset with R. Quit with ESC. Every 15 seconds the difficulty level is increased which means more asteroids (or space balls if you'd like) to dodge. The maximum level is 10 which means 50 asteroidballs onscreen at ALL times. I almost made it to level 5, level 10 must be hell I suppose (only hardcore gamers need apply ). The blue box on the ship (aka the cockpit) is the hit area.
{"name":"595186","src":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/9\/0\/90c88f30bfdf23fdcc43fd926665e9aa.png","w":403,"h":430,"tn":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/9\/0\/90c88f30bfdf23fdcc43fd926665e9aa"} This contest will be the end of me, I already have a new thingy I want to implement. Curses, programming is supposed to be boring, no? edit: I actually got to level 7 and discovered a cheat which is fixed now.
|
Paul Pridham
Member #250
April 2000
|
Quote:
*B(){blit(O,screen,0,0,0,0,640,480);} Why is everyone prefixing their K&R-style default functions with a * ? I don't see the purpose... you're returning no value (especially not a pointer to int) and wasting a character in your code. ---- |
Ted Steen
Member #9,736
April 2008
|
ppridham said: Why is everyone prefixing their K&R-style default functions with a * ? I don't see the purpose... you're returning no value (especially not a pointer to int) and wasting a character in your code. You are right, I just assumed that you needed to specify the return type, and * is smaller than void. C is not my "native language" Yay! Now we have four more characters to play with!! Olof - let's add network support! |
Kikaru
Member #7,616
August 2006
|
Urg, I had an idea, but it was really boring compared to these... I'm starting over now. |
Matthew Leverton
Supreme Loser
January 1999
|
Tetris {"name":"595191","src":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/8\/9\/8975a23dbdf433e7ee0863aff039dacd.png","w":304,"h":388,"tn":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/8\/9\/8975a23dbdf433e7ee0863aff039dacd"}
Controls are a bit sluggish and scoring for pressing the down key is generous (especially if you bump against the side), but it's good enough for demo #1. Change GFX_GDI to the constant for windowed mode if you aren't on Windows. It also assumes integers are 4 bytes. |
Mokkan
Member #4,355
February 2004
|
Those of you making Tetris should figure out a way to use more color . I'd love to try this, but I'm not sure if I could come up with anything. Perhaps I'll give it a go anyway...
|
|
|