The Tequila Den

Combines the world of Tequila with Games.

Tag Archives: code

Back in the saddle…

I’ve been a bit of a rock-star the last few days in regards to getting Canasta finished. I’ve nearly got most cases finished in the new AI scheme and it’s looking rather promising. I hit a few snags after the initial implementation, most being a few type errors on my part, and the other half stemming from me not paying attention or simply using the wrong parameters or creating a new undefined variable. For now it seems as though many of the bugs have been flushed out. Now to add a few more cases for the AI not to play so mindless and to fix some ungodly animation errors. Although, it is fun to see cards fly across the screen in one direction, even though they should be flowing in the opposite direction.

I haven’t done any sprite-ing or art of any kind the last few days. I’ve rather taken the approach of more planning and a bit of recon. The best way to develop a style is to study others. Another big obstacle I’ve stumbled upon is resolution. First, with Canasta, it’s been an issue which needs to be remedied. I need to lower the resolution so it fits on more native displays as most displays have gone widescreen. When I first developed the game I made it for a standard 4:3 display, well it doesn’t fit on my laptop. Once I get everything sorted out behind the scenes with AI and the card handling, I’ll be tackling that as definite.

Back with “mouse” though and resolution, it’s become an issue because it’s hard to develop graphics for a game when you don’t really know the resolution. A few pieces of art and my studying is that it’s much prettier if you can go with a larger resolution, and in some cases, easier. So right now I’m trying to find a new medium in terms of that. I’ve already decided to limit myself in terms of color, by selecting a specific palette. (pretty sure it’s an SNES, but I don’t recall for sure). There is a degree of difficulty when the resolution is smaller, you almost get limited in the detail and some things may seem unclear as to what it is, but then you get to the point “when’s enough, enough?”. So that’s where I’m at for the moment. Sooner or later I’ll crack down and whip up the debug room for the game, but for now, full steam ahead on Canasta.

Advertisements

Just putting about…

I’m getting there.

Slowly as all hell. I’m not entirely sure at the moment what is really killing my motivation. I don’t know if it was the final couple weeks of striving to get Traders (CATAN) out or if I’m still in a bit of indecision mode. I’m trying to conquer that with my 30 in 30 challenge I proposed myself, but to actually open the editor is becoming a struggle some days. Things need to be perfect for me, I have a little bit of OCD… Another issue is that I’m not by any means a pixel artist. I’m getting better at it but it is SLOW going. Lastly I think the biggest issue or real, noticeable progress is that I’m thinking I’m worrying about the games’ systems and how they all tie together and I want to make it whole and proper.

So that’s it… I’m torn between super planning everything, and just saying fuck it and start coding, if I have to re-write chunks, I re-write chunks. So here it comes, I’m going today’s portion of the challenge. I’m doing a hybrid of the two. I’m going to sit down on paper and chew out the details and what system I need and what it will/can tie into. This way I know what needs to stand alone and what needs to be nested with other portions of the game.

Any-who, back to the challenge… I owe seven game related material.
– I made dynamite
– I made a sabre/sword but energized weapon
– I made a shovel
– Inventory/game menu will be very similar to the original Legend of Zelda, including the transition to it.
– The library you first enter in the game is initially empty except for one book.
– The only person left in the bar is drunk and passed out
– The library now has a map in the editor and the floor is being decided.

So there you have it, another week of decisions. Hopefully next update will include a bit of game structure in it. 14/30…. might just run a marathon now! Ha…

Just a quick… shot.

So the new year is all upon us, the world hasn’t ended (yet), although it does feel like the damn thing has frozen over!

I’ve been going through the Traders code and been cleaning it up and making it a bit smarter and more intelligent (by using more algorithms and such). I threw out about a hundred lines of code because a light switch went on in my brain and reduced it all down to 5 lines. 100 lines to fucking 5. What a piss off. I’ve got another in mind for another thing but it can wait for now.

Anyway, ports motherfucker!

screenshot 2014.01.08 12.42.07.0187

Longest Road (EVER)

I think I actually got it. What a bitch.

It was a nightmare. I knew it wasn’t going to be easy, but when I first started planning for it, I was honestly stumped. I pieced together the eventual formula, but it took a lot of brain juice.

I’ll break it down. First off, I copy an array of all the roads the player has. Then from that array, I separate all the roads into single segments. What that means is that it is a list of roads that only have a single path. Of course these road segments could be longer when the roads have multiple branches and directions, but this is the simplest form. The roads are all accounted for in this instance. After this, I cycle back through all the segments matching them with other segments and creating new segments. This creates a list of all possible road paths (through all possible branches). This creates a longest road. Although, there’s a catch. Road length can be intercepted by opposing settlements, thus, there’s another check these completed segments must go through. I kept tabs on the ends of the roads throughout the process, so all I did now was cycle through the completed segments catching to see if an ‘enemy’ settlement was blocking, keeping track of the length. At the end, the longest length recorded and returned. Ta-da.

Clear sailing ahead!

Oh fuck, I forgot about ports again. Son of a …

Ready to Start

The new, and improved, Catan is now a lot faster than the previous version. Roughly, 500 fps. Now that’s just ridiculous. All because I decided to lighten the load of the memory and actually do some intelligent programming. Thanks OOP! I want to improve it a little more yet, but I want to get going on the actual game now. There are definitely a bunch of little polish things missing at the moment, but I’ll crack down one day and throw them all in. I figure they can wait since they’re a simple add-on to what’s already there.

I’m off to starting on distributing resources and playing robbers! I still love this game, sorry Canasta.

Rolling Along…

I got past a couple of hurdles the past few days for Catan. I got the beginning rolls out of the way and the server handles the results and spits back a winner. That winner can now choose their starting settlement and road. I haven’t handled the rotation in which the players go. Its a simple snippet, just not finished. I also have to bring over the occupied code from the old server/client set. Once I finish a few handlers a lot of the work left is converting the rest of the code to the new style.

I’m up in the air in what to do with mouse. I really wanna finish it and make the great game I have imagined. However at times (most of the time) I feel I don’t have enough planned out to start or not enough abilities to actually do what I need to do.

I wish I was an artist.

I have another project in which I want to do but I know I should hold off until at the very least canasta or Catan is finished. Ill tell you one thing though is that the game is heavily based off clash of clans and warcraft 3. if you haven’t tried or played Clash of Clans. I highly suggest you do!