Recent posts by hurricane112233 on Kongregate

Flag Post

Topic: Game Programming / How to switch frames in this case?

You’re the man!

Thank you again!

 
Flag Post

Topic: Game Programming / Java: I just need to make a bloody gameloop that does not eat cpu ._.

Originally posted by UnknownGuardian:

That is assuming that whatever happens each frame takes less than 1 ms. You probably should measure how long the frame takes and subtract that from 17.

Also, @hurricane ErlendHL has used Flash before. ;) Check his post history.

Yes you are right…

So @ErlendHL, if you want to do it in Java, go ahead!

To make it easy, I suggest you to make Classes that deal with some repetitive actions automatically, then you just need to call one or more specific functions to make an action. For example a Class Drag with a function execute that receives an Object and makes this object draggable…

 
Flag Post

Topic: Game Programming / Java: I just need to make a bloody gameloop that does not eat cpu ._.

What is eatting your CPU is the quantity of unnecessary loops you’re doing…

You want 60fps right?

60fps is approximately 1 frame in 17 milliseconds ((1 / 60) * 1000)

So do it:


while(running){
//what will happen in each frame
Thread.sleep(17);
}

I suggest you to start using Flash, because I’ve tryed to use Java to make games and is too difficult comparing to Flash
Programming in Java is much better then Flash, but making games, Flash is better…

The reason is that Flash was made to make animations, it has a lot of stuffs that helps to create games and animations, and Java was made to program easily, it has a lot of API’s and logics that helps in programming.

 
Flag Post

Topic: Game Programming / How to switch frames in this case?

Hi everyone!

I’m trying to make a new game, now I’m trying to separate the menus in different frames, but it isn’t working like I wished…

The frames are separated like this:
– frame1: Start Menu
– frame2: New Game Menu
– frame3: Load Game Menu

In the first frame, I have a button to go to the second and another to go to the third. And in the second and third, I have a button to go back to the first.

I made this code:


function onLoad(){
     _root.gotoAndStop(1);
     _root.newGameB.onPress = function(){
          _root.gotoAndStop(2);
     }
     _root.loadGameB.onPress = function(){
          _root.gotoAndStop(3);
     }
     _root.backMenuB.onPress = function(){
          _root.gotoAndStop(1);
     }
}

the buttons: newGameB and loadGameB are in the 1st frame; and the button: backMenuB is in the 2nd and in the 3rd.

What is happening is that I’m able to go to the 2nd or 3rd frames by the 1st, but I’m unable to go back by the backMenuB button.

What should I do to make it work?

Tks!

 
Flag Post

Topic: Game Programming / Change Combo Box label?

Originally posted by Draco18s:

ComboBoxReference.selectedIndex = SomeValue;

The value passed is the index of the label you want (likely one less than the current frame).

Thank you so much!

 
Flag Post

Topic: Game Programming / Change Combo Box label?

Hi everyone!

I’m testing Combo Boxes and frames. My project is like this:
– I have a Movie Clip with 3 frames;
– 1 Button that changes this movie clip frame to the next one;
– 1 Button that changes this movie clip frame to the anterior one;
– 1 Combo Box that switches the frames.

Everything is working but, when I click on a Button to change the Movie Clip frame, I want that the label of the Combo Box changes too.

What would be the comand to do that?

tks!

P.S.: I’m using an external class in AS2

 
Flag Post

Topic: Game Programming / How to make a click and drag formulary in Flash

Here is the game I was doing:
http://www.kongregate.com/games/hurricane112233/snake

The option menu is dragable…

 
Flag Post

Topic: Game Programming / How to make a click and drag formulary in Flash

I found the sollution:
(I’ll replace the _ symbol to the \ becaus kongregate changes it to italic)


class Form extends Movieclip{
   function onLoad(){
      \root.form.onMouseDown = function(){
         var f\wh\2 = \width / 2;
         var f\ht\2 = \height / 2;
         if((\xmouse > 0 – f\wh\2 && \xmouse < f\wh\2)&&(\ymouse > 0 -f\ht\2 && \ymouse < f\ht\2)){
            this.startDrag();
            trace(“inside”);
         }else{
            trace(“outside”);
         }
      }
      \root.fundo.onMouseUp = function(){
         this.stopDrag();
      }
   }
}

 
Flag Post

Topic: Game Programming / How to make a click and drag formulary in Flash

I love this way you did it, feartehstickman, tks!

But do you know how to make it in Action Script 2?
And how to import the MouseEvent in the Action Script 2?

Because I’ve started my project in AS2, not in AS3…

tks!

 
Flag Post

Topic: Game Programming / Best way to learn flash?

I’m learning too…
To do it I’m watching many random and/or specific videos from YouTube.
And like I_love_you_lots said:“annoying varius forums”…

So, if anyone knows how to answer this question, I would be glad!
http://www.kongregate.com/forums/4-game-programming/topics/329690-how-to-make-a-click-and-drag-formulary-in-flash

 
Flag Post

Topic: Game Programming / How to make a click and drag formulary in Flash

Hi everyone!

I’m trying to make a box that contains a formulary. I’ve already built this box with it’s texts, text boxes, buttons, images…

Now, I discovery that it’s possible to drag this box using Action.
The code is something like this:

on(Press) = function(){
startDrag(this);
}
on(Release) = function(){
stopDrag();
}

I’ve done and it worked well!

But my problem is that doing it, I became unable to write things on the formulary and press the buttons.

So, I want to know if there’s any way to do a box with a formulary in it that can be dragged (that doesn’t jeopardize my form…)

I dislike to make Actions, so if there’s any way to do it in ActionScrips (classes), I would be glad!

 
Flag Post

Topic: Game Programming / How to save data using Flash

Now I understood what I was doing wrong…

It’s about these things:
– The Symbol (MovieClip and Button);
– The Instance of this symbol;
– The Class of this symbol.

The first is a common symbol that can be used many times;
The second is an specific symbol between others of the same type (can be named or not);
The third is what a symbol do.

I was trying to make a class that commands a Symbol(button) called “SaveB” extending the Button class,
I thought doing this, it would work for all “SaveB” buttons that I placed at the screen.

The problem wasn’t the save itself, but the function onPress. Pressing the button didn’t enter in the function. (I tryed to put a trace() in that to test)

To solve it, I did differently, I placed the symbol of the button and named it’s Instance by “saveB”

Then, in my Class “Square” I put on it’s “onLoad()” function: (with flush)


\root.saveB.onPress = function(){
var so:SharedObject = SharedObject.getLocal(“MySave/Data”, “/”);
so.data.Square\x = \root.square.\x;
so.data.Square\y = \root.square.\y;
so.flush();
}

And: (without flush)

\root.loadB.onPress = function(){
var so:SharedObject = SharedObject.getLocal(“MySave/Data”, “/”);
\root.square.\x = so.data.Square\x;
\root.square.\y = so.data.Square\y;
}

I called the instance of these buttons (saveB and loadB), not the symbol(SaveB and LoadB)…

I tested with a trace() again and worked!

I hope it can help someone!
Tks Draco18s and evan999333 for the tips!

 
Flag Post

Topic: Game Programming / How to save data using Flash

I`ve done this:


class SaveB extends Button{
function onPress(){
var so:SharedObject = SharedObject.getLocal(“MySave”);
so.data.Square\x = \root.square.\x;
so.data.Square\y = \root.square.\y;
so.flush();
}
}

And this:


class LoadB extends Button{
function onPress(){
var so:SharedObject = SharedObject.getLocal(“MySave”);
\root.Square.\x = so.data.square\x;
\root.Square.\y = so.data.square\y;
so.flush();
}
}

but still not working…

Do you know what I still doing wrong?

 
Flag Post

Topic: Game Programming / How to save data using Flash

Hi everyone,
I’m trying to make a simple save button, but it’s not working…

Here is the code: (I don’t know how to use the _ symbol in kongregate without become italic, so I’ll substitute it to a \ symbol)


class SaveB extends Button{
     function onPress(){
          var so:SharedObject = SharedObject.getLocal(“MySave”);
          so.data.Square\x = \root.square.\x;
          so.data.Square\y = \root.square.\y;
     }
}

Do you know what I’m doing wrong?
tks!

 
Flag Post

Topic: Dungeon Rampage / Sell Chests... What is your opinion?

Really nice what (s)he said (in other forum)…

Originally posted by metalklok:

\i would like to suggest more gold from dungeons/

Im in the first stages of the grind house map and still i don’t get that much gold, the best stage so far to get gold
would be Dark Barrows Boss on Champion League 1200 gold per run also i timed myself (lv42 chef) in a group of
four around the same level doing one run of dark barrows boss and it was 1:54 so i will just round it to 2 minutes
per run so let me start

1 common key=1 run, 2 mins
1 uncommon key=4 runs, 8 mins
1 rare key=17 runs, 34 mins
1 legendary key=105 runs, 210 mins or 3 hours and 30 mins
Ranger=17 runs, 34 mins
Chef=34 runs, 68 mins or 1 hour and 8 mins
Sorcerer= 84 runs, 168 mins or 2 hours and 48 mins
Vampire hunter=125 runs, 250 mins or 4 hours and 10 mins
Ghost samurai=200 runs, 400 mins or 6 hours and 40 mins
Pyromancer=400 runs, 800 mins or 13 hours and 20 mins

 
Flag Post

Topic: Dungeon Rampage / Sell Chests... What is your opinion?

LordBucket,
Nice analogy, but I think that the idea of the chests is that they are there to be ransacked, so you don’t know what is inside them… But I agree about buying (with real money) keys is madness, because you will never know what could appear and you are right about saying that many times doesn’t come what we expect to come.

Your suggestion is very good, but I don’t know if the developers could change the drops… because I don’t know how difficult is the source code of the game…

If they could I would suggest this form:
– In the “Rookie League”:        come around 90% of Common chests and 10% of Uncommon;
– In the “Gladiator League”:     70% Common, 28% of Uncommon, 2% Rare;
– In the “Champion League”:    50% Common, 45% of Uncommon, 5% Rare;
– In the “GrindHouse”:             30% Common, 50% Uncommon, 18% Rare, 2% Legendary;
– In the other that is coming:   25% Common, 40% of Uncommon, 30% Rare, 5% Legendary;



orange559,
I agree with you in some points, but something has to be changed…
Ok, the prices of the Rare and Legendary chests I suggest are high, so please, what price would you suggest for each one?

Rare: 1k / 500 / …?
Legendary: 5k / 2.5k / …?

If no one, what other way would you suggest? Because in the way it is the game ends up being boring and repetitive.
Don’t you think?



Originally posted by goodknife:

IMO, common: 100 , uncommon: 150 , rare 200 , legendary: 1000

What?!?!?! hahaha!
200 in rare and 1k in legendary is too low… don’t you think?
(and uncommon a little bit low too, but acceptable)

 
Flag Post

Topic: Dungeon Rampage / Sell Chests... What is your opinion?

My opinion is that chests should be sold, because keys are very expensive…

So I suggest this form:
– 12k for a Legendary;
– 2k for a Rare;
– 400 for an Uncommon;
– 100 for a Common.

I think this would be more reasonable, not so high (for the levels) and not so low.

What is your opinion, and what do you suggest?
Do you agree?

 
Flag Post

Topic: Epic War Saga / Questions? Ask here! ( game tips )

Originally posted by Kingdweeb1:
Originally posted by hurricane112233:

how I HATE energy bar! ! !
Why has someone invented this sh!7#?

because its a limit.

That is obvious!!!
But what I mean is: with it I have to spend almost ALL of my skill points in energy

And it is a GAME, it MUST NOT have a limit!!!
Who makes the limit is us or our parents!!! We play to spend Time with fun, not to spend Money with fun…

I know that this bar is just to us spend 50 crystals to refill and make a psychologic pressure to make us buy crystals (another obvious thing)

 
Flag Post

Topic: Epic War Saga / Suggestion and Ideas

Originally posted by Kingdweeb1:
Originally posted by VforVendetta:
Originally posted by hurricane112233:

I think Every Thing should be buyable with Gold, perhaps a little bit more expensive than with crystals.
Like, with 200 crystals I can exchange for 15,000 gold.
So something that costs like 100 crystals should be sold by 7,500 gold too… or a little bit more.

That would be nice.
The thing I liked about the past Epic War games was that you could potentially buy any and every unit without having to pay real money.
If you think about it, we do give more gameplays to the developer when we go back to play it more and unlock all the units for free. (paying with just our time)

I don’t know, I completely support Rudy and I love his games, but I’d really rather see donations/payments be optional rather than necessary to unlock every unit.

its not necessary, you can simply rebirth.

also, if it were to that ratio, then you could get seraphiel for wayy less than 1million gold, which is REALLY easy to get. the same would happen with tiger god.

Actually Seraphiel would cost 2,625,000 gold (3,500 crystals)… But as I said, it could cost more.
But to get 3,500 crystals you have to buy the option of 500 Kreds for 7,000 + 1,400 crystals.
In other words, you have to spend 50 dollars to buy it. (I think it is too expensive)

The Tiger God would cost 4,125,000 gold(5,500 crystals)
To buy both, you would have to spend 100 dollars/1000 Kreds for the option 15,000 + 3,000 crystals (WT#!)

Maybe 20,000,000 Gold for the Seraphiel and 35,000,000 Gold for the Tiger God…

I would NEVER spend $100.00 in a flash game!!!
With this money I can buy 3 or 4 games!!!
Or 6 months of WOW

 
Flag Post

Topic: Epic War Saga / Questions? Ask here! ( game tips )

how I HATE energy bar! ! !
Why has someone invented this sh!7#?

 
Flag Post

Topic: Epic War Saga / Suggestion and Ideas

I think Every Thing should be buyable with Gold, perhaps a little bit more expensive than with crystals.
Like, with 200 crystals I can exchange for 15,000 gold.
So something that costs like 100 crystals should be sold by 7,500 gold too… or a little bit more.

 
Flag Post

Topic: Game Programming / .fla and .swf of games

Originally posted by draganviper:

Sounds like he wants to just look at the source code for flash games he likes to see how they work.

Yeah!
You understood what I mean…

Originally posted by CuriousGaming:

Some random source code I’ve published in the past:

Mouse maze
http://www.kongregate.com/forums/4/topics/51463

Wish upon a star
http://pastebin.com/aYMS0S5s

Another random thing
http://archive.globalgamejam.org/2012/children-ouroboros

And more…
http://www.kongregate.com/forums/4-programming/topics/189551-game-recycling

Most of that code is old, or game-jam rushed spaghetti. But if you think you can learn something from it, feel free.

Good!
I’ll give them a look!

Originally posted by BigJM:

.fla’s are not saved to your computer. The .swf will be in your browser’s cache.

Thanks!
It was good to know!

Do you know how I can access them on Google Chrome?

 
Flag Post

Topic: Game Programming / .fla and .swf of games

I’d like to start programing flash games!!!
But I’ve never programed games yet… I just know Java and Web Design :(

So I’d like to see how some games are programed, just to have a notion of how to start a programming.
I’ve done all the Sootorial, but I think that is too basic for a real game programer.

So I just want to know where the .fla and .swf of games is saved in my pc to I have the notion…

For exemple: C:\Users\User\Documents\…

 
Flag Post

Topic: Epic War Saga / Suggestion and Ideas

Add in the market an option to SELL items, because I have a lot of items that I will never use and my inventory became a mess. An other reason is that selling things that I don’t use any more will yield me some gold, saving me time to obtain gold.        Thank You Very Much

 
Flag Post

Topic: Technical Support / Where are games saved?

Thank you!

I’ve tried to search for #SharedObjects and I found this directory:
C:\Users\USER\AppData\Local\Google\Chrome\User Data\Default\Pepper Data\Shockwave Flash\WritableRoot\#SharedObjects\

It was an update from google chrome…