All assignments have been sent to all who joined this event. Our list got up to 10! KrampusHack is officially underway!
The Details:
Hello, I am your KrampusHack commissioner. Feel free to ask me any questions in the form of a private message. At the end, you will send your game to me and I will pass it along to your recipient.
Participants:
Mark Oates
Edgar Reynaldo
Eric Johnson
Elias
Amarillon
SiegeLord
Vanneto
m c
Takaaki Furukawa
Derezo
Title: KrampusHack
SantaHack is a little better planned and structured. The concept here is same (to gift a game), but the definition of this event has come almost entirely from sheer spontaneity. As such, this event is SantaHack's cousin, KrampusHack.
Late Registration:
Anyone can join at any time and will register by PM'ing me directly. You may or may not receive a gift and the gift you make will be delivered to someone randomly in the group of official participants above.
Due Date:
You have to have your game turned in to me (via PM) by 2:00pm Central Standard Time on Saturday, December 24th. I will send the games out shortly after through PM. Merry Christmas and Bah Humbug too!
Your assignment:
Try to use allegro, but if struggling, use whatever you want. Make a game! I will provide any information I can on your assigned person as discussed from this thread. Personalizing your game for the receiver is also recommended but not required.
Keep your game gift a secret! Play it and spend some time to write a thoughtful review. Send the review back to the secret santa (via me, if your secret santa never revealed their identity). Try to do so before January 1, 2017. On January 1, 2017, everyone please post your game on the allegro.cc Depot!
The original thread: https://www.allegro.cc/forums/thread/616631/3
🎉
I thought GullRaDriel was participating too....
EDIT
I made an avatar pack that you can plug into your game to use anyone's avatar from the competition.
Zip file contains
Avatars.hpp Avatars.cpp data/ avatarpacks/ avatarpack160/* avatarpack64/* avatarpack32/*
Each avatarpack contains all 10 participants, plus GullRaDriel, MiguelFire, and Onewing in case they participate. There are 160x160, 64x64, and 32x32 png icons for everyone, and the 32x32 come in grayscale too. Read the header file. All you have to do is call PopulateAvatars after initializing allegro and the image addon and then GetAvatar.
Hope this helps!
Btw, I officially read the title of this thread as CrampsHack 2016. Avoid them if you can!
Great work, Edgar!
I won't have time to code, so I'm not in.
me right now:
{"name":"610677","src":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/d\/f\/dff249925570732e4f7cde52f987f22c.gif","w":350,"h":200,"tn":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/d\/f\/dff249925570732e4f7cde52f987f22c"}
With midnight rapidly approaching, I'd say day one is just about finished. I had work to do in the afternoon and early evening, so I didn't get as much done as I'd liked to, but I got a basic engine up and running. I also started working on some music--a first for me. It'll no doubt be pretty bad, but it's fun exploring new territory! I think I'll post a progress update at the end of each day, but of course I'll keep it vague so as to not spoil any surprises. It'd be cool to see others do the same.
I spent the Friday evening coming up with ideas. Not sure how to include all the avatars yet, but at least I have a somewhat Christmassy theme. Without really revealing anything, you play one of the holy three kings who rides on an elephant
I think it's going to be really hard to conceal my identity as the Secret Santa of my game. Just stylistically, the way I write my code should be enough to give it away.
Plus, I really wanna share screenshots and progress
Sounds interesting, Elias! I have to ask though, what's with you an elephants?
Mark, you could snap some progress pictures and notes and release them en masse after the event. That'd be fun to see!
It's still the 17 of december here. Count me in.
I won't have time to code, so I'm not in.
Tell me about it. While our main bar is still waiting for licences to reopen I'm not currently working 70-80 hour weeks any more, but it is still that time of the year, so even the quiet venue I've been "vacationing" at (I've being doing around 35-40 hours, but it still feels like being on holiday) is a lot busier than normal right now. On top of that, my lungs are at about 60% capacity due to pleurisy, so any time I'm not working, I'm trying to lie down as still as possible to conserve oxygen.
Oh, I forgot the identity should be a secret to the person playing the game. Hm. I could just change the elephant into a camel. Given my artistic capabilities all it means is changing the size of the ears
I have to ask though, what's with you an elephants?
The first time I participated in an allegro "hack" a very long time ago I randomly made an elephant the main character... so that's just what I want to do every time ever since
GullRaDriel has officially joined the event.
Vague update: still struggling with art (not my strong suit), but I think I've solidified what I want the gameplay to be like. We'll see how it pans out...
In the meantime, keep an eye on the KrampusHack countdown timer! You don't want to be late! (I think I got the timezone right for the timer, not totally sure though...)
Elias, your artistic style is recognisable from miles away
Kidding aside, I'm also struggling with the realisation that it's going to be hard to keep the secret
I have a main loop!
It has been some time since I used allegro (and C++). I hope this pans out... I'm still conceptualizing the majority of my entry.
What software did you use to model everything?
Blender
GullRaDriel, I made you a (simple) avatar. You should replace it with something cooler, and then I'll update my Avatar pack.
Wait, how do people not see Gull's avatar?
This is what I see for GullRaDriel. :
{"name":"610679","src":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/4\/4\/446c1f4188c706a46b16b18c35b2e43d.png","w":725,"h":290,"tn":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/4\/4\/446c1f4188c706a46b16b18c35b2e43d"}
Here's what I see for GullRaDriel (see attached).
Edit
Daily progress log: designed a few more tiles. I actually like the "art" I made, which is a first. Also wrote some code for a map and camera. Things are shaping up!
Now I remember. I hated that cat so I blocked his avatar with custom CSS. I'll add it back into the avatar pack.
In other news, I almost have a selection screen.
Goin fast and furious!!!
{"name":"610681","src":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/e\/6\/e618c4e7fd04a7a4d41d2c03e2ed3811.gif","w":490,"h":294,"tn":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/e\/6\/e618c4e7fd04a7a4d41d2c03e2ed3811"}
Oh, I forgot the identity should be a secret to the person playing the game.
Typically it's only a secret until you receive it. I don't think it's necessary for it to be a secret who it's from once you receive it. You just aren't supposed to discuss who you're "buying" for prior to the gift exchange.
Day 2 progress: camera and map classes are complete. Scrapped a bunch of useless/ugly tiles. Designed more of the player sprites. Got a working map to render. Tomorrow: player class and keyboard inputs and maybe states (intro screen, credits, etc).
I was tempted to join, but I've never been able to finish anything due to time constraints over family so I decided I wouldn't waste everyone's time this year.
@Specter
Was that your post on mingw-users I just replied to?
Get your New Avatar Pack here
(updated Avatars.cpp and Avatars.hpp for better error checking , and included Gully's cat avatar).
Use : Call PopulateAvatars and if it succeeds, you can call GetAvatar with whatever avatar you want. Valid sizes are 160, 64, and 32. Black and white only works with 32. Valid indices are from 0 to 11, in member order. Read Avatars.cpp:avatar_names to see who is who.
Protip. If you're using an atlas, allocate an area 12*(size + 2) by size + 2 on your atlas, create a sub bitmap of it, and then call CreateAvatarAtlas on the sub bitmap and CreateAvatars on that same bitmap. Then call GetAvatar as usual. It will use the sub bitmap of your main atlas to draw the avatars on, and then create sub bitmaps of each avatar on it as well.
...so I decided I wouldn't waste everyone's time this year.
Except for that 30 seconds we'll never get back. And these ones.
What's the matter bambam? Run out of booze again?
I hated that cat so I blocked his avatar with custom CSS.
That has always been my #1 favorite on this forum
But I love kitties!!!
Like this one
{"name":"610683","src":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/d\/d\/dd70947677822ac0fe34c1d86f930c25.jpg","w":640,"h":477,"tn":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/d\/d\/dd70947677822ac0fe34c1d86f930c25"}
EDIT
Progress.
Near to a working selection screen. My avatar testing is complete. The avatar pack should be good to go.
{"name":"610684","src":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/a\/4\/a4cfbffaa379aae4fcdef9970dc12edc.png","w":1026,"h":801,"tn":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/a\/4\/a4cfbffaa379aae4fcdef9970dc12edc"}
Where to go from here?
I need some kind of theme or genre or basic clues as to what to go on.
If everyone could post 3 things that they would like to see in their game, that would be immensely helpful. (Oh, and things like monitor resolutions would be good - right now I'm working for 1024x768 as that is widely supported and emulated.)
I'll start :
1. Dungeons
2. Dragons
3. Hack n slash (text mode is cool too)
Didn't you get that information in your PM from OneWing already?
I already posted my wishlist...
Sorry, I said I would be in but I will be out. I have a load of real life stuff to do and won't be able to make a game on time.
My PM was kind of bare. Not much to go on.
Well, for me it's too late to change direction anyway.
If you don't have enough to go on, maybe you can look a bit into the persons background and use some of that. Maybe you can spoof some elements from a depot / speedhack game of your subject?
FYI Edgar, my avatar was actually one of MY cats.
Anyway, I'm in !
Time for a vague progress update.
So here is the plan. I figure I won't have enough time to do a completely new game from scratch. So what I'm doing instead is taking an old competition entry from way back, and giving it an upgrade, new balancing, and extra polish. And a completely new theme. With the relaxed krampushack rules, I think that this should be ok. I'll replace most of the graphics so I'm hoping that it's going to be different enough to keep the secret safe.
So far I've programmed about 6-7 hours. I'll have to do day job and other llife stuff during the week, but I figure I should be able to spare another 10 hours or so before the deadline.
If everyone could post 3 things that they would like to see in their game, that would be immensely helpful.
Didn't we do this in the last thread? I mentioned cheesecake and dogs, but here goes again:
1. Cheesecake (a very tasty dessert)
2. Dogs (man's best friend--sorry cat lovers)
3. Some good ol' fashioned pixels!
Oh, and my resolution is 1600x900, but 1024x768 works. Also, not sure who got me (I don't want to know until after Christmas), but whomever it is... you don't have to implement all my "wishlist" ideas.
Sorry, I said I would be in but I will be out. I have a load of real life stuff to do and won't be able to make a game on time.
Sorry to see you go, Takaaki! Maybe next year!
1. Cats
2. Noodles (as in like a bowl of Japanese-style ramen)
3. Designs with a nice color palette
1. A completed game
2. Some kicking music
3. Err... maybe some 3D ness, that's optional... but I always am amused at games that try to be 3D.
Oh man, this is hard.
From My Secret Krampus I would like
1) a 4 stringed instrument, or many 4 stringed instruments, or a many stringed instrument
2) a bag of fireworks and a lighter!
3) world peace
[edit]
I'm (sadly) running Windows 10 and have been developing using MSVC Hopefully I can get a makefile going so this can be compiled on Linux more easily.
1. Zero, one or more elephants.
2. Yellow. At least one pixel. Or at least some warm colors like orange or beige.
3. Lots of Christmas Krampus spirit.
Update: hit a major snag in my code. Hoping to fix it by the day's end. Hack code is so messy.
I'm using my old collection of useful functions, but somehow collision detection seemed off in my game. I generally only add simple functions to that collection and when I'm 100% sure it's bug free - so I was trying all kinds of things for an hour in my current game code before I double checked the function I was using from that collection. And was shocked to find this:
if dx + dx + dy * dy < radius * radius:
I don't understand how I never noticed earlier. I need to add unit tests to each single of my functions in that collection. After Krampushack.
if dx + dx + dy * dy < radius * radius:
Oh wow, that's a nasty one
Yea, I just ran into a few missing features in framework code. One related to al_set_new_bitmap_flags(), Allegro, al_clone_bitmap(), and drawing pixel-perfect scaled renders. I added a PR, btw. It ultimately resolved in me creating a new function in my framework.
But yes, there are a lot of holes in there! *Hacks are a great way to find them!
Oh, by the way, Adobe CC sucks, guys
I couldn't understand why my icons weren't rendering in the correct position until I realized I wasn't drawing them at their actual location, only centering them on the same space.
Was that your post on mingw-users I just replied to?
The post I made was about copy constructor, std::copy(); error I was getting and then went into good programming practices.
I couldn't understand why my icons weren't rendering in the correct position until I realized I wasn't drawing them at their actual location, only centering them on the same space.
Those are fun bugs. When you know what you're doing ahead of time, intend to wire something together, but don't. It compiles, it runs, but it doesn't work. How can it possibly not work, it's so simple?! Cue hours lost chasing gremlins because your assumptions are bad.
Got past that snag I mentioned earlier. But I couldn't figure out why my camera wasn't following its target left or right... Turned out the target's getX() method was returning its y axis the whole time.
Ah, the ole' x-was-actually-y bug. A classic.
It happens more often than I care to admit. I get lazy and copy and paste similar get and set functions, then forget to change the return values for each one.
I blame Edgar Reynaldo, my arch enemy.
Because I used Allegro 5's mind control to make you copy and paste the code? I'm too busy making my own copy paste errors to be messing with your code at the same time. We need a better reason to. E arch e skies than that (that's my phone talking). What I meant was we need better reasons to be arch enemies than that.
Edit : 'public' is your friend.
Allegro 5? No, no, I'm using Allegro 6! I'm from the future--2028, to be precise. But I only use the C^ port (pronounced "see caret"). It rose to popularity around 2023 after Bjarne Stroustrup made an anti-Semitic comment (that's political correctness for you). I'm looking forward to the next version, which should finally fix that sextuple buffer issue.
Also, you called us arch enemies first. I'm just going with the flow.
That's because your avatar was mirrored from mine making you the guy on the left. He's the baddie from one of my favorite episodes of Doctor Who. Riddle me this? Who's your favorite color of Kangs? The Red Kangs or the Blue Kangs?
I haven't seen much of the original Doctor Who series, unfortunately. Seen almost all the newer ones though. Looking forward to the Christmas special this year?
Unfortunately all we get are reruns around here. Takes forever to see the new seasons.
If it makes you feel any better, the show hasn't been on at all since last Christmas.
Edit
Speaking of Christmas Krampus, I found a whole slew of new bugs in my map and camera classes! I think I've fixed them all now though.
Hmp, my wild boars randomly disappear. And all I figured out is that they move nan pixels but I don't see how their speed can ever get nan... I must be dividing 0/0 somewhere
[edit:] Found it There is another way it can get nan but it's too embarrassing.
Did someone say...
{"name":"610686","src":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/2\/0\/2075a13471bd3a2653823d95b097dd0d.png","w":302,"h":170,"tn":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/2\/0\/2075a13471bd3a2653823d95b097dd0d"}
naan?
Mark is hereby removed from KrampusHack 2016 for being too punny. All in favor say "aye".
{"name":"610687","src":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/b\/9\/b91720733194da787485f670cf48b238.png","w":275,"h":183,"tn":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/b\/9\/b91720733194da787485f670cf48b238"}
git config --global alias.snap '!git add . && git commit -m snapshot'
You may not have the time to engineer perfect commits, but that's no reason not to use source control.
1)Particles
2)Christmas related visuals
3)Destroy things
Good luck everybody :-)
1) fast
2) bright
3) icey
I have to admit, Mark... that was pretty good.
Today I'll begin working on a HUD.
Update (11:29 CST)
Hit another snag. I created something that walks around by itself, but when I went to make multiples of it spawn (as an array of objects), it suddenly stopped obeying collision detection! Currently trying to fix that.
Another update (19:09 CST)
Fixed the aforementioned problem. Now I have a new one: random freezing. I've narrowed it down to a certain method. Now off to fix it.
I think I'm ready to start designing levels tomorrow night - actually need to see a movie so Wednesday night. Then Thursday night add some sound effects. And Friday night maybe add some music. Hm. Except I could use every single remaining hour to do levels...
KrampusHack progress update: I fixed the freezing issue I had yesterday. A faulty while loop got stuck looping indefinitely, which caused the problem. Oops. Also added a little HUD. Now I'm working on more graphics. I might even finish before the due time!
Type type type... Code code code... I've got a map generator going. The fact that I can't show any screenies is a major bummer right now. And now I'm wondering if I already gave away too much by mentioning the map generator...
Estimated time spent: 12 hours.
Well, the way I understand it now is that Onewing will tell me who my gift is by when I receive one. So there is no need for being all that secret about the game itself, just about who you are making it for.
(Originally I assumed when I receive a game I would still not know who it is from - in that case every little thing indeed could have been a giveaway.)
Hey all, how's everybody feeling? Where would you say, percent-wise, you are on your gifts? Think you could hit 100% before Friday? I recommend making that your goal and using the final stretch only to polish what you've got.
Regarding the due date, I'm a bit flexible here if we want to push it back. My intention was to make sure Krampus doesn't start bleeding into your Christmas day (unfortunate visual intended). I've basically got family events each night starting tonight through Sunday, so all of my contributions are in between necessary, long-time-no-see hugs.
Lastly, I agree that we should amend the language around the secretness of the Santa. For now, as best as possible, it should absolutely be kept a secret! But, once the gift is delivered, I have no qualms revealing the identity to your receiver. I would ask they still go through me so I can make sure everyone gets some correspondence after the event finishes. The gifts shouldn't be shared until we hit January though, so we can maintain that heightened sense of personalization for a week. Thoughts?
My gift is about 70% finished. So long as there are no more roadblocks, finishing before Friday shouldn't be a problem. I think sticking with the original due date and time is fine.
I lost a whole day due to narcilepsy. Busy trying to catch up. I have a SceneManager and should have 3 scenes done before the end of the day. Then I have to focus on gameplay. I wouldn't mind a few more days to work. I'd rather present a finished gift than just a few splash screens like that whole TINS fiasco earlier this year.
I can say I haven't made as much progress as I would have hoped at this point, but I do have some solid groundwork and gameplay should be coming up next.
Didn't we originally say handing in on the 26th is early enough?
Didn't we originally say handing in on the 26th is early enough?
Yeah, I think GullRaDriel suggested that.
Trying to learn how to use blender (for not just the first time) is a little on the frustrating side when all you want is a few different views of the same thing.
@Edgar: Are you using Blender to make your game, or just for modeling?
Just trying to turn a free .obj file into a few sprites. Can't figure out how to save the images I render though...
Think about it: if the premise of Secret Santa was that the receiver never knows who gave them their gift then the gifts will be terrible and the event will fail.
Alright, the group has spoken. You have until the 26th to submit your entries as PM's to me. I will plan on passing them out in the morning. If I see the PM after midnight, I'll still pass along the gift...but with a bag of coal or something.
but with a bag of coal or something.
Great. I'll just sell the coal for some quick cash anyway.
So that's 12:00 a.m. on Monday, the 26th?
11:59pm or earlier is what I think he meant
So that's 11:59 p.m. on Sunday, the 25th then?
I guess it's too late now but I don't love the idea of changing the deadline. Well, do it if you must, but please don't change it again!
I started from a finished game, and I'm replacing features one by one, keeping it in a releasable state the whole time. So I was 100% finished when I started, I'm 100% finished now, and if I work really hard I can have it 100% finished before the deadline!
Yes, I'm so agile.
No one's gonna have time to do anything on Christmas if they observe it. 11:59PM on Monday, December 26th.
Why, because people need to sleep? Sleep is for the weak!
Oh, and here's a totally legit screenshot of my game.
{"name":"krampushack2016game.png","src":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/e\/1\/e1cc816631f154122543a2f466a7cbcc.png","w":800,"h":600,"tn":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/e\/1\/e1cc816631f154122543a2f466a7cbcc"}
I started from a finished game, and I'm replacing features one by one, keeping it in a releasable state the whole time. So I was 100% finished when I started, I'm 100% finished now, and if I work really hard I can have it 100% finished before the deadline!
That's a brilliant strategy. I probably should have done that
That might be good for another *Hack, actually. All entries must be a previously coded game with changes/enhancements, etc.
yeah polishHack
my game is hard to make the gameplay but i like it anyway so far
I'm about 85% finished with my gift now. I'd like to finish it before tomorrow afternoon, because I'll be busy most of the weekend. Final stretch!
I am behind aswell.
I hope he doesn't regift this...
How's everyone feeling about their gifts so far? I've made great progress today, and will likely finish tomorrow sometime (so long as these two remaining bugs don't screw me up). My gift is completely playable, but still needs some bug fixing and polishing up before it's done with. Good luck to all!
How's everyone feeling about their gifts so far?
I believe in you, Mark! Believe in the me that believes in you.
I'm using Chipmunk2D physics engine for mine, and it's just making everything 10x as slow as it should be I'm glad I have plenty of time to do it, but last time I tried to use a physics engine I basically ran out of time (and it was a ChistmasHack too).
One thing I never get about physics libraries and simulations, is they're always default to slow motion. What's up with that?
{"name":"610689","src":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/6\/7\/67e5b7b9cc3c63e10fbf7a56e155fba7.png","w":416,"h":416,"tn":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/6\/7\/67e5b7b9cc3c63e10fbf7a56e155fba7"}
What I said was what I said.
KrampusHack topic says "Try to do so before January 1, 2017. On January 1, 2017"
I will not be able to give anything on the 26 since I started my project with the 1 of January in mind.
I'll submit my present for the due date, my gifted friend will have to wait until that, sorry ^^
Edit: BTW I got something running. I will provide sources and makefiles and everything needed to build my entry (except A5) on Windows and Linux.
I hope he doesn't regift this...
Don't you mean ze!?
I may not finish by the end of the 26th either. Been focusing on art and haven't had as much time for gameplay.
Edgar, I am attempting to use your avatar pack, but when I call PopulateAvatars(), it freezes the program. Any ideas? The function returns true, so I know the files are okay.
First question: What makes you think it's the avatar pack freezing the program?
The program only freezes if I call PopulateAvatars(); otherwise, it doesn't freeze. Anyone else used Edgar's code successfully? Maybe it's just me screwing up.
Debug away!
I tried to do a quick review for bugs, but I have to go get the dishes done before my dearest returns! <3 I noted the above. I don't know WTF it's for, but it appears to destroy the bitmap without resetting the pointer and then attempts to use the pointer again later... Seems sloppy and probably a bug. That said, I'm assuming that would only occur if you called the function twice. The best way to figure it out is an interactive debugger.
I am pressed for time, so I decided against using Edgar's code. Sorry, Edgar!
My gift is as finished as it will ever be now. I would like to submit it. I do not see an option to upload attachments to private messages though.
[EDIT]
I'll just use another site to upload it and send the gift as a link, I guess.
That's odd. All it does is allocate and load bitmaps. It could be making the large Atlas a memory bit.ap if you do t have a large enough texture. I'll explore later when I get home. You're using the second version I provided right?
Typos courtesy of my phone and my clumsy thumbs.
Yeah, I'm using the second version. If I have time, I'll give it another go tomorrow sometime.
Spent about 20 hours so far, and Max added another 4 hours or so for graphics.
At 12*(160+2), the texture is 1944 pixels wide. Most modern video cards should be able to create a texture that is 2048x2048 at least. Just add in a check for :
if (al_get_bitmap_flags(bitmap) & ALLEGRO_MEMORY_BITMAP)) { printf("Atlas is a memory bitmap\n"); }
Edit, the code could be modified to make a 6x2 or 4x3 atlas instead, without too much fuss.
Update:
I've been spending more time on graphics than on coding. If I ever finish, at least it should look good.
Workin workin workin! My graphics don't look too bad. I need to make my level so I can start playing the game!
I've been spending more time on graphics than on coding. If I ever finish, at least it should look good.
Cool!
I wrote a quick program to test your avatar pack, Edgar. Here's what I have:
The above outputs the following:
Failed to load avatar data/avatarpacks/avatarpack160/16609_TakaakiFurukawa_avatar_160x160.png
Error: failed to populate avatars!
I took a look and found that Takaaki Furukawa's avatar had a capital "K" in each of its avatar files. Making that a lower-case "k" fixed it. However, now the screen just appears black (it still updates and ends after 5 seconds like it should though). I don't even bother to call GetAvatar().
Here's the code from Avatar.cpp that I'm using:
I'm exhausted, so maybe I'm just doing something blatantly wrong. Suggestions welcomed.
The Create* routines set the drawing target. You have to reset it first. Then draw one of the images from GetAvatar. Also, windows is not case sensitive. That's why it didn't care for me, but failed on Linux. Don't know how that sneaky capital K got in there. I'll upload a fixed version tomorrow.
Edit
Here. I just changed the lowercase k to a big K in Avatars.cpp and that should fix it. Just set the drawing target and you're good to go.
https://www.allegro.cc/files/attachment/610691
I'll mess with it some more later on, Edgar.
Merry Krampus, everyone!
I finished my thing, hopefully before the deadline(s)?!?
It seems reasonable that a library like this should restore the original target when its job is done. It seems unlikely that the caller will arbitrarily want to keep drawing to your target.
I'm volunteering at a 5 day music festival so ill try to finish mine off and upload when i can
{"name":"610693","src":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/5\/2\/5215e93b9eb5ec2953abacd7b4f12196.jpg","w":800,"h":597,"tn":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/5\/2\/5215e93b9eb5ec2953abacd7b4f12196"}
{"name":"610694","src":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/5\/6\/561de3fe4df9b63fb3749c7bd6cb66c2.jpg","w":800,"h":597,"tn":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/5\/6\/561de3fe4df9b63fb3749c7bd6cb66c2"}
{"name":"610695","src":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/5\/c\/5c0bef70bac79e1aa77af20ab949c030.jpg","w":800,"h":597,"tn":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/5\/c\/5c0bef70bac79e1aa77af20ab949c030"}
I submitted my thing too, with about 30 hours on the clock from me and about 4 hours from Max.
I roughly got where I wanted, but I got plenty of new ideas. I could easily spend another 30 hours developing the same game for Krampushack 2017
I really like this polish-hack style though... Take an old game, keep it in a releasable state but replace features one by one. I've got so many old competition entries that I could treat the same way. Maybe they have some potential, but really they are just unfinished. Maybe we can make this something regular. What do you think?
It's a neat idea, but wouldn't work too well for those who haven't made a bunch of games already.
I think that's a fantastic idea.
For KrampusHack, I want my game to be more polished than my previous hack games. I always felt my past hacks fell short and ended up closer to engine-and-tech-demo that I would have liked!
It seems reasonable that a library like this should restore the original target when its job is done. It seems unlikely that the caller will arbitrarily want to keep drawing to your target.
It's hardly a library. And it doesn't take the display as a parameter, so it can't restore the drawing target to the backbuffer.
It's not hard to do.
al_set_target_backbuffer(display);
There, that wasn't so bad, was it?
There, that wasn't so bad, was it?
Yes, actually that is bad.
You shouldn't implicitly change the state, then expect the user to both know what you changed and also have to clean up afterward. I haven't looked at your code, but it sounds like you're changing the drawing target within a function call. Whenever you do that, you should always change it back:
void my_function_that_draws_to_target(ALLEGRO_BITMAP *target) { ALLEGRO_STATE previous_target_bitmap_state; al_store_state(&previous_target_bitmap_state, ALLEGRO_STATE_BITMAP); al_set_target_bitmap(target); // do your drawing here // ... al_restore_state(&previous_target_bitmap_state); }
As an (almost holy) principal, any function should have no side effects. If a side effect is essential for the operation of that function, then the side effect should be isolated into a separate function call, and you should make it the responsibility of the user to call it.
Oh grow up. Allegro implicitly changes global state all the time, and it's your responsiblity to set it back. OpenGL much?
Edit
There is one bug in Avatars.cpp on line 47. It should be followed by the following line :
That way it recycles the bitmap properly. It would only come up if you call CreateAtlas twice though.
I feel terrible -- I did not finish at all. I may still try to come up with something before the end of the day tomorrow just to be like "yay happy holidays"
I won't finish by the end of tonight either. I like Gully's deadline of January 1st. That's what I'm working for as of now. I want to complete something.
I'm basically finished, just need to play test and upload... had much less time yesterday and today then I had expected.
I still have quite a bit to do, but I've done a ton so far. (hmm, odd, it shows 186 commits on the repo. hmmm 🤔)
I'll be glad if I can wrap this up in the next 2 days.
Yay, game submitted in a PM to Onewing! (Hope that's what I was supposed to do.)
I'll also be needing a couple of extra days. I thought I'd have the previous week off but I had less time than I hoped for unfortunately! 🎅
It's hardly a library.
It may be a short lived library, but effectively a library is just reusable code and that's what it is.
Oh grow up. Allegro implicitly changes global state all the time, and it's your responsiblity to set it back. OpenGL much?
In Allegro's case there's likely a performance justification for leaving that state tainted (but heavily documented!): if Allegro were to try to capture the initial state and restore it for each relevant OpenGL operation it would likely cripple the library's performance. That's a valid concern. I think it's terrible that OpenGL bleeds into Allegro 5, but I trust that it's necessary (if it isn't then Allegro shouldn't be doing that either).
If it affected your library then you could readily argue that it was justifiable to alter the global state without restoring it, but in this case I don't think that's applicable. The affected bit of your library seems to predominantly initialize state a single time for later, which can certainly absorb the negligible impact of capturing and restoring the state. The runtime cost is much less than the developer cost.
Here is global state rearing its ugly head. It's a problem. That is why the industry has agreed that global state is problematic in general and that it should be used sparingly. I imagine that attempting to use this code in a multithreaded program that was "crazy" would be impossible. Perhaps some of that burden would hinge on Allegro, OpenGL, and physical hardware, but to whatever extent is possible, the software should not be a limiting factor.
It's always per-thread global state (in the case of OpenGL and Allegro), so multi-threading works (it can still be an issue if you change state on one thread and expect it to change on another, of course).
Hello everybody! Hope everyone enjoyed KrampusHack and more importantly, had a great Christmas! Or...vice versa.
I've received several entries. A surprise family event popped up that I'm going to head off to now. I'll send out the gifts this evening and you'll have the rest of the week to play them before the Secret Santas start posting to the allegro.cc Depot forums.
We still have to the 1st though, right?
Yep !
The original topic says:
Send the review back to the secret santa (via me, if your secret santa never revealed their identity). Try to do so before January 1, 2017.
The intention here is that the Secret Santa knows that their personalized gift was played and enjoyed by the intended sole recipient before anyone else. January 1st is when all secret santas may reveal themselves to everyone by posting their game on the depot. We decided in this thread to move the submission date back to the 26th (as it was originally). Several people have followed this rule.
I'm ready to send the submissions I got, what say you group?
Distribute the submissions which you have already received. Then let the rest trickle out as they become available.
I just updated my .zip to include a windows and a linux executable. If you downloaded it already maybe re-download it, should make it much easier for the recipient to play
Oh noooo...
I still haven't finished my game. Well, I'll continue working on it. It appears Santa had a bit of a liftoff delay!
Without a deadline, a competition is just a "I'll try to finish a game someday", which is pretty much what I'm doing all year long anyway And a deadline decreases in importance every time you move it.
But I don't want to be negative here. Those of you following the "late" deadline, best of luck! In the mean time, let's open us up some gifts!
Certainly the deadline is meant to be motivation for a "hack" event. Obviously a floating deadline is therefore demotivating. That said, the whole event was kind of whimsical this year so if you're motivated to get something done still I don't see the harm. But certainly the next KrampusHack should be more precisely defined.
But certainly the next KrampusHack should be more precisely defined.
Ah, but that would be a SantaHack. The spirit of KrampusHack is that it itself is a hacked together event.
I have sent out the completed gifts. There were 4 that were done on time and one person said they are delayed. Two people who completed games also received games!
I received my gift. It's a blast to play!
I like my gift a lot - but I don't know how to change key assignments and I can't reach the space bar on my keyboard without letting go of WASD - so it gets extra hard to play
What the Hell kind of keyboard do you have?!
I use the mouse with the left hand, so WASD is bad in general (since I have to move the right hand over). I always use cursor keys instead.
[edit:]
Ha, turns out Allegro 5 has some ancient feature ported over from Allegro 4 where you can modify the X11 keyboard mapping in allegro5.cfg:
[xkeymap] 113=1 114=4 111=23 116=19
(that maps cursor keys to WASD)
Let's see how many krampusses I can kill now...
Interesting. Are you left handed?
I always use cursor keys instead.
Wouldn't IJKL be better, since you can still easily reach the spacebar with your thumb?
For most desktop keyboards, yes, but laptop keyboards might have the cursor keys close enough for that not to matter.
IJKL would work for me - or WASD and having jump on F instead of Space. Anyway, the lesson here is don't hardcode keys
That's a wrap on KrampusHack! Thanks for participating! Here's some info:
Participants that received gifts:
Eric Johnson got a gift from Amarillion
Mark Oates got a gift from Eric Johnson
Elias got a gift from SiegeLord
Derezo got a gift from Elias
Participants that did not get gifts:
Edgar Reynaldo did not get a gift from Derezo or GullRaDriel (late entry)
Vanneto did not get a gift from Mark Oates
m c did not get a gift from Edgar Reynaldo
Amarillion did not get a gift from Takaaki Furukawa
SiegeLord did not get a gift from Vanneto
Takaaki Furukawa did not get a gift from m c
GullRaDriel (late entry) did not get a gift
You can now upload your games to the depot. I can see several people have already done so.
Thread credits go to those who completed and provided games.
Now we know who's been naughty and who's been nice.
[edit] I'm still working on my game loool
It's still the first of January and I'm packing my entry.
UPLOADED FFS !
I haven't had a chance to make a release/thread yet, but here are the screenshots:
{"name":"610710","src":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/b\/c\/bc7d30c46b333a822b162a187481378f.png","w":640,"h":382,"tn":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/b\/c\/bc7d30c46b333a822b162a187481378f"}
{"name":"610709","src":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/1\/6\/165599337832965949075116db9994e9.png","w":640,"h":382,"tn":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/1\/6\/165599337832965949075116db9994e9"}
The project is "finished" (only pending a convenient release version that doesn't require the framework.)
Better yet! If you can compile it yourself from the repo 💯 to you!
Repo: https://github.com/MarkOates/krampushack2016
Requires AllegroFlare: https://github.com/MarkOates/allegro_flare (note: you will need up to commit a5ab79c3d13322174c45fc65a56ee370fc9221d8, which is "Add a draw_raw() function for BitmapObject")
Holy cow, Mark! Those visuals are gorgeous!
I think Takaaki already gave up, so no gift for me
At least I finished something ;o)
I am making a game for m c, but I dont' know when I will be able to finish it. I've been pretty sick the last few days and haven't gotten anything done.
I made an entry. If anyone have problem playing it let me know
I wasn't able to complete my game for you Edgar.
I didn't get very far -- honestly, I am still learning A5. I spent some time trying to compile Eagle GUI (using MSVC) but I think there might be some incompatibilities I need to sort through. On new years eve I had some family things happen, and then on new years some relationship stuff happen, picking up a new car on Friday.. I tried to squeeze too much into the end of 2016 and wasn't prepared for some unexpected events.
I'm going to try and finish something up but I can't guarantee a timeline. We're moving at the end of the month, and don't even know where yet! Gah!
I started playing Elias' entry on New Years, and it's very impressive!! I was playing it earlier today. Thanks Elias, you know how to Krampus the hack
{"name":"610731","src":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/3\/e\/3e20377e8ab671fc69e1d06cdbaa06d7.png","w":1282,"h":756,"tn":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/3\/e\/3e20377e8ab671fc69e1d06cdbaa06d7"}
I need to make some fairly major changes for EAGLE to work with MSVC properly. In order to build the DLLs I need to change all the class declarations to use __declspec dllexport and I'm not sure whether that needs to go in the source files as well. If there are other incompatibilities let me know and I'll work on a fix for them. The widget set isn't complete yet but I'm working on it. Soon I'll be busy with school again and I dont know how much time I'll have.
EDIT
I don't think I'm going to finish my entry for Krampus Hack. I underestimated how much time it would take to implement a tile engine with items, characters, objects, and terrain. I haven't got any collision done yet, and I still haven't figured out gameplay. Something to work on for next year's Krampus Hack I guess. Sorry m c.
Sorry, amarillion! Maybe next year.
I started playing OneWing's entry on New Years, and it's very impressive!! I was playing it earlier today. Thanks OneWing, you know how to Krampus the hack
Are you sure that's OneWing's entry ? I'm pretty sure it's Elias ones.
It was Elias entry -- that was an error. I knew it was from Elias, not sure why I posted OneWing
Thanks Elias!
:-P