Recent posts by Shake_N_Baker on Kongregate

Flag Post

Topic: Game Programming / GiTD #41 - *Congratulations Aesica*

Nice catch! I’ve uploaded the fixed version.

 
Flag Post

Topic: Game Programming / GiTD #41 - *Congratulations Aesica*

Thank you guys! Aesica I’ve added your suggestion and I have to agree it does seem more intuitive. Also if anyone wants to look at the source code it should be all up to date with the recent changes.

 
Flag Post

Topic: Game Programming / GiTD #41 - *Congratulations Aesica*

Haah! I don’t know when I started that typo but good catch. I think I just wanted to use the hexagon ‘e’ again on the title screen or something xD. I greatly appreciate the feedback and added the changes, though I can’t edit the game name which also has the typo. :’(

 
Flag Post

Topic: Game Programming / GiTD #41 - *Congratulations Aesica*

I finished my puzzle game and posted it here on kongregate for anyone interested.

 
Flag Post

Topic: Game Programming / GiTD #41 - *Congratulations Aesica*

My votes:

1st – Aesica
2nd – Shalmezad

Aesica – I thought it was a pretty nice game. I was glad for the hot / cold boss room addition you added at the end, before I didn’t even know that there was a boss. It took me a little bit to adjust to the jump control, for some reason I expected it to be the up arrow or the space bar. The enemies all appear to have different behaviors, which I liked, but I wish they could have had a bigger/better area to showcase those behaviors. The hero appears to be quite overpowered at the moment with his massive health and wall piercing shots, might just be so noobies like me get to actually see the boss. The boss as of right now does not seem to have too much going on. Lastly I appreciated the addition of some music to the game, just don’t forget to add a mute button since I know people always complain when its missing.

Shalmezad – I’m not really sure what to make of the game. I liked the innovative way hero generation was done, I can’t say I’ve played a game where that has been done before. I found the game to be a little too fast paced, or at least my characters controls. I would tap the arrow key and shoot off in one direction faster than I was expecting. I liked that my bullets actually destroyed pixels off of the enemies. The objective seems to be too simple at this point with points as the only real show of progress, maybe adding goals or stronger enemies as you score points, could better immerse the player into the game? Not much else to say, with a bit of work I could see this being a rather enjoyable game.

To those that played and are confused with my puzzle I would suggest playing the updated version which has a step hint button to show the shortest path solution step by step. Other than that I take it I should probably take some time to drop the player into a short tutorial / add some visual cues on what is an allowable move for a selected hex. Lastly seeing how Shalmezad posted his source I figured I might as well do the same, so here it is.

Edit: Also about the slowdown of the browser on generation, the code I used for these versions just randomly creates a board and tries to solve it, discarding all that are not solvable and repeating until one is found. A brute force method which I make no claim to be very consistently fast. I made a few improvements from the initial version to the updated version in terms of efficiency, but as I posted before I saw very little difference in speed.

 
Flag Post

Topic: Game Programming / simple question

That sounds like some sort of masking. I don’t know a specific name for what type of masking that is though.

 
Flag Post

Topic: Game Programming / COUT in AS3

Originally posted by pugzy:

Iirc,

trace(String.fromCharCode(e.keyCode)); 

Its e.charCode not e.keyCode. Also it might be worth mentioning that it won’t work for arrow keys but most other input should be fine.

 
Flag Post

Topic: Game Programming / GiTD #41 - *Random Generation*

Update fixed a bug with selections not showing, modified the generation to not expand board states that had already been expanded (should make it a little faster, though doesn’t seem to be by much), added tracking for the solution on newly generated boards, and added a step hint button that can be used to step your way to the solution.

 
Flag Post

Topic: Game Programming / GiTD #41 - *Random Generation*

I was pretty excited to hear the theme of this GiTD and decided to make a quick little game myself. I call it Lunar Hex as it is based on the puzzle game Lunar Lockout if anyone has played that. The game generates solvable boards and I even list how many moves it should take to solve it. I will note that the random generation pretty much brute forces its way to see if the board is solvable and gives up on any that are not which means its sometimes rather slow. I’m pretty happy with how it stands after less than a day of work. Can’t wait to see what others come up with.

 
Flag Post

Topic: Game Programming / Collision on a tile-based system

I was wondering what tutorial would have you using prototypes over classes for the tiles but it appears it was written in actionscript 2 which did not allow the use of classes. Timeline coding in this way is not good practice and you should probably find a tutorial (try searching for MJW’s Avoider tutorial) which uses classes and better practices to learn from.

You also seem to be clobbering the code with globally scoped variables which makes it very hard to track anything. For instance at first glance of your collide function I thought tileXloc and tileYloc were never initialized and had to be the problem, but you declare those outside of the function thus they are set in the finder function to later be used in this collide function. It would be much more clear if you used a return value from a function like finder to instead set a tileXloc and tileYloc variable which is scoped to live and die in the collide function. You should also try to type the variables you declare whenever you can.

As for the problem with your collide method its a little hard to say as few details were given on what you are seeing that is wrong. My guess would be that it collides but inaccurately. It appears that you are only checking a single point (the x and y coordinate of the character) and determining which tile it is in which it sounds like is able to correctly determine the tile it is in. Unless your character is a single pixel though, this will not appear to collide correctly. If your character is just a square and its registration point is in the middle of the square then that is the point you are checking for being in an unwalkable tile, not the entire square itself. Instead what you need to do is check the four points which represent the corners of the character and see if any of them are in an unwalkable tile. But again more details of the problem would lead to more and better help.

 
Flag Post

Topic: Game Programming / Help with Flash Variables

Originally posted by louisbozzy:

I was thinking is their any thing that I can put around it so it only happens once?

internal var init:Boolean;

if (!init)
{
	trace("THIS BLOCK OF CODE IS ONLY CALLED ONCE");
	init = true;
	internal var pies:int = 0;
}

I would recommend using classes and not timeline coding, also you should find yourself a good tutorial to learn the basics.

 
Flag Post

Topic: Game Programming / Easy AS3 question (hitTest)

There is no one way to do this. If it were me I would have the player always falling and run collision checks against any platforms or blocks that the player can stand on. Colliding with a block would push the player out of the collision in the shortest distance possible, thus as long as the player can’t fall too fast he should be pushed up off of the blocks he falls into in the same frame, causing him to stand on top of the block. This would make walking off the side of a block trivial too, as you wouldn’t have to detect the change of him standing on ground to standing in mid air. The draw back is that detecting if you can jump requires you to know if you have collided and been pushed upwards recently by a block, which is just a matter of tracking the recent collisions of that type with the player.

I’ve uploaded a sample of using this style of collision detection / correction here. Note the player simply flies in that application (avoids the jumping issue), it’s been a few years since I wrote this but you can see he stands and falls off blocks just fine using this method.

Edit: Re-reading your post I realized this may be a little more complicated than what you were asking for. To answer the question of how to link the player and the ground movieclip I would say you should have a Game container to store them both in. The Game container can be a blank movieclip or sprite that is added to the stage, the player and the ground is then added to the Game. Logic for detecting collisions between the ground and the player (from the sounds of it hittest) would be run by the Game on an ENTER_FRAME loop or equivalent.

 
Flag Post

Topic: Game Programming / Isometric objects depth[as3]

Maybe he is building his own library or something. I think his problem sounds similar to the one in this link (also has a helpful picture to visualize the problem better) unless I’ve simply misread his post. It sounds like breaking the objects up into multiple 1×1 sorted objects is a viable solution.

 
Flag Post

Topic: Game Programming / Mochi Shutting Down

Nice tutorial funstorm, I added it to my favorites as it seems very helpful. I hadn’t used mochibot but I used playtomic a few years back and had been meaning to find a better analytics solution as playtomic changed. Does anyone know of any replacements for mochi live updates? I only used it just recently but it seemed really useful for updating my game and knowing that all versions spread throughout the web should be updated as well.

 
Flag Post

Topic: Game Programming / Mochi Shutting Down

Just got an email about it and thought I would make a post about it, you can read the mochi blog post here. I had just tried out mochi live updates too. :( I guess I will have to find another Ad service.

 
Flag Post

Topic: Game Programming / Ask the player to reload the page

IIRC Elona shooter had something like that, only unintended. The hardcore mode resets your save data before each day causing you to restart from day 1 if you lose. To get around that you could have two instances of the game open, play one and if you lost just save on the other and try again. I’m pretty sure thats the only way to get the impossible badge for that game, or I guess to have lottery winning luck.

 
Flag Post

Topic: Game Programming / Trying to Become a Game Dev- Need Help

Originally posted by Glutenfree4u:

Flash Builder is only $50
http://www.adobe.com/products/flash-builder.html

And if you have lots of moneys to spend there’s Flash Pro.

I think there was one free one that some people use but I forget the name.
Anyways once you choose which one you want to use then we can start teaching you the basics.

Flashdevelop is the name of the free IDE you mentioned, I would recommend it, especially since there is no monetary risk involved.

 
Flag Post

Topic: Game Programming / MochiAds disabled or not allowed?

Mochi has an agreement with Kongregate to not display ads on their site, so you can upload with mochi ads enabled. I used Mochi live updates with ads enabled for my latest game and it only shows the preloader Mochi has built in but no black box when played on kongregate.

 
Flag Post

Topic: Game Programming / Old GiTD Games Finally Finished

I finally published my game from over a year ago for GiTD#28 (Game in Ten Decades right?) “_ or Die”, Link and thought it’d be interesting to ask if anyone else has finished any of their GiTDs and wanted to share. I never hear what happens to those games after the contests end.

 
Flag Post

Topic: Game Programming / [AS3] Help with preloader needed!

If you place gotoAndPlay(2) within the kong preloader movieclip then it will attempt to go to frame 2 of the movieclip, not your main timeline. If you want to refer to the main timeline you could do something like

MovieClip(this.parent).gotoAndStop(2);

instead, assuming the kong loader is a direct child of the stage.

 
Flag Post

Topic: Game Design / Idle games..

I believe it is just games of the type ‘Just Chat’ that are not allowed anymore. Games that are essentially nothing so that Kongregate chat pops up and you can chat, AKA not a real game. Idle games are still around and allowed, in fact one is on the hot new games ATM named Idle Mine. Where the line is drawn between these two may be somewhat vague but from what you’ve described I’m almost certain your game is allowed.

 
Flag Post

Topic: Game Programming / [AS3] Parameter not working

Yea you need to set the class variable to equal the passed in parameter. this.gameMode refers to the class variable (Main’s gameMode) and gameMode refers to the parameter that is passed in which lives and dies in the constructor. They are both separate variables despite sharing the same name. You could probably better imagine whats going on if you switch the name of the parameter coming in to something else, but as shown this is not needed as the keyword “this” can be used to distinguish between the two variables of different scope.

Edit: A Little late in my response I guess. Glad to hear it worked.

 
Flag Post

Topic: Game Programming / [AS3] Parameter not working

It sounds like a problem with scope to me. Without seeing more of the Main class it is hard to tell. Do you by chance have a class variable in main declared as gameMode which you are not setting to equal the passed in constructor parameter gameMode? None of your constructor is posted so I can’t tell, but tracing gameMode within the constructor would give you the passed in parameter (the closest scope) which should be correct inside the constructor, but if you never set this.gameMode (the class-level variable) to equal the parameter then whenever you trace gameMode outside of the constructor it will remain unchanged as 0.

 
Flag Post

Topic: Game Programming / Update on Kong

Yea once you upload the game you should be able to hover over your profile at the top of the page and go into My Games, from there hovering over any of your games will display an Edit button which you can use to upload a new swf file to use for the game.

 
Flag Post

Topic: Game Programming / Boarder of a Game

Players should see exactly what you are seeing when debugging in FlashDevelop. The swf that is generated has width and height dimension (Project → Properties in FD) which is used when embedding the swf into kongregates page.