Hello Guest, please login or register.
Did you miss your activation email?
Login with username, password and session length.

Pages: [1]   Go Down

Author Topic: Curious: can GM access custom data files?  (Read 1460 times)

0 Members and 1 Guest are viewing this topic.
Curious: can GM access custom data files?
« on: April 08, 2007, 08:24:36 am »
  • *
  • Reputation: +0/-0
  • Offline Offline
  • Gender: Male
  • Posts: 150
I've never been very good at creating game art, so when I want to make a game, I try to find a game whose 'look' matches what I'm after, find out the format of that game's files, and then rip that game's art out to my own custom file format that I can easily access.

Accessing these files in most languages would be easy as long as you knew the layout of the format. But could a program written in GM6/GM7 access these files?

For example, let's say I've encoded all the paladin animations from D2 in a file. To read out a frame of animation, you would need to:

1. Read in a global 256-color palette.
2. Read in the frame header, which includes information like 'size of compressed frame data' and 'offset to compressed frame data'.
3. Read in the compressed frame data from the correct place in the file.
4. The frame data is compressed in LLE format (similar to RLE), so you would need to uncompress the data using a simple algorithm.
5. The frame uncompresses as an 8bit/pixel image, so if you're not in 8bit graphics mode, you would need to generate the frame by iterating through the uncompressed frame data and drawing the frame, pixel by pixel, using the palette look-up data.

Is all of this possible in GM?
Logged
Re: Curious: can GM access custom data files?
« Reply #1 on: April 08, 2007, 08:27:54 am »
  • *
  • Reputation: +0/-0
  • Offline Offline
  • Posts: 598
with a script and a dll, maybe. by itself? im not so sure.
Logged
[...The mystery of wireless, revealed...]

[...Ninjas...]
Re: Curious: can GM access custom data files?
« Reply #2 on: April 08, 2007, 08:41:56 am »
  • *
  • Reputation: +0/-0
  • Offline Offline
  • Posts: 2245
sort of, you theoretically could draw pixel by pixel on to a surface and then create a sprite from that surface

naturally it'd be slower than using a format the gm supports
Logged

Antidote

>.>
Re: Curious: can GM access custom data files?
« Reply #3 on: April 09, 2007, 03:19:30 am »
  • In all seriousness who's serious?
  • *
  • Reputation: +0/-0
  • Offline Offline
  • Gender: Male
  • Posts: 1485
Not really Leif Erichson from the GM community made a custom file format called NIT and it was a 256 color format (VERY lossy though)
Logged
  • Axiomatic Data Laboratories
Re: Curious: can GM access custom data files?
« Reply #4 on: April 09, 2007, 10:05:34 am »
  • If not now, when?
  • *
  • Reputation: +0/-0
  • Offline Offline
  • Gender: Male
  • Posts: 520
yes, it's possible to that using GM's binary functions, however it might be slow.
Logged
Re: Curious: can GM access custom data files?
« Reply #5 on: April 10, 2007, 06:33:19 am »
  • *
  • Reputation: +0/-0
  • Offline Offline
  • Gender: Male
  • Posts: 150
Thanks for the replies. I think it's great that GM can do these sort of things using its 'binary functions'. =)

However, I get the impression that it wouldn't really help GM users at all if I distributed my diablo 2 resources here, due to GM's inability to quickly create textures pixel by pixel. That's too bad - I'm not using them and I spent so much time coding up the utilities that ripped out the graphics to my file format, I'd hate to see them go to waste. =/

Do you think anyone would be interested in the files regardless?

... here's a new question: let's say the files could be read with a C++ DLL. Can you pass a texture from GM to a C++ DLL, and have the DLL write directly to that texture?
Logged
Re: Curious: can GM access custom data files?
« Reply #6 on: April 10, 2007, 06:57:57 am »
  • Fear my Blades
  • *
  • Reputation: +3/-0
  • Offline Offline
  • Gender: Male
  • Posts: 562
GM can create sprites/backgrounds pixel by pixel, you'd just have to do it on a surface first then convert it to a sprite/background.

I've actually done quite a bit of work with GM's binary functions and accessing different file formats, I've even written a program in GM that can read the graphics from GB/GBC, GBA, NES, and SNES files.  It's not by any means an impossible task, you just end up with a noticable loading time.

I wouldn't mind seeing some of the files, and information on your format.
Logged

I've done it (sorta)!  Bloom Lighting in GameMaker, and 3D mode too!  Check out the awesome Screen Saver.
  • Kousou Games
Re: Curious: can GM access custom data files?
« Reply #7 on: April 10, 2007, 08:08:59 am »
  • *
  • Reputation: +0/-0
  • Offline Offline
  • Posts: 598
Not really Leif Erichson from the GM community made a custom file format called NIT and it was a 256 color format (VERY lossy though)
um. either thats a joke or someones named that ironically >_>;
Logged
[...The mystery of wireless, revealed...]

[...Ninjas...]
Pages: [1]   Go Up

 


Contact Us | Legal | Advertise Here
2013 © ZFGC, All Rights Reserved



Page created in 0.076 seconds with 52 queries.

anything