Recent posts by KMAE on Kongregate

Subscribe to Recent posts by KMAE on Kongregate

avatar for KMAE KMAE 439 posts
Flag Post

Topic: Kongregate / The Colosseum [21st Kong Tournament] (Winner: MaistlinRajere)

 
avatar for KMAE KMAE 439 posts
Flag Post

Topic: Kongregate / The Colosseum [21st Kong Tournament] (Winner: MaistlinRajere)

 
avatar for KMAE KMAE 439 posts
Flag Post

Topic: Kongregate / The Colosseum [21st Kong Tournament] (Winner: MaistlinRajere)

That was attempt number two.

 
avatar for KMAE KMAE 439 posts
Flag Post

Topic: Kongregate / The Colosseum [21st Kong Tournament] (Winner: MaistlinRajere)

That was attempt number one.

 
avatar for KMAE KMAE 439 posts
Flag Post

Topic: Kongregate / The Colosseum [21st Kong Tournament] (Winner: MaistlinRajere)


 
avatar for KMAE KMAE 439 posts
Flag Post

Topic: Kongregate / The Colosseum [21st Kong Tournament] (Winner: MaistlinRajere)

 
avatar for KMAE KMAE 439 posts
Flag Post

Topic: Kongregate / The Colosseum [21st Kong Tournament] (Winner: MaistlinRajere)

 
avatar for KMAE KMAE 439 posts
Flag Post

Topic: Kongregate / The Colosseum [21st Kong Tournament] (Winner: MaistlinRajere)

I think I’m done.

 
avatar for KMAE KMAE 439 posts
Flag Post

Topic: Kongregate / The Colosseum [21st Kong Tournament] (Winner: MaistlinRajere)


 
avatar for KMAE KMAE 439 posts
Flag Post

Topic: Kongregate / The Colosseum [21st Kong Tournament] (Winner: MaistlinRajere)

 
avatar for KMAE KMAE 439 posts
Flag Post

Topic: Kongregate / The Colosseum [21st Kong Tournament] (Winner: MaistlinRajere)

I will try to do better, but I actually got a compliment from the game.

 
avatar for KMAE KMAE 439 posts
Flag Post

Topic: Kongregate / The Colosseum [21st Kong Tournament] (Winner: MaistlinRajere)

Well, I am busy too, but will probably participate. Screenshot will follow below in an edit.
I would like a whisper too so I get an email.
I vote for RA2, just because I haven’t played Sol and I am awful at DO.


 
avatar for KMAE KMAE 439 posts
Flag Post

Topic: Game Programming / Card Game

Thank you for all your comments. I know I can do it any way, I just wanted to see if one way was considered easier than another or is preferred.

UG: All of the cards have the same back. I am making a version of Uno and so I have 54 unique card fronts which I have currently .png’s of each one and one MovieClip with 55 frames. I anticipate Uno will be data driven, determining the card value and color and any specials (reverse and draw). I’ll have to look into lookup tables as I don’t have much experience with those. I have experience with classes, but I think it may be more difficult to go that way.

parallactic: I am more experienced with classes. As I said above though I think I will find a lookup table to be easier to work with. I have, as I said above a 54 indexed timeline with each frame named, but I was dreading putting all that in an array. I suppose I’ll have to catalogue them eventually, no matter what I do.

qwerber: That’s was I was thinking. I had heard that sprite sheets were more efficient, but I don’t have experience with them so I wasn’t sure if it would be any easier or just different. For this game I don’t think efficiency will be that big a deal anyways.

Senekis: I do have a lot of experience recently with using XML and perhaps I could go this way. Although I don’t have near as many cards as you I did feel it might be difficult to work with a sheet like that. Perhaps I will just leave sprite sheets for animations instead of static images.

So, what I will be doing then is breaking out my cards into individual MovieClips then and seeing if I can tinker with a lookup or XML.

If it makes any difference, after my first game is released I am going to attempt a multiplayer aspect with a followup. I figured I better be able to program single player first though :3

 
avatar for KMAE KMAE 439 posts
Flag Post

Topic: Game Programming / Card Game

This may have been asked already, but I am making a single player with computer AI card game.

So far the only question I have is: “Sprite sheet or MovieClip?” And if MovieClip, individual clips for each card, or individual frames in one clip for each card?

Thanks for your opinions.

 
avatar for KMAE KMAE 439 posts
Flag Post

Topic: Game Programming / How much can you make from ads?

Good information here: http://kaitol.com/

 
avatar for KMAE KMAE 439 posts
Flag Post

Topic: Game Programming / [Solved] Reading a date in a funny format

Thanks for the additional input. Right now I’m just going to cross my fingers and stick with the mess I have. The reason being they asked me which columns I needed. The purpose of the program is only to show which employees were hired in the current month and how many years they have worked for us.

 
avatar for KMAE KMAE 439 posts
Flag Post

Topic: Game Programming / [Solved] Quicksort

Thanks for saving me again Wordblind.

Chumphump, it is because I wanted to make sure I had something efficient. I probably won’t ever have enough entries to make it a problem, but this file is intended to be used at work for quite a long time without being edited.

I will have a look at your class later, skyboy. Perhaps I can use it in the future.

 
avatar for KMAE KMAE 439 posts
Flag Post

Topic: Game Programming / [Solved] Quicksort

Alright so I have imported data in XML and have it all nice and cozy in an array thanks to another post, but now I try to sort it with this quicksort I found online and I get a stack overflow D:

It’s been quite awhile since I’ve done algorithms and honestly in the beginning of my project when I had a different test input document it did work. So I’m not sure what has changed to cause this.

Below is the sorting part of it. Let me know if you need to see any other part.

function partition(array, left, right, pivotIndex):Number {
    var pivotValue:String = array[pivotIndex].column[3];
	var temp1 = array[pivotIndex];
    array[pivotIndex] = array[right];  // Move pivot to end
	array[right] = temp1;
    var storeIndex:Number = left;
    for (var i:int = 0; i < (array.length - 1); i++) {// left ≤ i < right
		if (array[i].column[3] <= pivotValue) {
			var temp2 = array[i];
		 	array[i] = array[storeIndex];
		 	array[storeIndex] = temp2;
            storeIndex++;
		}
	}
    var temp3 = array[storeIndex];
	array[storeIndex] = array[right];  // Move pivot to its final place
	array[right] = temp3;
	return storeIndex
}

 function quicksort(array, left, right):void {
	 if (right > left) { // subarray of 0 or 1 elements already sorted
         var pivotIndex:Number = Math.ceil(left + (right - left)/2); //select a pivotIndex in the range left ≤ pivotIndex ≤ right  // see Choice of pivot for possible choices
		 var pivotNewIndex:Number = partition(array, left, right, pivotIndex)  // element at pivotNewIndex is now at its final position
		 quicksort(array, left, pivotNewIndex - 1)  // recursively sort elements on the left of pivotNewIndex
		 quicksort(array, pivotNewIndex + 1, right)  // recursively sort elements on the right of pivotNewIndex
	 }
 }

Edit to add:
The trace is on my pivot index.


8
4
1
6
Error: Error #1502: A script has executed for longer than the default timeout period of 15 seconds.
at Anniversary_fla::MainTimeline/partition()
at Anniversary_fla::MainTimeline/quicksort()
at Anniversary_fla::MainTimeline/quicksort()
at Anniversary_fla::MainTimeline/quicksort()
at Anniversary_fla::MainTimeline/parseData()
at Anniversary_fla::MainTimeline/loadXML()
at flash.events::EventDispatcher/dispatchEventFunction()
at flash.events::EventDispatcher/dispatchEvent()
at flash.net::URLLoader/onComplete()

 
avatar for KMAE KMAE 439 posts
Flag Post

Topic: Game Programming / [Solved] Reading a date in a funny format

I will give that a try and let you know. Thanks!

Edit: That worked great guys. Thanks! I have a new problem, but think it should have its own topic.

 
avatar for KMAE KMAE 439 posts
Flag Post

Topic: Game Programming / [Solved] Reading a date in a funny format

My inquiries at work have altered the problem. I can now get an XML file straight out of the system, but this is what I have to work with:

<row>
  <column>ABC Company LLC</column>
  <column>01-01</column>
  <column>2010</column>
  <column>Test, Test</column>
</row>

I changed the company name and put test for anonymity. As you can see my XML file is very vague and now I’m trying to determine how to get Flash to recognize certain fields. I am still messing with it, but if anyone has any ideas please let me know. So far I get the above by doing a trace(peopleInput.pages.page.row);.

Your solutions above are not wasted. I appreciate all your help and will keep the above methods in mind for the future. Right now though it is easiest for my coworkers if I can try to work with this new input instead.

 
avatar for KMAE KMAE 439 posts
Flag Post

Topic: Game Programming / [Solved] Reading a date in a funny format

Thanks for the article. I’m trying Wordblind’s solution, but how do I convert the number to a date so I can get the month and year out?

Edit:
My compiler says "To cast a value to type Date use “x as Date” instead of Date(x).

39818 as Date returns null.

var tempDate = new Date();
tempDate.setDate(39818);
trace(tempDate + ", " + (tempDate is Date));

Output: Mon May 6 06:58:36 GMT-0500 2120, true

var tempDate = new Date();
tempDate.setDate(toUnix(39818));
trace(tempDate + ", " + (tempDate is Date));

Output: Invalid Date, true
 
avatar for KMAE KMAE 439 posts
Flag Post

Topic: Game Programming / [Solved] Reading a date in a funny format

I just found out that while my work computer spit out 39818 as the text equivalent of Jan 5, 2009 my home computer said that 39818 is Jan 6, 2013. So that puts quite a damper on things..

The work computer is running Excel 2007 for Windows XP. The home computer is running Excel 2008 for Mac OSX. Tomorrow at work I am going to try to get the Excel file to export the date column as a string instead of a number. That may be easier.

My goal is to get this xml file out of the Excel file I am provided without much hassle as people who are not necessarily bright will take over converting it for me if I leave.

Edit: Adding, at home a value of 0 = Jan 1 1904 and a value of 38356 = Jan 5 2009.

 
avatar for KMAE KMAE 439 posts
Flag Post

Topic: Game Programming / [Solved] Reading a date in a funny format

I’m stumped on this one. I am importing an XML file which was exported by MS Excel. I do not have control over the output from Excel. There is a date field which Excel is spitting out as text.

Instead of getting 01/05/2009 I am getting 39818.

How can I get 39818 to be converted to a usable format? I was trying the Date object to no avail.

My goal is to get out the month and year.

The reason I need an equation or some such is because I have a whole list with different dates that I need to convert. I don’t want to have to do each manually.

Thanks for any help.

 
avatar for KMAE KMAE 439 posts
Flag Post

Topic: Kongregate / The search bar

I’ve had trouble with it too D:

 
avatar for KMAE KMAE 439 posts
Flag Post

Topic: Kongregate / Ultimate Kongregate Nationality Topic [UKNT]

USA.