Welcome, Guest. Please login or register.

Login with username, password and session length

 
Advanced search

1411613 Posts in 69390 Topics- by 58447 Members - Latest Member: sinsofsven

May 09, 2024, 02:44:46 PM

Need hosting? Check out Digital Ocean
(more details in this thread)
TIGSource ForumsDeveloperTechnical (Moderator: ThemsAllTook)Rinku & Increpare (and more?) Learn Flash
Pages: 1 [2] 3 4 ... 29
Print
Author Topic: Rinku & Increpare (and more?) Learn Flash  (Read 76505 times)
ஒழுக்கின்மை (Paul Eres)
Level 10
*****


Also known as रिंकू.


View Profile WWW
« Reply #20 on: January 17, 2009, 03:05:13 PM »

Will look into it. Possibly I'll create a first game with procedural graphics or bitmapped graphics, see if I can get that sponsored, and use that money to buy Flash.
Logged

mirosurabu
Guest
« Reply #21 on: January 17, 2009, 03:11:52 PM »

I'm so looking forward to this.

I've been trying to learn AS2 several years ago but I wasn't really satisfied and besides that I was quite frustrated. (I wasn't able to afford myself a book back in the time, so I had to learn all by trial and error)

Anyways, I've never heard of Flex before and I always assumed flash games were made only by Flash development environment. I own Adobe CS3 family. Any major differences in making game using CS3 and using Flex? Which one is better for start?
Logged
ஒழுக்கின்மை (Paul Eres)
Level 10
*****


Also known as रिंकू.


View Profile WWW
« Reply #22 on: January 17, 2009, 03:16:52 PM »

Flex is a text-entry development environment. You just type in code, so it appeals more to people who are programmers. Whereas the Flash development environment has more of a GUI like Photoshop or other drawing programs.
Logged

Hideous
That's cool.
Level 10
*****


3D models are the best


View Profile WWW
« Reply #23 on: January 17, 2009, 03:22:30 PM »

Getting Flash CS3 free from school FTW.
Logged

ஒழுக்கின்மை (Paul Eres)
Level 10
*****


Also known as रिंकू.


View Profile WWW
« Reply #24 on: January 17, 2009, 03:30:45 PM »

But you (or someone) had to pay for those hideously (sorry for the pun) overpriced schools. :D

I could actually probably ask my brother to buy a copy, they do have an educational discount and he is a college student. But that probably goes against the spirit of the educational discount, I'm guessing you're not supposed to use that discount to buy it for others.
Logged

Glaiel-Gamer
Guest
« Reply #25 on: January 17, 2009, 03:34:32 PM »

Getting Flash CS3 free from school FTW.

have fun not making money off of it
Logged
Hideous
That's cool.
Level 10
*****


3D models are the best


View Profile WWW
« Reply #26 on: January 17, 2009, 03:39:01 PM »

Yeah I know Sad
Logged

Pishtaco
Level 10
*****


View Profile WWW
« Reply #27 on: January 17, 2009, 03:44:49 PM »

I'm having a crack at Flash. Previously I've been using Game Maker.

So I went through Cagey's very helpful tutorial, and now I want to make a giant head that you move around the screen with the mouse, and whose jaw moves up and down with the left mouse button. I can get a simple head bitmap moving around fine, but I'm having trouble with how to organize the code for the full thing. It seems to me that the head and jaw should be together in one object, that you can move and scale like you would a sprite; but it should also have attached to it a variable for whether the mouth is open or shut, and maybe methods (?) for opening and shutting it.

I can see that one way to do this is to make a "head" class. This looks inefficient if I only want one head, but maybe I will end up needing lots. Anyway, AS3 is making it hard for me to define such a thing. I searched around a bit, and read that you can only have one class in each package (in each file?). So I tried defining the class outside the package; but then I couldn't use the import statements that are in the package, so in particular I couldn't see how to get my new class to extend the sprite class (I'm building the program on top of Cagey's tutorial example http://forums.tigsource.com/index.php?topic=2630.0 ).

Any tips on the right way to go about this? Am I not getting the details right, or is this just not how objects and classes are used?
Logged

Glaiel-Gamer
Guest
« Reply #28 on: January 17, 2009, 04:00:06 PM »

What you do is have 3 movieclips of your head (idle, opening, closing). Now make a 4th movieclip. On frame 1, place the idle head. On frame 2, put the opening head. On frame 3, put the closing head.

On the last frame of the opening, closing head put the code stop(); to prevent looping.

then on the root, place the head and give it an instance name (or do this through code if you wish).

Put the head's movement code. If you press the mouse, do head.gotoAndStop(2) only if head.currentFrame == 1. When you release the mouse, if head.currentFrame == 2 head.gotoAndStop(3).

You can flip it back to frame 1 when he's done closing or whatever.

Anyway this isn't OOP, and flash SUCKS when it comes to optimizing OOP so keep that in mind. Anything simple like that can be done without OOP very easily. Arrays are multitype, so if you only need like 2 variables what I do is have an array that look like

[reference to movieclip, variable 1, variable 2]

and I make an array of those and loop through it with a for loop and update each one right there.

I know its messy and OOP is better but you have to realize that flash has a lot built in that you can use for your advantage. Movieclips can hold animations, currentFrame can hold states for you, etc. Save OOP for things that need more than just an update function and 2 variables.
Logged
ஒழுக்கின்மை (Paul Eres)
Level 10
*****


Also known as रिंकू.


View Profile WWW
« Reply #29 on: January 17, 2009, 04:52:15 PM »

This game just gave me hope for Flash games + bitmapped graphics and what they can do.

http://www.pixeljam.com/gammabros/
Logged

isaac
Level 2
**



View Profile WWW
« Reply #30 on: January 17, 2009, 05:14:08 PM »

I wouldn't give up hope! If you want to use Flash for bitmap graphics, it's 100% viable and also faster (if handled correctly).

8bitrocket have some good tutorials on setting up a bitmap-based game engine in flash:

http://www.8bitrocket.com/newsdisplay.aspx?newspage=13430
http://www.8bitrocket.com/newsdisplay.aspx?newspage=14591
http://www.8bitrocket.com/newsdisplay.aspx?newspage=17171

Also, I wouldn't get all het up about optimization just yet. I use an object-oriented programming style and there are advantages to having reusable code and quickly extensible classes. Flash isn't as slow as the folk-wisdom would have you believe, and for doing any kind of basic 2d game it'll run just fine.
Logged

Glaiel-Gamer
Guest
« Reply #31 on: January 17, 2009, 05:17:24 PM »

You still have to learn vector FIRST because all the games that use bitmap graphics just have a bitmap fill on a vector graphic.

DO NOT USE BITMAPDATA it is slow.
I only use bitmapdata for special effects and occasionally its useful for collision detection.
Logged
BorisTheBrave
Level 10
*****


View Profile WWW
« Reply #32 on: January 17, 2009, 05:40:11 PM »

I don't think you are really missing much if you don't use Flash. It's more a tool for creating vector animations than anything else, using it to actually write any code is very painful, and it is a worse compiler than flex. It is easier to get going, though.

Glaiel-Gamer, you seem to be providing misinformation more than anything else:
Don't store data in a heterogenous array like that, that's just painful to read. Flash provides dynamic objects for just such circumstances when you are feeling too lazy to define a proper class. E.g. myData:Object = {mc: myMovieClip, var1: 1, var2: 2}.
Or even, because MovieClips are themselves dynamic, you can just attach variables and functions to them at will. This is great, as when you decide it is worthwhile making a class after all, you won't have to rework so much code.
Of course, I would argue that if in doubt, just make a class, but I like flash for being so flexible between data structures and OOP, between static and dynamic typing etc, so each to their own.

And Bitmaps are not slower than Vector, they are significantly faster if used properly. If you are using them just as vector fills, then you are missing out - Bitmap objects can be placed directly on the stage, and the draw (blit) command is not to be sniffed at, though still crappy in comparison to other platforms.

I'm quite excited to see rinku getting into Flash, or more specifically out of more confining choices. You talent was going to waste on GameMaker.
Logged
isaac
Level 2
**



View Profile WWW
« Reply #33 on: January 17, 2009, 05:43:56 PM »

Bonus points for boristhebrave.

ITS OKAY USE BITMAPDATA IF YOU WANT TO ITS OKAY
(though yes you should know how to control vectors as well)

The only thing that isn't a bitmap data here is the textfields:
http://isaacwilliams.net/uploads/ratking/proto03/
(spacebar to add more rats)
Logged

ஒழுக்கின்மை (Paul Eres)
Level 10
*****


Also known as रिंकू.


View Profile WWW
« Reply #34 on: January 17, 2009, 05:46:40 PM »

Oh, I still intend to use Game Maker. There's no reason I can't use both. I want to finish

.
Logged

Glaiel-Gamer
Guest
« Reply #35 on: January 17, 2009, 06:44:08 PM »

And Bitmaps are not slower than Vector, they are significantly faster if used properly. If you are using them just as vector fills, then you are missing out - Bitmap objects can be placed directly on the stage, and the draw (blit) command is not to be sniffed at, though still crappy in comparison to other platforms.

It doesn't really matter, you can't get out of learning how to use the vector graphics flash has or at the very least the structure of movieclips.
Logged
ஒழுக்கின்மை (Paul Eres)
Level 10
*****


Also known as रिंकू.


View Profile WWW
« Reply #36 on: January 17, 2009, 06:53:02 PM »

Well, I don't plan on not learning a specific part of Flash. If a part seems useful, I'll learn it.

But to be clear, by vector drawing, do you mean a specific class in Flash? For instance, I see a class called 'graphics'. It was used in the tutorial on this forum, of that painting example. It has functions to draw rectangles, circles, lines, etc. Is that what is meant by vector drawing? Or is there more to it? That example didn't use anything called 'movie clips' so there's probably more to it. I'll probably get to them if I keep going through tutorials.
Logged

ஒழுக்கின்மை (Paul Eres)
Level 10
*****


Also known as रिंकू.


View Profile WWW
« Reply #37 on: January 17, 2009, 06:59:40 PM »

I've seen that site before, but it's written in a language difficult for me to interpret. For instance:

"In ActionScript 3.0, a movie clip is only one of many display objects that can appear on the screen. If a timeline is not necessary for the function of a display object, using the Shape class or Sprite class in lieu of the MovieClip class may improve rendering performance."

Things I don't understand:
- display object
- timeline
- shape class
- sprite class

It's as if each part of that document assumes you know all the other parts.
Logged

ஒழுக்கின்மை (Paul Eres)
Level 10
*****


Also known as रिंकू.


View Profile WWW
« Reply #38 on: January 17, 2009, 07:00:58 PM »

It seems the post I just replied to by increpare has vanished!!!

I was referring to this link: http://livedocs.adobe.com/flex/3/html/help.html?content=Working_with_MovieClips_2.html
Logged

increpare
Guest
« Reply #39 on: January 17, 2009, 07:22:41 PM »

It seems the post I just replied to by increpare has vanished!!!
apologies; I thought I should investigate things a little more instead of just posting links...
Logged
Pages: 1 [2] 3 4 ... 29
Print
Jump to:  

Theme orange-lt created by panic