dMZX Forums: Fritz Blitz question - dMZX Forums

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Fritz Blitz question

#1 User is offline   RyanThunder 

  • Old-fashioned MZXer.
  • PipPipPipPip
  • Group: Members
  • Posts: 508
  • Joined: 09-November 02
  • Gender:Male

Posted 27 September 2007 - 12:49 AM

Hey Logicow. I saw a video of your game, Fritz Blitz, on YouTube and I just gotta ask.

How did you get your graphics to look so good? Did you really draw all that with the keyboard? Is there something I'm missing?
0

#2 User is offline   LogiCow 

  • Holiday cow
  • PipPipPipPipPip
  • Group: Members
  • Posts: 2,671
  • Joined: 18-July 02
  • Gender:Male
  • Location:Quebec

Posted 27 September 2007 - 01:11 AM

The backgrounds are BMPs.
The ship graphics are BMPs.
If you modify any of those BMPs, the changes apply in the game.

The menus have been converted from BMPs during the DoZ.



Those BMPs have been drawn by my sister, with a graphic tablet, on Photoshop.
0

#3 User is offline   Dr Lancer-X 

  • 電波、届いた?
  • Group: DigiStaff
  • Posts: 8,936
  • Joined: 20-March 02
  • Location:ur mom nmiaow

Posted 27 September 2007 - 01:27 AM

Belongs in Robotic Talk *punt*
Posted Image
<Malwyn> Yes, yes. Don't worry I'd rather masturbate with broken glass than ask you for help again. :(
0

#4 User is offline   RyanThunder 

  • Old-fashioned MZXer.
  • PipPipPipPip
  • Group: Members
  • Posts: 508
  • Joined: 09-November 02
  • Gender:Male

Posted 27 September 2007 - 03:38 AM

How were you able to apply those BMPs in-game? Did you convert them somehow?
0

#5 User is offline   Dr Lancer-X 

  • 電波、届いた?
  • Group: DigiStaff
  • Posts: 8,936
  • Joined: 20-March 02
  • Location:ur mom nmiaow

Posted 27 September 2007 - 03:43 AM

He just wrote a BMP loader in robotic.
Posted Image
<Malwyn> Yes, yes. Don't worry I'd rather masturbate with broken glass than ask you for help again. :(
0

#6 User is offline   RyanThunder 

  • Old-fashioned MZXer.
  • PipPipPipPip
  • Group: Members
  • Posts: 508
  • Joined: 09-November 02
  • Gender:Male

Posted 27 September 2007 - 04:05 AM

You can load BMPs in robotic?!

So THAT'S how all you guys are able to make all these cool looking movies and stuff!

How do I get started?

EDIT: Also, which DoZ was Fritz Blitz in, and what game number was it?

This post has been edited by RyanThunder: 27 September 2007 - 04:10 AM

0

#7 User is offline   Dr Lancer-X 

  • 電波、届いた?
  • Group: DigiStaff
  • Posts: 8,936
  • Joined: 20-March 02
  • Location:ur mom nmiaow

Posted 27 September 2007 - 04:10 AM

With the BMP file format.

http://local.wasp.uw...ataformats/bmp/

Enjoy!

(also, I wouldn't do a movie this way =p)
Posted Image
<Malwyn> Yes, yes. Don't worry I'd rather masturbate with broken glass than ask you for help again. :(
0

#8 User is offline   LogiCow 

  • Holiday cow
  • PipPipPipPipPip
  • Group: Members
  • Posts: 2,671
  • Joined: 18-July 02
  • Gender:Male
  • Location:Quebec

Posted 27 September 2007 - 04:30 AM

34239 and it's the one before summer 2007, so winter 2006.
0

#9 User is offline   RyanThunder 

  • Old-fashioned MZXer.
  • PipPipPipPip
  • Group: Members
  • Posts: 508
  • Joined: 09-November 02
  • Gender:Male

Posted 27 September 2007 - 05:08 AM

Alright, I understand what the BMP format is all about, but how do I actually load one and use it in my MZX game?

This post has been edited by RyanThunder: 27 September 2007 - 05:08 AM

0

#10 User is offline   asiekierka 

  • ??
  • PipPipPipPipPip
  • Group: Members
  • Posts: 1,267
  • Joined: 06-April 06
  • Gender:Male
  • Location:Poland

Posted 27 September 2007 - 05:12 AM

Write robotic code to read it.
You have fread.
You have put.
You have counters.
What more?
Huh.
0

#11 User is offline   Dr Lancer-X 

  • 電波、届いた?
  • Group: DigiStaff
  • Posts: 8,936
  • Joined: 20-March 02
  • Location:ur mom nmiaow

Posted 27 September 2007 - 05:29 AM

I wrote a small code snippet a little bit ago in some other thread that read in a 16-colour BMP and output a palette and MZM. That should show how to read the format, at least. I'll repost it here for convenience.

set "$INPUT" "test.bmp"
set "$OUTPUTMZM" "test.mzm"
set "$OUTPUTPAL" "test.pal"

set "commands" "(-1>>1)"

set "&$INPUT&" "fread_open"
set "$header" "fread10"
set "bmpoffset" "('fread_counter'+('fread_counter'<<16))"
set "paloffset" "('fread_counter'+('fread_counter'<<16)+14)"
set "fread_pos" "paloffset"
set "&$OUTPUTPAL&" "fwrite_open"
loop start
set "$quad" "fread4"
set "fwrite" "('$quad.2'/4)"
set "fwrite" "('$quad.1'/4)"
set "fwrite" "('$quad.0'/4)"
loop 15
set "&$OUTPUTMZM&" "fwrite_open"
set "$mzmheader" "MZM2"
set "$mzmheader" "fwrite4"
set "fwrite_counter" 80
set "fwrite_counter" 25
set "fwrite_pos" 16
set "fread_pos" "bmpoffset"
set "$scr" "fread2000"
set "" "fread_open"
loop start
set "x" "('loopcount'%40)"
set "y" "(24-('loopcount'/40))"
set "fwrite" 5
set "fwrite" 223
set "fwrite" "('$scr.('y'*80+'x')'/16*16+('$scr.('y'*80+'x'+40)'/16))"
inc "fwrite_pos" 3
set "fwrite" 5
set "fwrite" 223
set "fwrite" "('$scr.('y'*80+'x')'%16*16+('$scr.('y'*80+'x'+40)'%16))"
inc "fwrite_pos" 3
loop 999
set "" "fwrite_open"

Posted Image
<Malwyn> Yes, yes. Don't worry I'd rather masturbate with broken glass than ask you for help again. :(
0

#12 User is offline   Galladin 

  • Threadkiller
  • PipPipPipPipPip
  • Group: Members
  • Posts: 2,266
  • Joined: 08-January 02
  • Gender:Male
  • Location:Finland

Posted 27 September 2007 - 06:45 AM

Shit, now I'm not sure whether to marry LogiCow and his MadBrain or Lancer-X and the shark who was about to eat him.
Interactive (F) Fantasies

<Beige> In Finland, they defecate on each other's sleeping areas.
<Beige> It's a cultural sign of respect.
0

#13 User is offline   LogiCow 

  • Holiday cow
  • PipPipPipPipPip
  • Group: Members
  • Posts: 2,671
  • Joined: 18-July 02
  • Gender:Male
  • Location:Quebec

Posted 27 September 2007 - 10:55 AM

Galladin, on Sep 27 2007, 06:45 AM, said:

Shit, now I'm not sure whether to marry LogiCow and his MadBrain or Lancer-X and the shark who was about to eat him.

what


In any case I would object to such an arrangement.
0

#14 User is offline   Dr Lancer-X 

  • 電波、届いた?
  • Group: DigiStaff
  • Posts: 8,936
  • Joined: 20-March 02
  • Location:ur mom nmiaow

Posted 27 September 2007 - 10:56 AM

LogiCow, on Sep 27 2007, 08:55 PM, said:

In any case I would object to such an arrangement.

is it the incest, the polygamy or the homosexuality?
Posted Image
<Malwyn> Yes, yes. Don't worry I'd rather masturbate with broken glass than ask you for help again. :(
0

#15 User is offline   KKairos 

  • not an actual chipmunk
  • PipPipPipPipPip
  • Group: Members
  • Posts: 2,245
  • Joined: 05-August 00
  • Gender:Male

Posted 27 September 2007 - 04:47 PM

Don't forget the implied bestiality! (The shark.)
darganflayer.net kaikairos.dev itch.io
0

#16 User is offline   Dr Lancer-X 

  • 電波、届いた?
  • Group: DigiStaff
  • Posts: 8,936
  • Joined: 20-March 02
  • Location:ur mom nmiaow

Posted 27 September 2007 - 09:49 PM

KKairos, on Sep 28 2007, 02:47 AM, said:

Don't forget the implied bestiality! (The shark.)

there's no bestiality, it just eats you. and not like that, either :/
Posted Image
<Malwyn> Yes, yes. Don't worry I'd rather masturbate with broken glass than ask you for help again. :(
0

#17 User is offline   Quantum P. 

  • Advanced Member
  • PipPipPip
  • Group: Members
  • Posts: 250
  • Joined: 01-January 05

Posted 27 September 2007 - 10:18 PM

Now, what I'd like to know is how you pre-process photographic images, like in Lancer's last DOZ entry, or how that fading trick is done in Irreplaceable Memory (entry from same DOZ as Fritz Blitz).
0

#18 User is offline   Dr Lancer-X 

  • 電波、届いた?
  • Group: DigiStaff
  • Posts: 8,936
  • Joined: 20-March 02
  • Location:ur mom nmiaow

Posted 27 September 2007 - 10:31 PM

I did Irreplacable Memory too!

The thing about Irreplacable Memory was that it did everything mid-game, so the code is there. As input it took in greyscale RAWs. There's a couple of lookup tables used to determine the nicest char/col combination to represent that image. I just had a bunch of different palettes for it, to simulate other colours. For the fading, it was basically naive alpha processing to fade from one colour 'index' to the other (which is why it was slow in some parts).

Moonlight Blue, though, had the conversion done outside of MZX. Essentially, I had a pre-created charset (which only used a few chars since I needed the rest for moonspeak). Essentially, I resized the image to 80x50, quantised it in a bunch of different ways to get a dozen or so different 16-col palettes, went through the image for each palette to determine how to most accurately represent it in MZX (I actually did some error diffusion to distribute the error here, rather than pure nearest-representation). Then I went with the palette that resulted in the most 'accurate' image. The software in question was written in C and quite heavily optimised so as to reduce delays.

When I realised later I also needed 7-col versions, those were produced from the 16-col versions (which is why they are unfortunately noticably less accurate). Ayane's 'sprite' was rendered to 7 colours from the start, however, so it looks better for the reduced palette.
Posted Image
<Malwyn> Yes, yes. Don't worry I'd rather masturbate with broken glass than ask you for help again. :(
0

#19 User is offline   CJA 

  • «≡larch bucket≡»
  • PipPipPipPipPipPip
  • Group: Members
  • Posts: 3,262
  • Joined: 23-June 05
  • Gender:Male
  • Location:......@.c....

Posted 28 September 2007 - 03:48 PM

RyanThunder, here's how I'd begin:

Download IrfanView and get the plugins (so you can make a RAW). Get mtPaint (so you can have the control over palettes that Paint lacks).

Draw/load something 80x25 with 16 colors in it. Make sure it's set to Indexed and not RGB. Save it as BMP or PNG. Load it with IrfanView. Use its save dialog to save it as a RAW file. RAW is just data from the get-go, no headers, so it's great.

In MZX, you have to read from the file and put each byte, one at a time, on the screen 80 times in a row and do all that 25 times for every row. Bytes will correspond directly to MZX colors if it's a 16 color image.

It'll look horrible, but that's because the palette is MZX's now, but that's the starting point.
Need a dispenser here.
0

#20 User is offline   Pyro1588 

  • wojtek
  • PipPip
  • Group: Members
  • Posts: 145
  • Joined: 20-October 02
  • Gender:Male
  • Location:Minnesota

Posted 29 September 2007 - 05:26 AM

in my humble opinion, it's just as easy to construct your own format (i.e. a palette followed by a raw image) as it is to use bmps.

http://honors.tntech.../~aames/mbm.zip
here's an old experiment i did with converting 80x50 images to half-char mzx graphics with a 16-color palette. in all honesty, photoshop did most of the work. the file format is as idiotically simple as it seems.

http://honors.tntech...~aames/smzx.zip
and here's an smzx version that does the same. in all honesty, because of the way smzx palettes are laid out, the image doesn't gain too much from it. but still, you can see a bit of a difference on the pictures. it'll compare them for you, btw. i also included two extra files, "f22" and "raptor". press d to load them.
<Tox> bah. I may as well give in and shop australia. D:
<pyro1588> "welcome to australia, can i help you find what you're looking for?"
<Tox> pyro1588, I'm giving you the most reproachful of glares right now.
--------
Go show those nutty Koreans what us crazy Europeans are made of pirate.gif pirate.gif pirate.gif - Saike
<exophase> The old Commodore strategy of, "Go friggin' bankrupt!"
<wervyn> Go away! I'm writing the same engine I always do!
0

#21 User is offline   Dr Lancer-X 

  • 電波、届いた?
  • Group: DigiStaff
  • Posts: 8,936
  • Joined: 20-March 02
  • Location:ur mom nmiaow

Posted 29 September 2007 - 10:20 AM

Just as easy? No, it's much easier.
Posted Image
<Malwyn> Yes, yes. Don't worry I'd rather masturbate with broken glass than ask you for help again. :(
0

#22 User is offline   LogiCow 

  • Holiday cow
  • PipPipPipPipPip
  • Group: Members
  • Posts: 2,671
  • Joined: 18-July 02
  • Gender:Male
  • Location:Quebec

Posted 29 September 2007 - 05:35 PM

The robotic is easier, sure.

But when you're working with your sister and want to make lots of on the fly adjustments to the pictures, the BMP format is better, because no time is spent converting anything, and any bitmap size works.
0

#23 User is offline   Dr Lancer-X 

  • 電波、届いた?
  • Group: DigiStaff
  • Posts: 8,936
  • Joined: 20-March 02
  • Location:ur mom nmiaow

Posted 29 September 2007 - 10:29 PM

Yeah, TBH the PPM-style formats are easier, but they don't have a mode for paletted images so bmp still ends up being nicer to use.
Posted Image
<Malwyn> Yes, yes. Don't worry I'd rather masturbate with broken glass than ask you for help again. :(
0

#24 User is offline   RyanThunder 

  • Old-fashioned MZXer.
  • PipPipPipPip
  • Group: Members
  • Posts: 508
  • Joined: 09-November 02
  • Gender:Male

Posted 29 September 2007 - 10:33 PM

Lancer-X, on Sep 27 2007, 01:29 AM, said:

I wrote a small code snippet a little bit ago in some other thread that read in a 16-colour BMP and output a palette and MZM. That should show how to read the format, at least. I'll repost it here for convenience.

set "$INPUT" "test.bmp"
set "$OUTPUTMZM" "test.mzm"
set "$OUTPUTPAL" "test.pal"

set "commands" "(-1>>1)"

set "&$INPUT&" "fread_open"
set "$header" "fread10"
set "bmpoffset" "('fread_counter'+('fread_counter'<<16))"
set "paloffset" "('fread_counter'+('fread_counter'<<16)+14)"
set "fread_pos" "paloffset"
set "&$OUTPUTPAL&" "fwrite_open"
loop start
set "$quad" "fread4"
set "fwrite" "('$quad.2'/4)"
set "fwrite" "('$quad.1'/4)"
set "fwrite" "('$quad.0'/4)"
loop 15
set "&$OUTPUTMZM&" "fwrite_open"
set "$mzmheader" "MZM2"
set "$mzmheader" "fwrite4"
set "fwrite_counter" 80
set "fwrite_counter" 25
set "fwrite_pos" 16
set "fread_pos" "bmpoffset"
set "$scr" "fread2000"
set "" "fread_open"
loop start
set "x" "('loopcount'%40)"
set "y" "(24-('loopcount'/40))"
set "fwrite" 5
set "fwrite" 223
set "fwrite" "('$scr.('y'*80+'x')'/16*16+('$scr.('y'*80+'x'+40)'/16))"
inc "fwrite_pos" 3
set "fwrite" 5
set "fwrite" 223
set "fwrite" "('$scr.('y'*80+'x')'%16*16+('$scr.('y'*80+'x'+40)'%16))"
inc "fwrite_pos" 3
loop 999
set "" "fwrite_open"

Are you sure it's this cumbersome to do this?

I can't just do something like "load bitmap" and "place at x y"?

By the way LogiCow do you also go by "MadBrain"?

This post has been edited by RyanThunder: 29 September 2007 - 10:34 PM

0

#25 User is offline   Dr Lancer-X 

  • 電波、届いた?
  • Group: DigiStaff
  • Posts: 8,936
  • Joined: 20-March 02
  • Location:ur mom nmiaow

Posted 29 September 2007 - 10:42 PM

MadBrain is logi's brother.

Also, what do you mean 'cumbersome'? If you want advanced functionality, you can't be afraid of writing a teeny bit of Robotic.
Posted Image
<Malwyn> Yes, yes. Don't worry I'd rather masturbate with broken glass than ask you for help again. :(
0

#26 User is offline   Pyro1588 

  • wojtek
  • PipPip
  • Group: Members
  • Posts: 145
  • Joined: 20-October 02
  • Gender:Male
  • Location:Minnesota

Posted 30 September 2007 - 04:57 AM

ryan: it's really not that complex. and besides, if it works like it looks like it does, then you really shouldn't need to understand it. just load it up and let it spit out an mzm for you.
and if you're in need of a system to place images loaded from files on-screen, then i'd seriously suggest writing a simple converter for normal bitmaps. if you have photoshop (or something similar) you can always export as 24-bit RAWs or paletted RAWs and go from there.
<Tox> bah. I may as well give in and shop australia. D:
<pyro1588> "welcome to australia, can i help you find what you're looking for?"
<Tox> pyro1588, I'm giving you the most reproachful of glares right now.
--------
Go show those nutty Koreans what us crazy Europeans are made of pirate.gif pirate.gif pirate.gif - Saike
<exophase> The old Commodore strategy of, "Go friggin' bankrupt!"
<wervyn> Go away! I'm writing the same engine I always do!
0

#27 User is offline   Exophase 

  • Laughing on the inside.
  • Group: DigiStaff
  • Posts: 7,155
  • Joined: 23-October 00
  • Gender:Male
  • Location:Cleveland, OH

Posted 30 September 2007 - 09:13 AM

RyanThunder, on Sep 29 2007, 05:33 PM, said:

Are you sure it's this cumbersome to do this?

I can't just do something like "load bitmap" and "place at x y"?

By the way LogiCow do you also go by "MadBrain"?

Most of that code is for writing the palette and MZM, not loading the BMP, and Robotic can actually output MZMs directly too (although you'd need to construct it somewhere first, which I guess is why Lancer-X didn't do this)
~ ex0 has a kickass battle engine, without it you sux0rz! without it you sux0rz! ~

"The fact that I say I've one of the best, is called honesty." -Akwende
"Megazeux is not ment to be just ASCII, it is ANSI!" - T-bone6
"I hate it when you get all exo on me." - emalkay

Exophase can what Rubi-cant.
exoware is ware ur ware is exoware
ps. not loking 4 new membrs kthx
0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

7 User(s) are reading this topic
0 members, 7 guests, 0 anonymous users