Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   Level Design (https://forums.graalonline.com/forums/forumdisplay.php?f=6)
-   -   AS3 Graal NW Level Loader (https://forums.graalonline.com/forums/showthread.php?t=79751)

Robin 05-16-2008 07:47 PM

AS3 Graal NW Level Loader
 
2 Attachment(s)
So I was messing around in flash the other day, and decided it'd be fun to make a class that would load a NW file and display it by drawing it to a BitmapData object.

Here's an example of use:

PHP Code:

import Level;

// the new Tileset(0,0) bit below, is pics1.png in the Library, with Linkages set up to allow script access.
var glevel = new Level(new Tileset(0,0));
glevel.addEventListener(Event.COMPLETEgot_level);

// can also be a relative url
glevel.load("http://gscriptdef.graalstudios.com/mylevel.nw");

function 
got_level(event) {
    
addChild(new Bitmap(glevel.render()));


And attatched is the Class, and screenies :)

Tigairius 05-16-2008 08:01 PM

Oh, very nice :)

Robin 05-16-2008 08:07 PM

Quote:

Originally Posted by Tigairius (Post 1391056)
Oh, very nice :)

Thankees :D

DustyPorViva 05-16-2008 08:08 PM

Now you need to make an exe editor with layers and stuff, since Stefan has abandoned the level editor. :)

Pleaaaase

Robin 05-16-2008 08:09 PM

Could just make an entire level editor in flash WOULDN'T THAT BE FANTASTIC?

DustyPorViva 05-16-2008 08:12 PM

NOOOOOOO NOT FLASH. PLEASE NOT FLASH.

Make it an executable, please!

Robin 05-16-2008 08:14 PM

I'd make one in Cocoa ;)

Galdor 05-16-2008 08:16 PM

I don't understand anything of this but its probably awesome ^^

DustyPorViva 05-16-2008 08:17 PM

Come oooooooooon.

Tigairius 05-16-2008 08:19 PM

Quote:

Originally Posted by Galdor (Post 1391064)
I don't understand anything of this but its probably awesome ^^

Haha, Galdor.

Robin 05-16-2008 08:19 PM

I don't have anything that compiles into windows executable format anymore! :P

DustyPorViva 05-16-2008 08:20 PM

Dammit :(

Robin 05-16-2008 08:21 PM

Quote:

Originally Posted by DustyPorViva (Post 1391070)
Dammit :(

I could make you a level editor written using Adobe AIR which can output an EXE for Windows if you like...?

DustyPorViva 05-16-2008 08:24 PM

Nah, I'll just go mope in my corner.

Robin 05-16-2008 08:30 PM

Quote:

Originally Posted by DustyPorViva (Post 1391075)
Nah, I'll just go mope in my corner.

Hello, and welcome to the enrichment center...

But seriously, I'm probably going to do something like a level editor. It would be interesting to see if someone could get this to work _with_ graal. Unfortunately I am unable due to Graal on Mac not loading SWF files :(

DustyPorViva 05-16-2008 08:34 PM

Flash would be such a waste of time for an editor. It's such a resource hog it isn't even funny. At least do it in java if you're gonna use a multi-platform language.

Robin 05-16-2008 08:37 PM

This isn't that bad, to be honest @ resource hoggery.

Skyld 05-16-2008 09:07 PM

Quote:

Originally Posted by DustyPorViva (Post 1391084)
It's such a resource hog it isn't even funny. At least do it in java if you're gonna use a multi-platform language.

Oxy***** alert!

I think I'd rather see one in Flash, actually.

Rapidwolve24 05-16-2008 09:07 PM

Quote:

Originally Posted by DustyPorViva (Post 1391084)
Flash would be such a waste of time for an editor. It's such a resource hog it isn't even funny. At least do it in java if you're gonna use a multi-platform language.

Java is even worse -_-

DustyPorViva 05-16-2008 09:08 PM

Java is???

Programmer 05-16-2008 09:19 PM

Shush, I've already started coding an NW level editor in Java which will be released eventually.

Java owns. xD

Tigairius 05-16-2008 09:57 PM

Quote:

Originally Posted by Programmer (Post 1391100)
Java owns. xD

Pshhh Java is for newbies.

cbk1994 05-16-2008 11:20 PM

Quote:

Originally Posted by Robin (Post 1391063)
I'd make one in Cocoa ;)

Send me a copy :)
Quote:

Originally Posted by DustyPorViva (Post 1391084)
Flash would be such a waste of time for an editor. It's such a resource hog it isn't even funny. At least do it in java if you're gonna use a multi-platform language.

:rolleyes:

Java is far worse.
Quote:

Originally Posted by Programmer (Post 1391100)
Shush, I've already started coding an NW level editor in Java which will be released eventually.

Java owns. xD

I had one finished, but I lost it somewhere. I'll try to find it.
Quote:

Originally Posted by Tigairius (Post 1391106)
Pshhh Java is for newbies.

PSHAWWWWW.

Robin 05-16-2008 11:33 PM

Java's not bad. I learnt it in college :)

[email protected] 05-16-2008 11:34 PM

so tell me, why would you use this? :confused:

Robin 05-16-2008 11:58 PM

To load a graal level into a flash file :)

[email protected] 05-17-2008 12:00 AM

Quote:

Originally Posted by [email protected] (Post 1391131)
so tell me, why would you use this? :confused:

why, not what it does

DustyPorViva 05-17-2008 12:10 AM

Quote:

Originally Posted by cbk1994 (Post 1391118)
Java is far worse.

Speaking as someone who runs an ancient computer, Java is much easier on resources.
Not to mention Graal was originally coded in Java. It ran pretty much like it did today, and ran fast back then... can you ever imagine an equivalent to Graal running on Flash as fast as Graal did?

Robin 05-17-2008 12:14 AM

Well right now I can say level scrolling is pretty damn smooth. Dusty download the latest flash player I might want you to become my bit.. I mean beta tester :D

cbk1994 05-17-2008 01:34 AM

Flash runs extremely smooth for me, way faster than Java. I think that on an older computer Java tends to run better though.

Programmer 05-17-2008 02:25 AM

Quote:

Originally Posted by cbk1994 (Post 1391163)
Flash runs extremely smooth for me, way faster than Java. I think that on an older computer Java tends to run better though.

Yes, but Flash doesn't have all of the capabilities that Java does. Java tends to be slow if you have a programmer with bad habits, but if you have good habits, as I do, you'll see that Java runs quite fast.

Robin 05-17-2008 02:29 AM

humm...

Java and flash are pretty similar?

Both are compiled into byte code

Both are run in a "virtual machine" of sorts.

In fact I'd say flash is tuned to be smoother and faster espescially when it comes to graphics..

I'd also have to express my annoyance at the fact that, no matter what platform Java is run on, it seems 5 to 10 seconds are added on the beginning of the load time, whist the browser / VM seems to freeze and crash and burn until finally the applet is loaded, or begins to show a "loading" bar.

Whereas there's no slowdowns of that sort as far as I can tell with Flash.

Admins 05-17-2008 02:47 AM

Flash scripts were always at least 10-20 times slower than Java (in my experience), but it's catching up with Flash 9/10. The latest Flash has even some support for pixel shaders :)
Scripts are easier exchangable now between Flash and Java, although the graphical stuff is of course different.

Robin 05-17-2008 03:20 AM

Quote:

Originally Posted by Stefan (Post 1391173)
Flash scripts were always at least 10-20 times slower than Java (in my experience), but it's catching up with Flash 9/10. The latest Flash has even some support for pixel shaders :)
Scripts are easier exchangable now between Flash and Java, although the graphical stuff is of course different.

I have enjoyed playing with the pixel shader effects earlier this week infact :O

The new flash 10 stuff is going to be very nice although no support for Intel graphics cards just yet :(

cbk1994 05-17-2008 03:30 AM

Quote:

Originally Posted by Programmer (Post 1391169)
Yes, but Flash doesn't have all of the capabilities that Java does. Java tends to be slow if you have a programmer with bad habits, but if you have good habits, as I do, you'll see that Java runs quite fast.

I know, I prefer Java anyway, as I actually script in Java.

Java is slow for things like games with lots of graphics. Flash would be slower probably at the more internal things (networking, etc)

HoudiniMan 05-17-2008 04:23 AM

Tigarius's scripted level editor will be far superior to anything off-line that I can imagine, once he finishes it.

cbk1994 05-17-2008 04:44 AM

Quote:

Originally Posted by HoudiniMan (Post 1391184)
Tigarius's scripted level editor will be far superior to anything off-line that I can imagine, once he finishes it.

Tig's? You mean Zeros?

Or are you actually referring to Tig?

Zero is the one who made the awesome NW editor.

Haven't heard much about anything Tig made.

DustyPorViva 05-17-2008 04:47 AM

I don't see how anything scripted can be far, or in fact, superior at all, to an executable with an equal amount of skill and effort put into it.

Tigairius 05-17-2008 05:40 AM

Quote:

Originally Posted by HoudiniMan (Post 1391184)
Tigarius's scripted level editor will be far superior to anything off-line that I can imagine, once he finishes it.

Thanks :)

Quote:

Originally Posted by cbk1994 (Post 1391188)
Tig's? You mean Zeros?

Or are you actually referring to Tig?

Zero is the one who made the awesome NW editor.

Haven't heard much about anything Tig made.

No, actually he is referring to my "live level editor." I'm going to write a thread about it after I get a few more features done ;)

HoudiniMan 05-17-2008 10:18 AM

Quote:

Originally Posted by DustyPorViva (Post 1391189)
I don't see how anything scripted can be far, or in fact, superior at all, to an executable with an equal amount of skill and effort put into it.

WYSIWYG.

Exe's you have to deal with uploading and downloading and blah blah blah unless you can somehow work with Stefan to integrate an RC login or something. If that's your angle... well, I think it would be easier to add online editing to a client than a client to an offline editor.


All times are GMT +2. The time now is 05:47 PM.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.