Attila0413
334 posts
|
Topic: Game Programming /
FlashDevelop and Flash Professional
Bundle your Flash professional assets in a SWC and include it into your project in Flash Develop
|
|
|
Attila0413
334 posts
|
Topic: Game Programming /
C++
You can’t
|
|
|
Attila0413
334 posts
|
Topic: Game Programming /
[Rant] 10 Reasons Why I Dislike Unity (as a Developer)
Originally posted by Draco18s:
Originally posted by Attila0413:
Since you cannot extend Component or Behaviour, I think MonoBehaviour is the only choice currently.
So in other words, my statement is still correct. :D
You said class, not script lol
|
|
|
Attila0413
334 posts
|
Topic: Game Programming /
[Rant] 10 Reasons Why I Dislike Unity (as a Developer)
Originally posted by Draco18s:
Originally posted by Attila0413:
Originally posted by Draco18s:
11) Class constructors all have the same name. Start(). Which means that a subclass automatically overrides a base class’s constructor, necessitating a super.Start() call. Ditto for any other “common” function name (Update(), OnMouseDown(), etc.)
Actually, that’s true only for MonoBehaviour.
And because documentation is a bitch to locate alternative methods…
What else can you extend a class from in order to be able to attach the script to a game object and end up with desired behavior?
Since you cannot extend Component or Behaviour, I think MonoBehaviour is the only choice currently.
|
|
|
Attila0413
334 posts
|
Topic: Game Programming /
Interesting results
Originally posted by Draco18s:
You do need to type that other vector though.
E.g. Vector.<Vector.<int>>
Actually it is typed, its type is Vector.<int>
|
|
|
Attila0413
334 posts
|
Topic: Game Programming /
[Rant] 10 Reasons Why I Dislike Unity (as a Developer)
Originally posted by Draco18s:
11) Class constructors all have the same name. Start(). Which means that a subclass automatically overrides a base class’s constructor, necessitating a super.Start() call. Ditto for any other “common” function name (Update(), OnMouseDown(), etc.)
Actually, that’s true only for MonoBehaviour.
|
|
|
Attila0413
334 posts
|
|
|
|
Attila0413
334 posts
|
Topic: Game Programming /
Anti-Hack
Sitelocking will prevent people from hosting the SWF elsewhere, but they can still decompile the SWF and remove the sitelock. It’s something worth doing anyhow, and quite simple.
|
|
|
Attila0413
334 posts
|
Topic: Game Programming /
UDK
Both Unity and UDK are good engines.
Unity is more user-friendly, and you’ll be able to find a lot of tutorials and books around easily. It uses Javascript, C# or Boo(which essentially is a Python dialect) as scripting languages, so chances are you already know at least one of these languages.
The basic version is free, then you can add plug-in to deploy on mobile, the Pro version with additional stuff etc., and you don’t have to pay royalties to Unity.
Also, you can now deploy to Flash Player. Essentially, you can deploy your Unity game everywhere.
If you want to buy the Pro version, wait for Unity 4, it’s going to be out very soon.
UDK is a bit harder to learn. It uses Unrealscript, which is quite easy to learn (case-insensitive and a bunch of other features), and you can also use Kismet to create script with a sort of drag-and-drop interface. Unity has something similar called PlayMaker, but you have to buy it separately.
It’s free as well, but if you’re planning to sell the game, and sell over a certain limit (I think $50.000 but not sure) you have to give 25% royalty to Epic.
There are games available made with both engines. In this moment I remember The Ball with UDK and Rochard with Unity. Not sure, but they’re also using Unity for the new Game of Thrones game.
|
|
|
Attila0413
334 posts
|
Topic: Game Programming /
Working on a game for iOS using Flash and AIR
Hi there!
I’m working on a game with Flash CS5.5 that will be deployed to iOS devices, both iPad and iPhone.
Since it’s the first time I work on Apple devices with Flash, I’d like to have some hints, especially:
- Is there a way to test the game before publishment?
- The game have to run on both retina and non-retina display. Which is the best way to handle this?
- I’ve seen that there are some methods to use Game Center and OpenFeint even with Flash. While I’m doing researches, is there someone who has direct experience of their implementation?
- I’d like to let the user share FB status about the game, and in this moment I’d do it using FB Graph API. Is there a better and faster way to do it?
That’s it for now. Thanks
|
|
|
Attila0413
334 posts
|
Topic: Game Programming /
Best practices for level storing and loading
Originally posted by qwerberberber:
What we did is make and editor that outputs a json, then make the game load the json and make a map out of it.
What technique have you used to show game elements in the editor and linking it to the game?
Let’s say you wanted to add a new enemy or property, have you used a drag-and-drop editor or something different?
|
|
|
Attila0413
334 posts
|
Topic: Game Programming /
Best practices for level storing and loading
Originally posted by UnknownGuardian:
I actually wrote my own level editor that had a list of tiles and basic level creation features like loading, exporting, dynamic testing, etc.
Is is game-specific or just work for any project?
I’ve seen a lot of people building their level editor using AIR, like the Citrus Engine’s level architect, probably because of the more seamless interaction with the system.
Also, some people prefer to keep game and level editor together, while others keep them separated, which I think is the best approach.
|
|
|
Attila0413
334 posts
|
Topic: Game Programming /
Best practices for level storing and loading
Interesting. What about the level creation part? What did you use?
Has someone had any experience with GLEED2D? http://gleed2d.codeplex.com/
|
|
|
Attila0413
334 posts
|
Topic: Game Programming /
Best practices for level storing and loading
Hi there,
I’d like to know if you have links to interesting articles about best practices in level storing and loading in AS3, and level editors. Not only level structure, but also enemies position, patterns, triggers and stuff to be spawned.
I usually store and load them from XML or JSON files, but I’m not sure about how to structure them to make it more efficient.
Thanks!
|
|
|
Attila0413
334 posts
|
Topic: Game Programming /
[Performance] Native sort vs. AS3 sort
On my Macbook AIR, running Windows Seven 32-bit:
32 bit Windows 7 x86 11.1.102.63 Release PlugIn
fastSort Vector<Number> 200,000 Numeric 108
Vector::sort Vector<Number> 200,000 vecSort 431
fastSort Vector<int> 200,000 Numeric 88
Vector::sort Vector<int> 200,000 vecSort 408
Vector::sort Vector<int> 200,000 intSort 351
fastSort Array 200,000 Numeric 311
Array::sort Array 200,000 vecSort 481
Array::sort Array 200,000 intSort 472
Array::sort Array 200,000 Numeric 163
fastSort Array 200,000 Numeric 238
Array::sortOn Array 200,000 Numeric 198
Array::sort Array 200,000 valSort 465
Array::sort Array 200,000 valSort 463
Intel Core 2 Duo @1.86GHz, 2 GB Ram
I’ll test it on my home PC when at home
|
|
|
Attila0413
334 posts
|
Topic: Game Programming /
Facebook API does not init
Originally posted by Aaants:
I think he means why is there no constructor in your class
public class FacebookGame extends Sprite
{
public function FacebookTutorial()
The names don’t match
Oh yeah just noticed, no I just changed it in the post, It’s correct in my source code. I’ve modified it.
|
|
|
Attila0413
334 posts
|
Topic: Game Programming /
Facebook API does not init
Originally posted by AlvieBoon:
btw. looking on the doc class, why there is not a class constructor function?
You just call the static init method to initialize the Facebook session. If successful, the success object will be a FacebookSession object.
|
|
|
Attila0413
334 posts
|
Topic: Game Programming /
Facebook API does not init
Originally posted by AlvieBoon:
make sure you test it on the same domain which you have specified on fb app setting.
Yeah I put the files in my website, but still no luck, maybe I set something wrong in the FB page.
I also tried to create a Desktop app with AIR, but I still cannot connect…
|
|
|
Attila0413
334 posts
|
Topic: Game Programming /
Facebook API does not init
Still no luck. I also tried to use it on a Flex project, with quite the same code. This time the method got called, but success is null, and I’ve no idea on how to access fail object info.
I’m using the latest FB Api, 1.8.1
|
|
|
Attila0413
334 posts
|
Topic: Game Programming /
Facebook API does not init
Hi there!
I imported the Graph API SWC in my project (Flash Builder 4.6, Actionscript project)
That’s my Document class:
package
{
import com.facebook.graph.Facebook;
import flash.display.Sprite;
public class FacebookGame extends Sprite
{
public function FacebookGame()
{
Facebook.init("314379248594059", apiInit, null);
trace("init");
}
public function apiInit(success:Object, fail:Object) :void{
trace("API INIT");
if(success){
trace("SUCCESS");
} else {
trace("FAIL");
}
}
}
}
Only the first trace runs, apiInit is never called. I run the SWF on Firefox. The app is registered on Facebook Developers.
It used to work, maybe they changed something… any idea?
|
|
|
Attila0413
334 posts
|
Topic: Game Programming /
creating multiple objects - flash builder
Always start classes’ names with a capital letter (Bubble) to prevent confusion with variables’ names (bubble).
In your example you have a bubble variable and a bubble class, with the same name.
|
|
|
Attila0413
334 posts
|
Topic: Game Programming /
Merging sounds into bytearray
Originally posted by skyboy:
outBA.writeFloat((micBA.readFloat() * micVol + sndBA.readFloat() * sndVol) * 0.5);
volumes are pretty much any finite number that isn’t NaN. 0-1 is standard, though for 0% to 100%, but you can do 400% or -100% if you want to amplify or make strange effects for it. to not annoy the user, i suggest keeping to the range [-1, 1]
Thanks for the help everyone.
Yeah, I’m talking about voices on some background, overlay.
Thanks for the snippet of code, but how can I extract the bytearray from a Sound?
I tried using the extract method, but I don’t know what to pass as second parameter, length. I tried using baseSound.length, but it gives me error 2030, end of file reached. Just note that the background sound is loaded from a file.
Also, have you put *0.5 at the end since there are two sounds, right? If I have more sounds, I have to put 1/numberOfSounds right?
|
|
|
Attila0413
334 posts
|
Topic: Game Programming /
Merging sounds into bytearray
Hi there!
I need to merge two or more sounds into a single bytearray.
Also, since one of these sounds will be recorder from microphone, is it possible to change each sound’s volume before merging into the bytearray?
Thanks!
|
|
|
Attila0413
334 posts
|
Topic: Game Programming /
android games sdk eclipse
Probably it’s not the best forum to ask Android sdk related stuff, as it’s mainly focused on Flash programming.
Anyway, I wrote some introductory tutorials about the Android SDK some months ago, here: http://www.attiliocarotenuto.com/android
|
|
|
Attila0413
334 posts
|
|