Recent posts by Shake_N_Baker on Kongregate

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.

 
Flag Post

Topic: Game Programming / How to Give Yourself a Heart Attack

There is a nice free book on git here

 
Flag Post

Topic: Game Programming / Making a simple RPG, need some tips on jobs and equips

I would think this would be an excellent choice for doing an entity component based design (which has been a topic that has sprung up rather recently on this forum). You could have the character have a job component and a weapon component as well as other types of equipment like armor component etc. The job component could simply have the string name as you have it now as well as maybe a list of constants for jobs to choose from, things like equipment may have some isUsable type of function which would take in the job component and return true or false whether the equipment is usable by that job class. For weapon components it seems you need a sprite and I would imagine it has some type of damage range and other data you want to store when the weapon is used which you would have all stored within the weapon component class for the given weapon (i.e. WoodenSwordComponent or something similar).

If your interested I would suggest reading a brief introduction into entity-component design from one of the users on this forum here.

 
Flag Post

Topic: Game Programming / as3 Inheritance problem

I believe you need to include super() inside the constructor

 
Flag Post

Topic: Game Programming / ...

I thought I’d just point out that I don’t believe you’ll be able to download, decompile and get the game to a working modifiable state seeing as it is multiplayer and thus has server-side code. Even though I’ve heard how horrendous playerio supposedly is for managing security I can’t believe that they would allow anyone to see the server-side of things which would be obviously terrible for security. The flash client-side should be possible though, but you’ll have to re-create the server-side.

 
Flag Post

Topic: Game Programming / as2:main timeline problem

You need to specify that it is a function by placing the keyword function in front of onEnterFrame, i.e.

function onEnterFrame()
{
	trace("Testing");
}
 
Flag Post

Topic: Game Programming / level editor?

Sounds like ArrayPainter which I think someone mentioned recently on the forums

 
Flag Post

Topic: Game Programming / [AS3 + Flash] How can you transition buttons like CSS3?

Based on the question it sounds like you are using Flash CSx, so (assuming you are) you can simply create a new button symbol with the Up, Down and Hit of the proper image you want in this state and for the Over state you can create a separate movieclip symbol with a shape tween between the two ends of the button color transition you want placing the actionscript

stop();

on the final frame of the movieclip. Then just place this movieclip on your button Over state and whenever you hover over your button it should do the transition you made in the movieclip.

 
Flag Post

Topic: Game Programming / Flash AS3, bitmapdata.draw(textfield) anti-alias

You’re going to lose quality whenever converting vector graphics into raster no matter what you do (zooming in won’t look like clear text but pixels)

 
Flag Post

Topic: Game Programming / Pathfinding trouble

It looks like the }else { is just floating around by itself not attached to anything. Seems to me that would cause path1 to always become traversable and nextOccupiedTile to become null no matter what if it somehow compiled.

 
Flag Post

Topic: Game Programming / GiTD #34 Completed, congratulations Moocowsgomoo!

Originally posted by vesperbot:

Yay I’ve beaten Space Shooter! The end boss is MEAN. One error and you’re out of hope to beat it. Grr. But I’ve made it that far.

Hahaha, well I’m glad someone was able to beat it. I struggled with the boss myself when testing it.

Congrats Moocow on winning! And for everyone who gave me feedback on my game thanks! I’ve tried to incorporate changes based on a lot of the feedback I got from you guys (hopefully its a little bit less grindy now) and am planning to throw it up on FGL to see how it does.

 
Flag Post

Topic: Game Programming / GiTD #34 Completed, congratulations Moocowsgomoo!

Truefire: The first time I spawned the large world I fell a considerable length into a dirt hole with some grass. I read the notes and proceeded to collect some dirt and grass and after some guessing managed to find the correct slots to craft my axe. Sadly there were no trees to cut down in the dirt hole and when I decided to go diamond diving I discovered I could not break rock and could not get back up to my dirt hole. Trapped I destroyed that miserable world and replaced it with a cozier smaller one which had me spawn right up on the grass tree dotted terrain. This time through I was able to craft all of the items and had fun using the scissors to place dirt down (I discovered I teleported when placing a patch of dirt on myself). Overall I really enjoyed what there is to play so far. That said I’d really love to see where you go with expanding on this (I think it’d be awesome to see more destructive things in game, like TNT :D)

Elzius: This game appears at the moment to be a type of idle game where you can both create and destroy the small village buildings and collect items from them over time. I built one of each building at the start then made some wheat fields and discovered that everything needed wood and proceeded to make many woodcutters until I hit 999 wood. After that I made quarries and wheat fields until I had plenty of resources to make lots of temples and towers. At this point there didn’t seem to be a whole lot to do. Visually I really like how the game is set up, building a little village and watching it grow seems like a good way to waste some time playing a flash game. I do enjoy playing a good idle game every now and then and this game looks like it could be the start of a very fun one.

3ndl3ss: As some of the others have already stated the text was really hard to read. When I first clicked the start button it took me a few seconds to realize that the stuff infront of me was actually legible text, which I suppose was the effect you were going for but just note that most people (myself included) prefer a more legible font. Overall there isn’t really much to say, I guess I liked the music but I found the question sadly disappointing after the build up you gave it (I don’t know what I was expecting, maybe a clever joke or something).

Qwerber: I’m still not exactly sure what I’m doing in this game but it all looks good. The little… guy whatever he is ran down to the bottom of the stage after munching through some stuff while I was discovering the controls. I thought the lighting was pretty cool and seemed like it must’ve taken quite a bit of time to get it to work. As for whatever it is that I shoot by pressing C when I spam it my laptop slows down, then again I’m not sure I’m supposed to have 20 glowing squares bouncing around the screen. I could see the lighting system being used to give something of a scare when you can’t full see what is behind a wall. I’m not much of a fan of platformers in general but I’d definately be willing to check this one out when you’ve made more progress.

Moocowsgomoo: The first time playing through I had the simple strategy of click the shape that shows up on the screen the most, which seemed to work for the first mode. Attempting my same strategy on the other two modes however showed me that there is in fact quite a bit of strategy in choosing. I thought the layout of the screen was well done simple and clean, perhaps adding something to indicate what has been effected by your turn (as some of the other suggested) could also help in clairifying how the game works. I think this is a charming game and with a bit of clarity and polish could really be something. Nice job!

Shalmezad: I was able to get to level 3 with only one cluster of 5 molecules left when I clicked it and it exploded and after drifting for awhile reformed consuming the last of my energy. This game reminds me of a few other chain reaction type games i’ve played in the past, where timing and choosing what to click are the core mechanics. Sadly I was unable to determine what caused some of my molecules to bounce off each other while others latched on, perhaps knowing this would have helped when choosing what and where to click. As it is the game is rather difficult and random as I am attempting to click a molecule when it will explode and not touch ANY other molecules. Perhaps that is as you designed it but I’d really like to see some sort of coordination with the colors of the molecules and how they react to one another.

Darkscanner: Another game which appears to be something of an idle game in the making. I really loved messing with the little stick guys, it reminded me of playing with the folk in roller coaster tycoon. Sending a lumberjack flying into the air just to come hurtling back down and flatten into the earth is oddly amusing and grabbing a parachute stickman and throwing him out the side of the screen was also quite satisfying. As for the actual game there does not seem to be much to talk about. I held down the mouse click and drug out of the screen to allow permanent rain and then watched as the forest grew. The graphics looked nice but after about 5 minutes of forest growing the game began to slow down alot on my laptop.

My votes:
1st place: Truefire
2nd place: Moocowsgomoo