| |
Hide the progress bar forever?
Yes
No
Recent posts by Kreg on Kongregate
Kreg
85 posts
|
Topic: Game Programming /
Flash and HTML5
Just my quick two cents. Right now, flash games are fairly big, and if you’re thinking about getting into programming with flash, whether it will be around indefinitely or not isn’t necessarily the issue. If you are starting to learn how to program games, and are using flash to do it, there is nothing wrong with that, and if you’re going to try to make money at it, there is definitely a market right now for that. The important thing, is that programming concepts and principles will carry over to any language that you decide to move to in the future. So, since flash is popular now, and seems fairly stable, and is very easy to distribute (especially with great sites like Kongregate), I think it’s a great language to learn some programming with, and to develop games for.
Just my two cents. Just remember that the gaming market isn’t going ANYWHERE, it just gets bigger, so learn the concepts now, and just realize that in the future, there is certainly possibility of change, but the concepts will transfer :)
|
|
|
Kreg
85 posts
|
Topic: MARDEK RPG: Chapter 3 /
Animus super easy (spoiler for those having trouble)
Ok, so this worked really well for me… I actually beat him on my first try. (Well, technically it was my second, but that was because I had a shield item on, so my whole party got insta-killed)
Also, this can be done with just about anyone, as long as you have Elwyen in the group.
The concept is pretty easy. Just use Elwyen’s runic rhapsody. You need her spirit to be super high though (you are going to want it to be 90-100). Her spell will reduce the spell damage done on your party (which is the only way they’re going to get attacked in this fight) by a percentage equal to her spirit. What’s the best way to get her spirit high enough?
There are special magic potions that Gloria can brew. I just made a bunch of those. The crystallized tears you get from the giant eye balls (I fought a ton of them in the dungeon that had Karnak in it, leveling everyone up to fight solo at the arena). Anyway, the potions add 10 to a character’s spirit for an entire battle.
I brought about 10 of those potions with me. Then, I equipped Mardek and Gloria with 5 each. I just had Sslen’ck on auto attack (equipped with the haste/berserk scarab) Gloria and Sslen’ck are optional though, just get Elwyen’s spirit to 100 using the potions, and hack away at the boss. Honestly, it took less time than most of the boss battles have.
Good luck all!
|
|
|
Kreg
85 posts
|
Topic: Game Programming /
as3 dynamically modifying a movieclip
I did some research on BitmapData, and that’s exactly what I needed. Thanks so much!
|
|
|
Kreg
85 posts
|
Topic: Game Programming /
as3 dynamically modifying a movieclip
I’m not sure if this is even possible, but I think that it would have to be, judging from the way some people’s games work…
I’m making a game that’s likely to be rather gory. There will be a main area the player will run around in, and enemies will come from off screen to attack the player. I would like the gore to stick around, when an enemy dies.
I am thinking that the least memory-intensive way of doing this would be to somehow modify the background to add the gore to it. So, instead of flash having to keep track of 500 stationary movieclips, it’s just keeping track of one picture, and adding color splotches to it periodically.
Alternatively, if that’s not a possibility, maybe I could dynamically create a “goreholder” clip, dynamically add to it in the same way, and just set it’s index to immediately above the background.
Is this even possible to do?
|
|
|
Kreg
85 posts
|
Topic: Game Programming /
Circular Health Bar...?
I would just use a semi circle, with an identical semi circle as a mask. Then, I’d set the registration point in exactly the center of where a full circle would be. Then, just rotate it depending on health. Seems like a bit less work and coding :P
|
|
|
Kreg
85 posts
|
Topic: Collaborations /
Falling Debris: A Successful Collab
I went ahead and posted a few things that I hope end up being useful to future collaboration efforts. (I put them in the spot that I reserved, right after David’s initial post).
|
|
|
Kreg
85 posts
|
Topic: Collaborations /
Falling Debris: A Successful Collab
Overview
I would like to give an awesome, organized, informative, and helpful guide to creating a successful colaboration (like David did). I consider myself, however, to be neither very articulate at expressing my ideas, nor very experienced in the game production world. But I’ll give it my best shot. :P
Resources
I am, as many know, very very new to programming. I started with as2, by getting about halfway through the shootorials, then decided as3 would be better to learn in early November. Overall, I’ve been programming for maybe a month and a half. I figured I’d list some of the resources I used to help me pick up what I needed. If you’re not new to actionscripting, these might not be as useful for you.
Michael J. William’s avoider game tutorial. This is the only one that I’ll really go into any detail with. I recommend it VERY highly if you’re just starting off. These tutorials hit a chord with me… he explains in exactly the way I learn, and goes into details that help generalize the principles, so that they can be used elsewhere. I very much recommend this site. Also, Michael is very good about answering individual problems you may be having in cusomizing the code to your game. An incredibly valuable resource. Thank you Michael!
http://www.adobe.com/support/flash/action_scripts/actionscript_dictionary/actionscript_dictionary505.html
http://asgamer.com/category/tutorials
http://livedocs.adobe.com/flash/9.0/main/wwhelp/wwhimpl/common/html/wwhelp.htm?context=LiveDocs_Parts&file=00001136.html
http://www.foundation-flash.com/tutorials/index2.php
http://www.republicofcode.com/tutorials/flash/as3conditionals/
http://www.mrsunstudios.com/tutorials/
http://www.flashkit.com/
http://www.lynda.com/home/DisplayCourseN.aspx?lpk2=366
Kongregate Programmer’s Forum (or, any actionscript forum, probably).
Any time I wasn’t able to find the answer to a problem I was having by myself, I would turn to the forums. Usually I would have my problem solved within an hour of posting, as there are some VERY good programmers that are more than happy to help out. One thing though: Make sure to try your hardest to solve the problem on your own first. I have seen many a post on the forums where there had been no research done beforehand, and some where the posters even refused to do any research at all. To get the most out of the forums, realize that people are taking time out of their schedules to answer your questions.
Guidelines
A few things that I noticed in this collaboration that I believe to be very important.
Open-Mindedness: This is something that I would not have considered beforehand, but I now recognize as fairly important. When I started on the project, I had certain things that I envisioned for the game, as did David. Obviously, whenever you’re working with another person, you’re going to have to realize that you will have ideas that you might think are good, but you’ll have to be flexible, as your partner(s) may not agree. Discuss in detail how the game’s going to turn out, so that you’re on the same page with everything. Which brings me to my next point:
Communication: This one is HUGE. Every time I made a change in the game, I would add it to a list, no matter how small the change was. Every time I posted an updated version of the game, I would (usually just by sending an e-mail) also put in a list of things that I had changed since the last version. That way, everything was out in the open, David would know what specifically to look at, and we could decide what needed adjusting. We also talked frequently through MSN, letting each other know what was needed, and what each of us were doing. Communication is CRUCIAL!
Clarity: Just a part of communication, really. But look for specifics. With programming, things are done in a very specific way, so if we only have a general guideline of what to do, it makes the work much harder, seem much more daunting, and take much longer. For example, we decided that the game needed powerups. So we decided together the different powerup possibilities, and then specifically what each powerup would do, how long it would last, etc. Again, our game was simple, so this example is simple, but especially for a more complicated game, clarity is very important.
Work-Ethic:Know that it’s going to take a lot of work. Honestly, I figured it would take maybe a week to get everything programmed (getting the bones of a game up is relatively quick, compared to the rest). It ended up taking over twice as long, with a LOT of hours put in, almost every single day. If you’re going to join a collaboration, make sure you can put in the time you’ll need to in order to avoid frustrating anyone you might be working with.
Preparedness: I know there are some AMAZING programmers here. This might not apply as much to them. The main reason I volunteered to do this project with David, was because I was pretty sure I knew everything that I would need to already for the programming. This ended up not really being the case, as there were a LOT of unexpected things I had to learn but I did understand the basics. Getting hung up on really little things would take me HOURS sometimes of researching, testing, bug fixing, etc. Basically, make sure you know at least most of what’s going to be required for the programming, or your partner(s) may quickly become frustrated. (Luckily, David was very patient with me, and the time it took to figure out some of the problems I was having).
Beta-Test:This is absolutely essential. I don’t think that you necessarily need assigned beta testers as part of the development team (though, I don’t see why it would be a bad idea), but make SURE to get as much feedback as you can. If you’re lucky, the game is going to be played by a LOT of people, so you want to appeal to as many different kinds of people as possible. (Also, see open-mindedness above :P) Just beta test as much as you can!
Organization: This kinda goes along with clarity, etc. I found it helpful to have a list of things that I needed to get done. As I made changes, I would add to the list, as necessary (it seems like for every change you implement, five more pop up). I would also keep a list of things that would need to be updated on the graphics side of things, that I could pass along to David. I would also routinely share my list with David, just in case there was anything he noticed that I hadn’t included.
finding someone to work with: This is a pretty controversial topic, here in the kongregate forums, due to a lack of faith in the quality of people looking into starting a colab. The reason I chose to work on David’s project, is that he appeared to be serious about making a good quality game, and making money from it. He had already posted the GDD, examples of his artwork, and what his goals were for the game. In other words, he had gone through considerable effort before he started looking for a collaboration team. This showed that he was serious, and determined, and that made him appear very good to work with. If you want to put together a successful game team, and attract “good” team members, this is an excellent example to follow.
Well, I hope I didn’t ramble, and some of what I said can be of use in successful collaborations.
Also, I’d just like to join in thanking everyone who helped beta test the game. Also, to everyone who helped me here on the forums (the most frequent answer’ers to my noobish questions are undoubtedly Unknown Guardian and Moonkey, though there were many others as well. Thank you all!
|
|
|
Kreg
85 posts
|
Topic: Collaborations /
Have there been any successful collaborations?
Hey, I just figured I’d post the final product of my collaboration with DavidArcila. I am totally happy with this collab!
http://www.kongregate.com/games/Kreg/falling-debris
I really did luck out though, working with David… he’s an amazing artist (obviously!)
|
|
|
Kreg
85 posts
|
Topic: Game Programming /
bizarre cs4 problem *solved*
heh, yeah, I know. I feel dumb for not trying that first :P I had never heard of anything like it before
|
|
|
Kreg
85 posts
|
Topic: Game Programming /
bizarre cs4 problem *solved*
hmm… actually it looks like it was just a problem with my computer. I tried a simple reboot, and now it’s working fine :) thanks!
|
|
|
Kreg
85 posts
|
Topic: Game Programming /
bizarre cs4 problem *solved*
If I double click it, it just opens in an internet browser. The problem is, the same problem seems to be coming up if I upload the game into Kongregate. (I tried using the practice feature).
|
|
|
Kreg
85 posts
|
Topic: Game Programming /
bizarre cs4 problem *solved*
I’m using cs4, and when I open the FLA file, I can run my game with no problems. When I try the SWF, however, a bunch of problems come up… really obvious ones (like, parts of movieclips whose alpha I’ve set to 0 show up). I’ve tried deleting the SWF, and choosing the publish option from CS4, but no dice. Any ideas?
|
|
|
Kreg
85 posts
|
Topic: Game Programming /
costom cursor
I’m new to programming… but I might do it like this:
The way I can think of to do this, is to use the mouse.hide command like normal for any custom cursor. Then, you can put ROLL_OVER event listeners on anything you want “snapped” to, with code something like this:
function SnapInPlace(){
MouseCursor.x=this.width/2
MouseCursor.y=this.height/2
}
That’s as3… don’t know if that’s what you needed or not. Just a suggestion, it’s about the only way I can think of to do it, but again, I’m new to coding :)
|
|
|
Kreg
85 posts
|
Topic: Game Programming /
problem with this code (AS3)*solved*
Perfect, that’s exactly what I needed to know. I just set pauseStart and pauseStop to be class variables instead of variables defined in the function, and it works great. Thanks so much!
|
|
|
Kreg
85 posts
|
Topic: Game Programming /
problem with this code (AS3)*solved*
I have pauseTime in with all of the other class variables. It’s defined,
public var pauseTime:Number
Then, in my constructor, I have,
pauseTime=0
Doing a trace right when the game starts does, indeed, tell me that pauseTime=0
|
|
|
Kreg
85 posts
|
Topic: Game Programming /
problem with this code (AS3)*solved*
That’s actually what I want though… because if the game gets paused and unpaused more than once, the formula should still work, right? And I can just add the amount of time the game has been paused to the pauseTime class variable
EDIT:
Heh, does it make sense what I’m trying to do? theoretically, the code will work like this:
Any time the “p” button is pressed, the current time is saved in pauseStart. When the game is unpaused, the time again is saved as the variable pauseStop. pauseStart is then theoretically subtracted from pauseStop (to equal the amount of time the game was paused), and this number should be added to the class variable pauseTime.
So, theoretically, pauseTime should be an accurate guide to exactly how long the game has been paused.
heh, is that more clear?
|
|
|
Kreg
85 posts
|
Topic: Game Programming /
problem with this code (AS3)*solved*
Hey, I feel dumb that I have to post so much to fix these noob problems. Thanks everyone for being patient! I’m working hard to get up to speed so that I can be a question ANSWERER instead of an asker.
Anyways, I need to be able to keep track of how long the game has been paused. Here’s the code I’m trying to use:
if (event.keyCode80) {
var pauseStart:Number;
var pauseStop:Number;
if (gameIsPausedtrue) {
pauseStop=(getTimer()/10);
pauseTime+=(pauseStop-pauseStart);
trace(pauseStop)
trace(pauseTime)
gameTimer.start();
gameIsPaused=false;
} else if (gameIsPaused==false){
pauseStart=(getTimer()/10);
trace(pauseStart)
gameTimer.stop();
gameIsPaused=true;
}
}
pauseTime is a publicly defined class variable set to equal a Number.
The traces work for pauseStart and pauseStop. I get the correct time. When I trace pauseTime though, I get NaN (I assume it means Not a Number).
I’m sure it’s something terribly simple, and I’ll feel like an idiot when I get shown what the problem is. Thanks in advance!!
|
|
|
Kreg
85 posts
|
Topic: Game Programming /
AS3 *unsolved* what gets loaded before first frame?
I think I may have figured out what’s going on… searching the net, I found out that classes load in the first frame (that’d be all that actionscript undoubtedly). I have one main class (documentclass), and my other classes are all based on movieclips. Maybe they’re somehow attached, so that I can’t load just the class, but the game has to load the associated movieclip as well (for example, the RocketShip movieclip’s as file says, “public class RocketShip extends MovieClip”… that’s all I can think of. And I can’t think of a way to fix it.
I did check every single thing that gets exported, and none of it gets exported in the first frame, so that’s all I can think of. Also, I tried changing things so that classes get loaded in frame 2, and that DID get rid of everything extra that gets loaded. Unfortunately, it also disabled the preloader from working at all, since it gets called in the documentclass. Maybe I need to fiddle with that some more, and extend the preloader class.
|
|
|
Kreg
85 posts
|
Topic: Game Programming /
AS3 *unsolved* what gets loaded before first frame?
hmm... yeah, I can tell there's already a bunch of stuff that loads on frame 1... and I'm *pretty* sure it's the artwork. Here's a detailed list of the memory usage in the game (note that I'm putting into pre brackets to make it easier to read, but this is NOT anywhere in my code :P
Falling Debris.swf Movie Report
--------------------------------
Metadata
--------
Bytes Value
----- -----
1260 <rdf:rdf> <rdf:description> <xmp:creatortool>Adobe Flash CS4 Professional</xmp:creatortool> <xmp:createdate>2009-11-19T14:34:02-07:00</xmp:createdate> <xmp:metadatadate>2009-12-08T13:20:20-07:00</xmp:metadatadate> <xmp:modifydate>2009-12-08T13:20:20-07:00</xmp:modifydate> </rdf:description> <rdf:description> <dc:format>application/x-shockwave-flash</dc:format> </rdf:description> <rdf:description> <xmpmm:derivedfrom> <stref:instanceid>xmp.iid:9C10E892A9DEDE119C2D83234BF948E3</stref:instanceid> <stref:documentid>xmp.did:9C10E892A9DEDE119C2D83234BF948E3</stref:documentid> <stref:originaldocumentid>xmp.did:ECBB234F46D5DE11A362EF73AF7E0001</stref:originaldocumentid> </xmpmm:derivedfrom> <xmpmm:documentid>xmp.did:292FFCD035E4DE119FDAC39CFA17E6A4</xmpmm:documentid> <xmpmm:instanceid>xmp.iid:292FFCD035E4DE119FDAC39CFA17E6A4</xmpmm:instanceid> <xmpmm:originaldocumentid>xmp.did:ECBB234F46D5DE11A362EF73AF7E0001</xmpmm:originaldocumentid> </rdf:description> </rdf:rdf>
Frame # Frame Bytes Total Bytes Scene
------- ----------- ----------- ----------------
1 639717 639717 Scene 1 (AS 3.0 Classes Export Frame)
2 6207091 6846808
3 5 6846813
Scene Shape Bytes Text Bytes ActionScript Bytes
------------------------- ----------- ---------- ------------------
Scene 1 0 0 19350
Symbol Shape Bytes Text Bytes ActionScript Bytes
------------------------- ----------- ---------- ------------------
Preloader 0 292 0
AssetHolder 0 0 0
SkipButton 0 0 0
ContinueButton 0 0 0
ShieldAnimation 0 0 0
SlowMotionPowerUp 0 0 0
ShieldPowerUp 0 0 0
HealthPowerUp 0 0 0
InstructionsScreen 0 0 0
MuteBGMButton 0 0 0
CreditsScreen 0 0 0
RedWarningScreen 42 0 0
IntroMovie 0 0 0
MuteX2 0 0 0
DebrisExplode 0 0 0
MuteSFXButton 0 0 0
Lifebar 0 0 0
HUDInterface 0 222 0
FallingDebris3 0 0 0
FallingDebris2 0 0 0
BackFire 0 0 0
RocketExplosion 0 0 0
CreditsButton 0 0 0
StartGameButton 0 0 0
BackToMenuButton 37 64 0
TryAgainButton 0 66 0
GameOverScreen 0 174 0
ShipNoseHitTest 35 0 0
hitdetector 37 0 0
DebrisHitDetector 32 0 0
FallingDebris 0 0 0
ShipExplode 0 0 0
IntroScreen 0 0 0
Background 0 0 0
RocketShip 0 0 0
Font Name Bytes Characters
---------------------- --------- --------------
BritannicBold 2901 %.0123456789:GLadegimno
Rockwell 4595 .0123456789MRaceinrstu
ActionScript Bytes Location
------------------ --------
19350 Scene 1:Frame 1
Bitmap Compressed Compression
----------------------- ---------- -------- -----------
Intro.jpg 66260 1440000 Imported JPEG=102
rl_0010.gif 1682 5720 Lossless
rl_0009.gif 1613 5720 Lossless
rl_0008.gif 1560 5720 Lossless
rl_0007.gif 1621 5720 Lossless
rl_0005.gif 1648 5720 Lossless
rl_0004.gif 1738 5720 Lossless
rl_0003.gif 1754 5720 Lossless
rl_0002.gif 1743 5720 Lossless
rr_0000.gif 1676 5720 Lossless
rr_0001.gif 1703 5720 Lossless
rr_0002.gif 1775 5720 Lossless
rr_0003.gif 1757 5720 Lossless
rr_0004.gif 1708 5720 Lossless
rr_0005.gif 1689 5720 Lossless
rr_0006.gif 1613 5720 Lossless
rr_0007.gif 1601 5720 Lossless
rr_0008.gif 1584 5720 Lossless
rr_0009.gif 1647 5720 Lossless
rr_0010.gif 1590 5720 Lossless
life_bar.png 1517 20976 JPEG Quality=80
HUD.png 2916 29184 Lossless
mute_button.png 554 1088 Lossless
x2.png 360 624 Lossless
BGM_button.png 431 624 Lossless
starfield.gif 3734 360000 Lossless
start-game.png 5107 55264 JPEG Quality=80
credits.png 4106 35752 JPEG Quality=80
gameover.png 73189 1440000 JPEG Quality=80
credits.jpg 77829 1440000 Imported JPEG=102
Instructions.jpg 71160 1440000 Imported JPEG=102
Event Sounds: 22KHz Mono 16 kbps MP3
Sound name Bytes Format
----------------------- --------- ----------
WarningSound 15823 11KHz Mono 16 kbps MP3
SlowMotionSound 43487 22KHz Mono 32 kbps MP3
ShieldSound 40991 22KHz Mono 32 kbps MP3
RocketSound 238799 22KHz Mono 32 kbps MP3
IntroMusic 223407 22KHz Mono 32 kbps MP3
HealthSound 16967 22KHz Mono 32 kbps MP3
ExplosionSound 29818 11KHz Mono 16 kbps MP3
DebrisHitSound 7191 22KHz Mono 32 kbps MP3
BackgroundMusic 1048231 22KHz Mono 32 kbps MP3
Video Compressed
------------------------ ----------
skip_button_loop 21766
Intro_Movie 509428
credits 33133
start-game 39844
continue_button_loop 38930
shield 400347
slow-motion_icon 16991
shield_icon 190813
health 53483
shuttle_gets_hit 62663
burningman_rotating 638926
Burningman_vertical 633147
blazing_debris 222579
debris 95223
huge_explotion 920117
backfire normal 89181
As you can see, there are some 600,000 bytes in the first frame. I am guessing that the artwork is a major portion of that, but I'm not sure what to do about it.
|
|
|
Kreg
85 posts
|
Topic: Game Programming /
hitTest problem
not sure what as2’s capable of… but doesn’t it have a ROLL_OVER mouse event? you could use that for the white part of the screen
|
|
|
Kreg
85 posts
|
Topic: Game Programming /
hitTest problem
an easy way out would be to just say, “if you get more than halfway out of the grey area, you lose”. Then, you could set the regestration point of the circle to be centered, and add a mouse event to the grey area ROLL_OUT, in as3
|
|
|
Kreg
85 posts
|
Topic: Game Programming /
hitTest problem
ahh, I see. What I do for all my hittests, is I actually have my own invisible hittest regions on the movieclips. I set their alpha to 0 (either in code, or in the movieclip), give it an instance name of hittest, and run my tests against that. You can add more than one of them too. In AS3, the code would be:
if ((myMoveClip.hittest.hitTestObject(myOtherMovieClip.hittest)||(myMovieClip.hittest.hitTestObject(myOtherMovieClip.hittest2))
{do whatever}
is that closer to what you were looking for?
EDIT:
hey, just actually looked at your game, and I don’t think that method would work. I should have taken a look to begin with. Sorry :(
You actually could use the method I decribed, but it’d be a lot of little hittest boxes. I’m sure there’s an easier route, though I am unsure of what it would be
|
|
|
Kreg
85 posts
|
Topic: Game Programming /
AS3 *unsolved* what gets loaded before first frame?
Ok, awesome, I got it mostly working, by putting the sound files each on their own frame of the assetholder movieclip. I don’t really understand why those sounds loaded on the first frame to begin with, since they weren’t exported on the first frame… but I guess that they’re not loading on the first frame anymore, and that’s what counts.
Now the preloader starts at around 9%… far more acceptable. I am pretty sure it’s because of the artwork I have imported in. The artwork never gets exported. any ideas on what I could do to make it not get downloaded on the first frame?
By the way, I tried setting all of the artwork TO be exported (but not on the first frame), and then puttingthem into the assetholder with all the other movieclips. It didn’t work, and I’m unsure of what else to try
|
|
|
Kreg
85 posts
|
Topic: Game Programming /
hitTest problem
I would probably just do it like any other hit detection. For example… on the TimerEvent function (or enterFrame function), just have an if (hittest clause), and then put your run game functions in that. then, have an else (losegame) function.
There’s probably just some way you can say if(!hitTestObject), and do it that way too. Either way would work, I would think :)
|
|
|
Kreg
85 posts
|
|
|
|