TINS 2016
Mark Oates
MiquelFire
Edgar Reynaldo
Niunio
GullRaDriel

I have a problem when I want to go to TINS's website from work...

Stupid proxy filters. I have no power over it.

{"name":"610341","src":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/f\/0\/f08ce5019d4c2c63ca2d5e145c662e0c.png","w":1272,"h":486,"tn":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/f\/0\/f08ce5019d4c2c63ca2d5e145c662e0c"}610341

Mark Oates

12 minutes and counting...

Niunio

Less than ONE minute!!! :o

amarillion

The rules are up!

What do we think of them? Easy? Tough? Confusing?

Chris Katko

I think it's going to be a little more tough than I anticipated. None of the rules have anything to do with my original ideas for a quick game. For example, I don't know anything about pathfinding algorithms.

Mark Oates

TINS 2016 Rules

Genre Requirement

1. Craftsmanship: The game is centered around crafting items out of components.

Artistic Requirements

1. Include dialog in poetic form (rhymed couplets, limerick, haiku) as much as you can
2. Include snow

Technical Requirements

1. path finding
2. use unicode to display non-english characters (e.g. russian, japanese). If you don't know any of these languages, that doesn't matter. Just use a phrase.

Bonus Rule

1. Act of Formaldehyde: you can opt out of a rule if instead you decide to follow three other rules from a previous Speedhack/TINS. The rules page containing those rules should still be up for all to see.

___

What do we think of them? Easy? Tough? Confusing?

Nice! It took me about 15 minutes to figure out what to do with it, so you have to be a bit creative.

For example, I don't know anything about pathfinding algorithms.

I plan to implement the absolute most basic path finding to meet the requirement. ;D

MiquelFire

It was really hard to read the rules on my phone, as the pre tags (I assume, didn't look at the code) make the font REALLY small compared to the rest of the text. And the rules cause a horizontal scroll on my desktop... (Which explains the small text on my phone). Might want to change that up for next time.

The quick plan I came up with, the core game combines the craftsmanship, poetic form, and unicode in one concept. The path finding might define how I make the core game.

Snow would mainly use the rule from sh2015 about particles, so that's two rules for the bonus I'm using. I forget which speedhack has the screen Independence rule however, but every game I made since that one used that rule anyway... so... Anyway, if I hate the unicode rule enough, I'll hunt another rule to use.

Niunio

Genre Requirement

1. Craftsmanship: The game is centered around crafting items out of components.

Last week I was thinking about Minecraft-style games. Now I'm wondering if it would be possible to do one in two or three days.

Besides that, I have no idea about what can I do.

Mark Oates
Niunio said:

Last week I was thinking about Minecraft-style games. Now I'm wondering if it would be possible to do one in two or three days. Besides that, I have no idea about what can I do.

I'm taking the simplest approach and just allowing you to combine certain two items into a new item. But that's it. 1+1 on only a few items.

Any n+n combination is going to get out of hand.

Also, combining items doesn't have to mean inventory... you could trigger two blocks on the game field and spawn a sword. :)

amarillion

I don't know anything about pathfinding algorithms.

You could read up with the link I provided, but admittedly A* is a lot to take in if you have to start from zero.

But you can simply move your guy from A to B in a straight line. Or make him walk randomly until he stumbles upon the goal. It's not very advanced, but it would meet the requirements.

Chris Katko
Quote:

That's weird. All I see is my wife's webcam website.

Mark Oates

But you can simply move your guy from A to B in a straight line

niiiiiiiiiice 8-)

Arvidsson

Oh I really want to participate but I don't think I will have time this weekend :( I will try though.

Edgar Reynaldo

Okay, I've been looking for a font character viewer so I can tell whether or not a given font contains the characters I need. I'm trying to display some Kanji that I've already translated and found the unicode decimal values for, but none of the font or character viewers I've tried even remotely works right.

What are you guys using? I'm just trying to get a dumb splash screen done. Halp!!!

MiquelFire

Maybe the one I'm using? Look in my repo.

Edgar Reynaldo

I have the font I want, I just need to figure out if it supports the characters I want to use.

amarillion

Try FontForge. At least that works on linux.

Edgar Reynaldo

Okay, FontForge works decently. It turns out the font I downloaded doesn't support Ideographs, and neither does MiguelFire's font. I need something that supports Kanji.

I found a font called Kudou that supports the characters I need, but it's over 4MB!!! With my library included that's way too big!!!

Mark Oates

Fonts are big.

Edgar Reynaldo

With static linking I got my total down to 4.6MB. That gives me room for some jpgs.

I'm having trouble getting my unicode to display properly though. I've never used ALLEGRO_USTR's before. Here's the code I am using :

   ALLEGRO_USTR* ustr_title = al_ustr_new("");
   al_ustr_append_chr(ustr_title , '\u96EA');
   al_ustr_append_chr(ustr_title , '\u7537');
   
   int x,y,w,h;
   al_get_ustr_dimensions(kudou_font->AllegroFont() , ustr_title , &x , &y , &w , &h);
   
   al_draw_ustr(kudou_font->AllegroFont() , al_map_rgb(255,0,0) , (ww - w)/2 , (wh - h)/2 , 0 , ustr_title);

The source file is encoded as UTF-8.

What am I doing wrong? The text I am trying to draw is not visible.

This doesn't work either :

   char buf[1024];
   memset(buf , 0 , sizeof(char)*1024);
   
   int nbytes = al_utf8_encode(buf , '\u96EA');
   nbytes += al_utf8_encode(buf + nbytes , '\u7537');
   
   al_utf8_encode(buf + nbytes , '\0');
   
   ALLEGRO_USTR* ustr_title = al_ustr_new(buf);

EDIT
I got it to work. Instead of using unicode literals, I used the hexadecimal values. Ie. This works :

   char buf[1024];
   memset(buf , 0 , sizeof(char)*1024);
   
   int nbytes = al_utf8_encode(buf , 0x96EA);
   nbytes += al_utf8_encode(buf + nbytes , 0x7537);
   
   al_utf8_encode(buf + nbytes , '\0');
   
   ALLEGRO_USTR* ustr_title = al_ustr_new(buf);

Elias

What's wrong with just using normal strings?

char x[1024] = "春過ぎ";
strcat(x, "て");
al_draw_textf(..., "%s", x);

Will print: 春過ぎて

Edgar Reynaldo

I didn't think that al_draw_text could draw unicode characters? How does it know which encoding to use? Wouldn't it just interpret it as ascii?

Elias

UTF8. All of Allegro's strings are UTF8 - so as long as your text editor is set to UTF8 it will work. Other than that you need to be careful though - functions like strlen() or strcat() will work as all they care about are 0-bytes in the string, and UTF8 is compatible with ASCII there. Other things will not work in general, so there is a point where you will want the al_ustr_* functions instead. But for simple things you don't have to :)

Mark Oates

Holy crap I've been coding for about 14 hours straight.

Game's coming along pretty smoothly :). How you guys holding up?

Niunio

Everybody goes Japanese. I think I'll go Russian. 8-)

Quote:

That's weird. All I see is my wife's webcam website.

I didn't put that webcam. Really! :(

Chris Katko

TINS Update:

God, I suck. O_O

I've gotten so rusty with game programming and my health problems keep getting in the way. I've only put ~1.5 hours in so far and I need to take a break.

amarillion

Mid-speedhack crisis is starting to kick in for a few people. It's natural around this time. Things might seem overwhelming at this point, all the things you have planned and no time to do all of them.

Don't give up yet!

It's a matter of properly scaling your plans. Miran Amon succeeded in creating a second-place entry with just one day of coding.

Elias is still planning to submit with just a few hours of spare time, and I'm hoping he succeeds.

Adjust your targets. Anybody can write hangman in 2 hours. With the proper dressing up, you can make hangman fit the rules as well: Hangman is crafting a scaffold. The word you look for is the last word of a poem. It's a poem about finding your path in life. The win / game over message is in russian. There is a snow particle effect in the background. Ok, so it might not be a winning entry. Submitting a complete game is its own reward.

kenmasters1976

Been following the logs, I'm impressed to see how you guys can do so much in such a little time.
I got a late start together with lack of skill and lack of ideas. Gave up after I couldn't get my collision detection right.

Good luck to everyone.

Johan Halmén

I never had time to participate, though I was probably the first to sign up.
But here's my rhyme dictionary for anyone, who hasn't started with the dialog yet.

GullRaDriel

Haa yes, that was a good night ! Down @ 2h22 of the morning, but it works !

3H50 before the end, and still a lot to do !! Keep going guys !

Edit: Deadline is soon, I submitted !!

Donc't wait and give what you have !

Niunio

I did a point'n'click with only one puzzle, but it has all rules. Did I win yet? ::);D

GullRaDriel

Mark, where can I find allegro_flares.h ?

Mark Oates

AllegroFlare is my framework/library. You'll need to compile the project from source - I made a 0.8.7.tins release here). The TINS game + allegro_flare will only work with Allegro 5.2.0.

If you plan on building, please let me know what problems you run into. :) I'm wanting to make building AllegroFlare as seamless as possible before 1.0.

When I put up my game thread, I plan to have builds.

GullRaDriel

I ran into problems. I stopped for now.

Mainly:
Added
#include <stdio.h>
#include <string.h> to include/allegro_flare/attributes.h

Quoted al_set_new_bitmap_depth in ElementID *ElementIDManager::get_element_by_id(std::string id) line 47 (What does it do here ?)

added #include <iostream> to include/allegro_flare/clipboard.h

Edit: and obligatory changed the makefile includes, path error else:
LIBS_ROOT=.
ALLEGRO_DIR=$(LIBS_ROOT)/allegro5
ALLEGRO_LIB_DIR=$(ALLEGRO_DIR)/build/lib
ALLEGRO_FLARE_DIR=./include
ALLEGRO_FLARE_LIB_NAME=allegro_flare-$(ALLEGRO_FLARE_VERSION_STR)
INCLUDE_FLAGS=-I$(ALLEGRO_DIR)/include -I$(ALLEGRO_FLARE_DIR)

Else allegro-flare itself would not compile.

See you tomorrow !

Mark Oates

Quoted al_set_new_bitmap_depth in ElementID *ElementIDManager::get_element_by_id(std::string id) line 47 (What does it do here ?)

*Smacks self on head*

Can't believe I left that in there.

Also, that means you're not using Allegro 5.2.0. In order for the game to work it needs features in that version (namely the al_set_new_bitmap_depth())

Quote:

added #include <iostream> to include/allegro_flare/clipboard.h

Oh good catch. Actually, that should probably go in source/clipboard_generic.cpp.

Edgar Reynaldo

I got tied up with personal problems. No entry for me this year. :/

Chris Katko

I got tied up with personal problems. No entry for me this year. :/

:/

I ended up with a bunch of health issues. I put maybe four hours in. Was playing around with a GTA-style game but more puzzle, with trying to drive through obstacles / parking lots without getting in an accident.

I haven't given up on it, but I've come to realize how little "free time" I really have even when I'm truly interested in a project.

Thread #616257. Printed from Allegro.cc