![]() |
|
2007 Allegro ScreenHack, 80x25 compo |
HardTranceFan
Member #7,317
June 2006
![]() |
Quote:
Mika Turunen said: Everybody polishing their entries or lost their interest already? The second. I'm thinking about another attempt. -- |
Skywhy
Member #9,243
November 2007
![]() |
Too bad, I ended up messing my entry blargh... Would require some serious redoing of things if I wanted to get it in shape for real. things that are missing:
I'm not entirely sure does this qualify for an compo entry but here goes. http://users.evtek.fi/~mikaka/temp/bShot.png and here is the code:
It really did seem much more awesome in my head than it ended up being. I guess it's a pathetic attempt at some sort of shoot em up/rhythm game without music. How do you like that? You can get the exe file from here with the alleg42.dll. Only for Win. Controls:
Game idea: I had my share of fun tinkering with this. Also, since it really doesn't have any sort of "logic locks", only the rest(10), the results are that the game performance will vary on different machines ALOT. On some it's playable and on some it's not. Too bad. Also since the bullet collision ain't that good, it might miss some of the hits you do Another thing I again noticed was that good variable names are awesome. I ended up doing alot of one letter/two letter variables to save up space and other even more stupid things to save up chars. Man this compo was nuts. Oh yeah, final note: guys, your entries are awesome. I can't believe you came up with stuff like that. It really shows that in a small compo like this, the game idea is everything. |
Tomasz Grajewski
Member #4,284
February 2004
|
I've made another pong version, this time more playable and challenging:
___________________________________________________________________________________________ |
Matthew Leverton
Supreme Loser
January 1999
![]() |
Structures, variables with more than one letter, ... you guys are wasteful! |
Tomasz Grajewski
Member #4,284
February 2004
|
Matthew Leverton said: Structures, variables with more than one letter, ... you guys are wasteful! Yeah, I know, now I'm trying to minimalise mine code. BTW, love C++ for things like that: From if(y<r) { y=r; vy*=-1; } if(y>s->h-r) { y=s->h-r; vy*=-1; } to y=y<r?vy*=-1,r:y>s->h-r?vy*=-1,s->h-r:y;
Four bytes saved ___________________________________________________________________________________________ |
Matthew Leverton
Supreme Loser
January 1999
![]() |
Does C++ explicitly define what happens in the case of: int a = b ? c, d : e, f; ? |
Tomasz Grajewski
Member #4,284
February 2004
|
Quote:
Does C++ explicitly define what happens in the case of: The comma separated values are evaluated from left to right, so d or f will be returned for a, if this is what you ask for. The ternary conditional is evaluated from right to left. ___________________________________________________________________________________________ |
Matthew Leverton
Supreme Loser
January 1999
![]() |
I was just wondering if the commas are well defined sequence points in that example, but I suppose they are. They aren't in function calls (e.g.: f(a(), b(), c())), but obviously that's a different situation. |
Karadoc ~~
Member #2,749
September 2002
![]() |
Næssén and Ted, your game is awesome. 80x25 or not, that game is really good.
----------- |
Skywhy
Member #9,243
November 2007
![]() |
Tasty update of not so tasty "game" ...
Compiling the code gives pile of warnings since I had to cut through loads of things to even get this much done... I know there is room for even more improvements but the current improvements popped into my head last night. Added features:
Things I should redo:
I don't know, it's still not good but heyh.. got atleast something done. Might do even more updates on it. Don't know at the moment. Oh yeah, and you feel like just playing it, you can get the updated exe + alleg42.dll from here. |
HardTranceFan
Member #7,317
June 2006
![]() |
Here's my second game. It's a side scroller shoot-em-up. You're the green triangle, and you must avoid the grey cavern walls and shoot as many yellow orbs as you can before you crash. Control is with the mouse, left button to fire.
{"name":"595290","src":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/b\/8\/b85d32d32803630ad64ce5068b61d9a6.jpg","w":645,"h":504,"tn":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/b\/8\/b85d32d32803630ad64ce5068b61d9a6"} -- |
Thomas Fjellstrom
Member #476
June 2000
![]() |
Quote: ZOMG!!!! Spare space!!! What a waste of [binary] trees!! ZOMG! What a waste of corn! -- |
Tobias Dammers
Member #2,604
August 2002
![]() |
Attached is a little tool that takes some of the tedious work off your shoulders. What it does:Reads a C or C++ source file, removes all unnecessary stuff (whitespace unless absolutely needed, comments), renames all identifiers that start with a dollar sign into the shortest possible set of identifiers (first a single underscore, then a through z, then A through Z, then combinations of these plus digits; most-often-used identifiers get the shortest names), replaces character literarals by their numeric counterparts (because for everything below 100 the latter are shorter, above 100 they're equally long), formats the whole thing to max. 80 characters wide, and sends it to stdout. How to use:
1. Unzip into a folder of your choice. For example, my attempt at (yet another) snake:
...is converted into this cryptic mess:
BTW, that game lacks some very basic features like edge collision (or proper wrapping), but hey, I still have 10 lines left. -- edit -- Oh, and one more thing: C has this "nice" feature called "weak typing", which enables you to do things like this: int b = create_bitmap(256, 256); int c = "Hello world!"; In other words, pretty much anything can be an int. --- |
Matthew Leverton
Supreme Loser
January 1999
![]() |
I just edit my code exactly as you see in the 80x25 box. I never use whitespace anyway since I end up just sitting there all day wondering if I should use tabs or spaces. |
Tobias Dammers
Member #2,604
August 2002
![]() |
You mean like this? --- |
nonnus29
Member #2,606
August 2002
![]() |
No more entries? Some one needs to take us into the 3rd dimension with ray casting Castle Wolfenstein in 80x25.... |
HardTranceFan
Member #7,317
June 2006
![]() |
Given this thread is still open, I may have a crack at another idea... -- |
BAF
Member #2,981
December 2002
![]() |
A raycaster in 80x25? |
kenmasters1976
Member #8,794
July 2007
|
This weekend I tried to turn my Tetris into 3D, but the Allegro 3D functions have long names and you have to call plenty of them, plus the vertex definitions and it easily went beyond the 25 lines. Even blitting from the buffer to the screen was annoying and the result wasn't even that great, not to mention how much slower it became, so I did quit. Screenshot:
|
Jakub Wasilewski
Member #3,653
June 2003
![]() |
Quote: No more entries? Some one needs to take us into the 3rd dimension with ray casting Castle Wolfenstein in 80x25.... Didn't Krzysztof Kluczek do exactly that for the previous ScreenHack? --------------------------- |
nonnus29
Member #2,606
August 2002
![]() |
I think he did 'ray tracing' in one line actually. For raycasting, you only need to draw a line... repeatedly. |
James Stanley
Member #7,275
May 2006
![]() |
Bit late, but here's what I've worked on today and yesterday:
Controls are Left and Right arrow. ESC to quit. http://stanley.homelinux.org/images/80x25.png EDIT: |
madpenguin
Member #2,201
April 2002
![]() |
Hmm...I'll play! I can't really work on it until I get home and don't have an idea anyway, but I have been thinking about some shortening tricks I haven't seen anyone do yet. In particular, I haven't seen anyone do something like this: #define I int I(*DS)(I,I,I,I)=draw_sprite;I(*CB)(I,I)=create_bitmap; /* and later on in your code */ BITMAP *b; b=CB(64,64);DS(screen,b,1,1); If you have a lot of calls to draw_sprite() or create_bitmap(), this might be a pretty significant space savings. This should save people from burning the first few lines on #defines (a cautionary note: this WILL generate warnings, at least with gcc) May entries assume that they'll be run from the same directory the source file is in? I have some asset generation stupidity in mind... --------------------------------------------- |
Matthew Leverton
Supreme Loser
January 1999
![]() |
Quote: #define I int A waste of space. You lose 80 characters to save 2 bytes. Are you going to use int over 40 times? All variables should be global and then you only need one int. And all functions default to returning int with int parameters. Almost every #define is a waste. Quote: I(*DS)(I,I,I,I)=draw_sprite;I(*CB)(I,I)=create_bitmap; Again, how often do you really call those functions? I created a Tetris game with a single rectfill and a single blit. |
madpenguin
Member #2,201
April 2002
![]() |
I actually have something somewhat sprite-heavy in mind; there might be a lot of calls to draw_sprite() (although the same trick would work for any routine with a long name and argument list that gets called a lot). I'm not sure if this will save me space or not, although it seems like it might (and yes, I agree that #defines are a huge space waster). I didn't know that all functions defaulted to int arguments, though, that might come in handy. I haven't quite cooked up a strategy for encoding stick figure animations yet; the game I'm envisioning might not even be possible... --------------------------------------------- |
|
|