I want to code an electronic magazine program. I want it to be a windowed app with DirectX capabilities and article displaying. How can I do this?

If you've never seen something like Im talking about.. go to and look at the hugi mag. Id like to do something like that.


Posted on 2002-01-08 17:42:32 by Torch
That is seriously a kick-ass magazine, thanks for pointing it out. I'm off to do some reading :)
Posted on 2002-01-08 18:23:41 by sluggy
LOL :)

You see.. Thats the look I want to emulate. Id love to know of a place to start.. I dont know.. thats why I asked here :).

Posted on 2002-01-08 19:23:53 by Torch

Darn.. I guess no one knows.. :(
Posted on 2002-01-09 19:13:01 by Torch
I must say that is very cool. It's nothing you couldn't do with Flash, though. But I guess if you really want to do it with win32asm or another language it isn't that much different than a game. I would even go so far as to say you could improve it by not haviong to rewrite the app over & over for each issue & simply use the same techniques that HL-CS or QUAKE might use and treat each issue as a new "level". simply have the prog update itself (or an option to update... | look for new levels on your website) with new issues. I don't know anything about DX, but I've seen some OGL tutes on loading different evironments. Perhaps you could use this approach instead. I would imagine it would be quite an undertaking. Keep in mind I don't really know what I'm talking about. Good luck on your project.
Posted on 2002-01-09 20:28:21 by lackluster
The DirectDraw issues shouldn't be too bad - especially if you want
it to work both windowed and fullscreen, you limit the functions you
can use, and thus only really need to look up the "original" ddraw
interface. I don't know if you need to handle different desktop color
resolutions when in windowed mode, or whether ddraw will handle
it for you. If you have to, and you're too lazy ;) to write your own
color conversion, check out the hermes library. It might not be the
best, but it works.

As for the rest... you'll definitely want an "engine" that is more or
less independent of the current issue of the magazine. Using a
subset of HTML would be okay for the articles (bold, italic, hyperlinks,
images - that's "all" you need). The code to parse the html is trivial,
the code to display it properly with linebreaks and all might be a
bit annoying. *Don't* use the microsoft IE control for this ;).

Store the files compressed in a proprietary format. Why? Because
you'll learn something while coding it, it will be fun, and you will
keep filesize down.

Other than that? Heh, there's a lot of lower-level technical issues
to sort out.
Posted on 2002-01-09 21:30:30 by f0dder
This would be a good project for DirectX 8.1 :)

Things like this become much easier when you chip it down into the base ideas... I have a few examples to do a few of the tricks in that demo... I'll look for them

If you do try to complete it look for help in game development forum and post the source -- I think everyone would appreciate that :)

Posted on 2002-01-10 00:29:47 by Sliver
These capture some good history... issue #15 has a lengthy, in-depth dissertation on why MP3 won't be the music file format of the future... of course we now know they were wrong, but, it's an interesting read and if we wen't in the future, it might be quite convincing...

Posted on 2002-01-10 03:21:32 by _Shawn
Sliver, I think it will be better to use DirectDraw <something-old>.
Just my personal opinion :). But I don't think you can take advantage
of many of the features of the newer DirectDraws if you want to
run windowed... and what more do you need for a diskmag than
framebuffer access anyway?

Shawn, yes, the newer HUGI issues are very good. Didn't find the
german issues very interesting, probably partly because I suck at
german ;). But there's been some very nice articles on a broad range
of subjects in hugi.
Posted on 2002-01-10 04:38:13 by f0dder
true, you can complete what they accomplish without using directx8, however, who wants to just do that?

All they do is:
1) have a bitmap image as background
2) have a menu system (with rollover ability)
3) allow for embeded text (taken from paked file)
4) and scroll bar functionality (horizontal and verticle)

To be perfectly honest the content is more impressive then the quality...

None of this is "that" hard... a better front end could have been created using flash 5

Why not add a little more to it? Check out the menu system for RedFaction or Return to Castle Wolfenstein (both menus created using directx8.0 -- although it uses "some" Opengl, but that was more for the game itself)


ps. Directx < 8.0 only advantage is that you have a pointer to video memory...

I have been reading alot of questions lately related to DirectX 8 and the exclusion of DirectDraw from the new API. Many people have fallen back to DX7.

I can understand people using DX7 if they have alot of experience with that API, but many of the questions seem to be coming from people who are just learning DX, and they are stuck learning an old API. People have argued that many people don't have 3D hardware, and therefore D3D would be a bad alternative for DirectDraw. I don't believe this is true - 2D rendering(such as a menu) in D3D requires very little vertex manipulation, and everything else boils down to fillrate.

In short, 2D rendering in D3D on 2D hardware should have pretty much the same performance as DirectDraw, assuming decent fillrate. The advantage is that the programmer can learn the newest API, and performance on newer hardware should be very good. Also, you have the option to uses vertices :) :) :) and that should make it all worth it
Posted on 2002-01-10 12:30:38 by Sliver
I still prefer a 2D approach. I hated the RedFaction interface. RTCW
is okay. For diskmags, I prefer something relatively simple. Hugi
works like a charm, and is pretty as well. Can't see a reason to
use 3d just because you can... I like it when 1 pixel = 1 pixel.

And don't talk about flash, flash sucks, I've never seen any useful
or nice interfaces coded in it. Fine for banner ads and small games,
but that's about it. I would be happy if flash had not started to infest
the net.

Well, those were just fragments of thoughts, and of course just
my own insignificant opinon.
Posted on 2002-01-10 12:48:04 by f0dder

Using 3D to do 2D stuff is lame, after all why shoul the board calculate vertex and projections and all other stuff just to get a pixel on screen?

The answer is simple: stupid DX8 programmers! and many comercial issues.

There is a need for a pointer to video memory, there are a lot of 2D FX that can not be done in 3D and/or doing it in 3D is a vaste of resources/overkill.

If i wnat to test new things (the ones that are not implemented inside 3D video board) it means i can not do them? why?

Like for example if i want to test a realtime raytracer engine, i do not need nothing from their vertices and polygons but i still need to place pixels at high speed on screen, maybe i want FSAA and for my meny systems i want accelerate 2D alpha blending.

NOT haveing something IS NEVER a PLUS! its absurd...
NOT beeing able to do somthing in your way is also a minus

After all they can tell you to programm in HLL because its much easyer for the beginner (IMHO is NOT) ... but we are ASM programmers here are we not?

And after all the board HAS to DO 2D... for fillrate :) at the end it gets to filling triangles on a 2D screen, obviousely the board can do it... "they" just do not want us to use it also...

besides GUIs even in windows needs and uses 2D accelerations, and video drivers export such functions for windows GUI, why not for DX?

The whole stuff is a stupid problem because some guy thought that it can get some extra 10fps if we do not have a pointer to video memory... LOL the should just told us not to read/write video memory when rendering simple as that...not let us without something that is very usefull ...

That is why i did not and will not use DX8 :) DX without 2D is no fun :)

Posted on 2002-01-10 14:06:21 by BogdanOntanu
That is why i did not and will not use DX8 :) DX without 2D is no fun

Bogdan, are you saying that DX8 is not backward compatible with DX7? What happens if you run an app designed for DX7 on a system with DX8 installed?

If DX8 is missing backward compatability, then i would have to say that is one of the most ludicrous situations that MS has ever imposed on developers. Imagine all the vendors that designed games for DX7, and then have to release updates for DX8. Imagine the calls to the vendor's help desk: "Hi, i installed your game it ran sweetly, then i installed the latest game 'Blah', and now your game doesn't work. What gives? What crap did you make?".
Posted on 2002-01-10 16:27:22 by sluggy
If you want windowed mode then windows gdi can be quite powerful, easily powerful enough to do a e-zine like this with even fancier effects.

I am writing a library of graphics functions, bitRAKE wrote a very fast alphablending algo for it, and this could be very helpful to you. Its not finished but take a look at this nice partcile effect to see whats possible, and quite easy with it.

This is not DirectX at all, rather it uses DIBSections, but seen as DIBSections give you a pointer to the bitmap bits the functions could be easily transfered to DX.

Contact me either here or through e-mail if you'd prefer to go down this route (whatever route it would actually be :confused:)

Good luck :alright:
Posted on 2002-01-10 17:21:27 by Eóin
I accidentally stumbled onto the source code of the hugi magazine engine, also that plays the music, the source code of the music player, and the file format of the music with source on how to do it yourself... I'm almost positive that this guy wrote it...

Posted on 2002-01-10 19:40:22 by _Shawn
Hey guys,

Yeah Shawn.. that's him. I e-mailed him back in August, but he didnt tell me alot. He just told me to create a formatting engine for the articles and such. He didnt really tell me how he did the interface at all lol :).

What you saw was Panorama. It is the Hugi engine, but its limited to a certain extent. It has to always say Panorama on it, so you can't really claim it as your own. It kind of sucks when you want to do it on your own hehe. BTW, he will only give out the source if you are porting it to another platform, so its no go for me.

I am interested to see what other ideas people come up with. I don't have alot of time to do the coding now, so I can wait for any libraries that might help. :) This is getting some nice discussion going. Maybe when I get it all working, I could give it to you guys and you can do an ASM mag since APJ is up and down too much hehe.

Thanks for the help so far guys. It's inspiring :). It's getting my mind going :).

Posted on 2002-01-10 20:02:02 by Torch
Originally posted by BogdanOntanu

NOT haveing something IS NEVER a PLUS! its absurd...
NOT beeing able to do somthing in your way is also a minus

inline int Draw_Pixel(int x, int y,int color,
UCHAR *video_buffer, int lpitch)
// this function plots a single pixel at x,y with color

video_buffer[x + y*lpitch] = color;

// return success

} // end Draw_Pixel

And here is what your pionter for video memory gets you :) a more convient function to do the same thing...

You can say all you want about them taking away your priviledges for a pointer to video memory, but I don't see you calling functions like

push a
push b
push c
call somefunction

You use "invoke" or another, more convient method...

I do see the use in a pointer to video memory, however, don't minus out an entire API because you can't get direct access to vdeo memory (memory that almost EVERY game programmer wraps into a function such as above -- its just microsoft did it for you (for good or bad)).

great you got me playing advocate for microsoft...


:) :) :)

ps. So I'm just a stupid Directx programmer? That's not very nice... Whether or not it was IYHO

Posted on 2002-01-10 23:05:09 by Sliver
Sluggy, each new directx version is backwards compatible - that's
one of the advantages of the COM interface thingamajigs. Just if
you use the *new* interface (by querying the dx8 interface, or however
that's done), you can't use the old dx7 features. At least that's how
I have understood it.
Posted on 2002-01-11 00:18:51 by f0dder
Sliver, if you usually write your effects with SetPixel, I can
perhaps understand why you think losing the lpSurface pointer
is not a bad idea ;). But really, nobody with any sense would
use that approach.

Some effects are hard or impossible to make in 3D mode. Unless
the mucky method of creating it in a texture, and showing by
mapping it on a rectangular polygon. And then you must keep in
mind that texture update is usually a slow process on most 3d

And again... for a lot of stuff, you just don't *need* 3d, so
why the heck use it? Look where the "because I can" mentality
got the microsoft office package :rolleyes:
Posted on 2002-01-11 00:25:34 by f0dder
fodder -- with all due respect,

I'm giving an example... anybody with any "sense" would have seen that ;)

Some effects are hard or impossible to make in 3D mode.

And those would be?
The example you gave isn't hard at all...

And again... for a lot of stuff, you just don't *need* 3d, so
why the heck use it?

Because *Torch* may want to use it... I don't remmeber in all the talk here that he specified using only 2d...

microsoft office package

Look how well that sold :) We could only wish to have that kind of selling potential
Posted on 2002-01-11 01:04:16 by Sliver