Allegro.cc - Online Community

Allegro.cc Forums » Off-Topic Ordeals » TINS code sharing

This thread is locked; no one can reply to it. rss feed Print
 1   2 
TINS code sharing
amarillion
Member #940
January 2001
avatar

TINS 2016 is a crazy 72h game programming competition, which will be held from May 13 to 16. Registration is still open, there are 15 entrants at this time of writing.

This is a competition about creativity, clever shortcuts and resourcefulness. This is not a competition about having memorised the call signatures of the allegro initialisation functions. You may re-use any chunks of useful code: display setup, a main loop, tilemaps etc, as long as you can legally do so (open source, your own) and is available online at least two weeks before the start of the competition.

That last bit was added to ensure a level playing field. I think most experienced participants simply take an old submission, strip it to an empty hull, and then start building up a game from that. New entrants could benefit from having some framework code available.

If there is any code you plan to re-use, you could post it in this thread. I will post mine shortly.

I don't expect a whole lot of this code to be copied, but maybe more than you think - I have looked at code shared this way in the past, and copied bits for my own entries now and then.

By the way, I discourage allegro 4 if at all possible (even though it's still allowed).

GullRaDriel
Member #3,861
September 2003
avatar

I will have to build all allegro 5 related code and my framework is already online.
;D

"Code is like shit - it only smells if it is not yours"
Allegro Wiki, full of examples and articles !!

amarillion
Member #940
January 2001
avatar

Feel free to share a link :)

(There is no obligation, it just has to be "easily accessible")

Peter Hull
Member #1,136
March 2001

strip it to an empty hull

This Hull isn't stripping for anybody :P

Dizzy Egg
Member #10,824
March 2009
avatar

This Hull isn't stripping for anybody

Damn shame.

As for TINS...well heck...I'm in 8-)

----------------------------------------------------
Please check out my songs:
https://soundcloud.com/dont-rob-the-machina

Niunio
Member #1,975
March 2002
avatar

I'm working on Allegro.pas 5.2, but I think I'll not have a barely stable release before the 2 weeks line. I'm uploading it to the SVN. Does it count if I commit an update one day before the contest?

Anyway, I have a 3D engine that works with the previous beta version (5.0), and it's available here. I'm not sure if it works with current SVN.

-----------------
Current projects: Allegro.pas | MinGRo

Gideon Weems
Member #3,925
October 2003

I join these things specifically to get away from code reuse. Doing so liberates me.

Gassa
Member #5,298
December 2004
avatar

I am doing a couple of learning projects using D programming language and Allegro 5 library with my high school students. Some of us may reuse the few bits we have at -2weeks time if we actually enter the competition.

Mark Oates
Member #1,146
March 2001
avatar

So I'll most likely be using bits from AllegroFlare, and stuff in flare_bootstrap.

I just added the shadow mapping code (it's nasty don't look at it), since the whole point of doing that was to be able to have pretty graphics and be under the 500kb limit for this compo. ;) That and procedurally generated wood textures. I'll probably be cleaning up that code over the next week. :)

SiegeLord
Member #7,827
October 2006
avatar

I'm going to rip out the engine out of my LudumDare 34 entry and use that as the base of my new game (it's mostly an ECS thing... it doesn't even have audio handling...): https://github.com/SiegeLord/Polytree

Also I'll be using https://github.com/SiegeLord/RustAllegro.

"For in much wisdom is much grief: and he that increases knowledge increases sorrow."-Ecclesiastes 1:18
[SiegeLord's Abode][Codes]:[DAllegro5]:[RustAllegro]

Edgar Reynaldo
Major Reynaldo
May 2007
avatar

I just signed up. I'll probably be using my Eagle 5 library. You can find it here :
(I moved it to BitBucket, and it's in a GIT repo now ;) )
https://bitbucket.org/bugsquasher/eaglegui

I'm working on it non-stop these days. Can I use everything I write between the 2 week cutoff and the competition?

amarillion
Member #940
January 2001
avatar

Great stuff.

I'll probably be re-using mostly the code from laundry day, my TINS 2012 entry. It's my most feature-rich game so far, with tilemaps, moving platforms, animated sprites and a few other goodies.

I've attached the most recent version. Since 2012 I've continued development on it. The platforms is a recent addition for example. But by far the biggest change is that I've ported the game to Allegro 5, and that's the biggest reason for posting this code. It's almost 9000 LOC.

To compile the attached source you'll also need Tegel (see sig). But if you just want to have a play, you can also get the windows binaries at my website

Niunio said:

Does it count if I commit an update one day before the contest?

That's fine. I'm not going to be strict about library code, especially if it's in a public version controlled repository. It seems unlikely to me that you could do a lot of "cheating" here.

Can I use everything I write between the 2 week cutoff and the competition?

Same applies here. Try not to write too much code specifically targetting TINS :)

Gassa said:

with my high school students

They're welcome to sign up if they want. Do you think they'll want to write log entries?

Edgar Reynaldo
Major Reynaldo
May 2007
avatar

Amarillion said:

Can I use everything I write between the 2 week cutoff and the competition?

Same applies here. Try not to write too much code specifically targetting TINS :)

Mostly I'm just writing GUI code. No tilemaps, no game engines, or anything like that.

Chris Katko
Member #1,881
January 2002
avatar

I'm going in raw. 8-)

-----sig:
“Programs should be written for people to read, and only incidentally for machines to execute.” - Structure and Interpretation of Computer Programs
"Political Correctness is fascism disguised as manners" --George Carlin

Niunio
Member #1,975
March 2002
avatar

You're The Man, Chris.

-----------------
Current projects: Allegro.pas | MinGRo

Mark Oates
Member #1,146
March 2001
avatar

What are the hours for the compo? (so I can ask for time off)

amarillion
Member #940
January 2001
avatar

It starts Friday at noon GMT and ends Monday at noon GMT

In North America, noon GMT means Friday morning, so you'll probably want to take all of Friday off if you want to maximise hacking time.

What you want to do on Monday depends if you expect to be hacking through Sunday night into the early morning or not.

Gassa
Member #5,298
December 2004
avatar

Gassa said:

with my high school students

They're welcome to sign up if they want. Do you think they'll want to write log entries?

Let's just say log entries are not the hardest part for us at this stage :) .

GullRaDriel
Member #3,861
September 2003
avatar

I always pick things from there: http://members.allegro.cc/GullRaDriel/ ; Updated since last compo.

I mostly reuse code for lists, hash tables, networking/threading.

I like to start from scratch, + if I switch to A5 for this compo it'll be easier for loading various things.

Good luck to you all :-)

"Code is like shit - it only smells if it is not yours"
Allegro Wiki, full of examples and articles !!

amarillion
Member #940
January 2001
avatar

I usually don't start from scratch.

Last speedhack 2015 was a big exception. I wanted to make the switch to Allegro 5, and I had no Allegro 5 code to speak of. So I had to. The only code I re-used was from allegro examples.

I guess it was good to prove that I could start from scratch if I wanted to. Now I have proven that, there is no need to do that anymore :)

Chris Katko
Member #1,881
January 2002
avatar

For the longest time, I never realized most people don't start from scratch. A year or two ago I read an article that said, "If you don't already have an existing framework of your own code before starting an indie game, you should use an engine, because otherwise you're not going to finish your game because it's already extremely hard to finish a game."

I'm still debating whether or not I should write my TINS in D or C++. I want to learn more D. But I'm proficient with C++ to the point I can code without thinking for large portions which means I have a much higher chance of producing something notable or at least finishing! I've never actually done any competition before! And my health situation means I'm only going to have 8-10 hours to make the game anyway so I know I need to pick a very focused, small, game to implement.

-----sig:
“Programs should be written for people to read, and only incidentally for machines to execute.” - Structure and Interpretation of Computer Programs
"Political Correctness is fascism disguised as manners" --George Carlin

amarillion
Member #940
January 2001
avatar

I can see it go either way.

You can use TINS as a lever to learn D better. Or you can focus on productivity and stick with C++.

8-10 hours is not much. I'd probably recommend you to use C++ to get the most out of those hours. But at the same time, you have to decide what is going to keep you motivated.

Bruce Perry
Member #270
April 2000

But I'm proficient with C++ to the point I can code without thinking for large portions

If you're anything like me, a lot of that 'without thinking' time is actually busy work, putting together boilerplate or otherwise doing something that in D you just wouldn't need. The process may feel rewarding at the time, but you are in danger of 1. not actually being as productive as it feels and 2. losing the ability to learn new tricks. Once I figured this out and got into the habit of thinking properly at all times, I was able to achieve much more in pretty much every project (in any language). It does take time and effort to rebuild that habit though. :)

--
Bruce "entheh" Perry [ Web site | DUMB | Set Up Us The Bomb !!! | Balls ]
Programming should be fun. That's why I hate C and C++.
The brxybrytl has you.

amarillion
Member #940
January 2001
avatar

If you're anything like me, a lot of that 'without thinking' time is actually busy work

There is that, but there is also the ability to write code without having to look up things from the standard library and details about the syntax.

For example, if you asked me to write some code to match a regular expression against some string, get a substring, do some other string manipulation - I could write that code in Java right now, within minutes, without having to look up anything.

If I had to write the same in Python I could probably do it, but it'd be a lot slower. That's not because you have to write a lot of boiler plate code (far from it!). But I'd have to look up a few things, and I'd probably introduce a couple of syntax errors on the first try. I've done a lot of Java work recently and I've got it fresh in memory.

Gideon Weems
Member #3,925
October 2003

I was looking through past entries. TINS uses the same pool of rules as SpeedHack, right? There are some good ones.

 1   2 


Go to: