• Announcements

    • khawk

      Download the Game Design and Indie Game Marketing Freebook   07/19/17

      GameDev.net and CRC Press have teamed up to bring a free ebook of content curated from top titles published by CRC Press. The freebook, Practices of Game Design & Indie Game Marketing, includes chapters from The Art of Game Design: A Book of Lenses, A Practical Guide to Indie Game Marketing, and An Architectural Approach to Level Design. The GameDev.net FreeBook is relevant to game designers, developers, and those interested in learning more about the challenges in game development. We know game development can be a tough discipline and business, so we picked several chapters from CRC Press titles that we thought would be of interest to you, the GameDev.net audience, in your journey to design, develop, and market your next game. The free ebook is available through CRC Press by clicking here. The Curated Books The Art of Game Design: A Book of Lenses, Second Edition, by Jesse Schell Presents 100+ sets of questions, or different lenses, for viewing a game’s design, encompassing diverse fields such as psychology, architecture, music, film, software engineering, theme park design, mathematics, anthropology, and more. Written by one of the world's top game designers, this book describes the deepest and most fundamental principles of game design, demonstrating how tactics used in board, card, and athletic games also work in video games. It provides practical instruction on creating world-class games that will be played again and again. View it here. A Practical Guide to Indie Game Marketing, by Joel Dreskin Marketing is an essential but too frequently overlooked or minimized component of the release plan for indie games. A Practical Guide to Indie Game Marketing provides you with the tools needed to build visibility and sell your indie games. With special focus on those developers with small budgets and limited staff and resources, this book is packed with tangible recommendations and techniques that you can put to use immediately. As a seasoned professional of the indie game arena, author Joel Dreskin gives you insight into practical, real-world experiences of marketing numerous successful games and also provides stories of the failures. View it here. An Architectural Approach to Level Design This is one of the first books to integrate architectural and spatial design theory with the field of level design. The book presents architectural techniques and theories for level designers to use in their own work. It connects architecture and level design in different ways that address the practical elements of how designers construct space and the experiential elements of how and why humans interact with this space. Throughout the text, readers learn skills for spatial layout, evoking emotion through gamespaces, and creating better levels through architectural theory. View it here. Learn more and download the ebook by clicking here. Did you know? GameDev.net and CRC Press also recently teamed up to bring GDNet+ Members up to a 20% discount on all CRC Press books. Learn more about this and other benefits here.

Archived

This topic is now archived and is closed to further replies.

[GaNoN]

Transparency in VGA

2 posts in this topic

To do full fledged alpha blending in 8-bit color you'd essentially need a 256x256 CLUT
for each transparency level (I.e. a table that for each possible source and destination pair hold the new pixel color for each possible alpha value). This amounts to 256x256x256 = 16MB of CLUT. If you're looking to do a 50/50 blend, a single 256x256 clut is sufficient.

Obviously tradeoffs can be made. For example, ordering your palette so that colors that "nearly match" are close to each other, you can treat them as identical when blending, reducing each CLUT to e.g. 64x64 entries (Entry 0 covers colors 0,1,2 and 3, Entry 1 covers 4,5,6 and 7). Limiting the amount of alpha levels also help. 16 levels or less is enough for some applications. I.e. 64x64x16=64K of CLUT.

Finally, may I suggest that true color IS the only way to get the really "crisp" look.

/Niels

0

Share this post


Link to post
Share on other sites
I am creating a VGA game in DJGGP and are wondering how I could efficiently do transparency. I don't really know how to make the palette to do this. This is the code I have written.

#include
#include
#include
#include
#include

typedef unsigned char byte;
byte *vram;
int i;

void SetGraphMode();
void DisplayVram();
void spalette(int colour,int red,int green,int blue);

void SetGraphMode(){
__dpmi_regs regs;
regs.x.ax = 0x13;
__dpmi_int(0x10,®s);
};

void DisplayVram(){
dosmemput(vram,64000,0xa0000);
}

void main(){
SetGraphMode();
vram = (byte*)malloc(64000);
memset(vram,0,64000);
for(i=0;i<10;i++){
spalette(i,int(6.1*i),0,0);
}
for(i=0;i<10;i++){
spalette(i+10,0,int(6.1*i),0);
}
for(i=0;i<10;i++){
spalette(i+20,0,0,int(6.1*i));
}
for(i=0;i<10;i++){
spalette(i+30,int(6.1*i),int(6.1*i),0);
}
for(i=0;i<10;i++){
spalette(i+40,int(6.1*i),0,int(6.1*i));
}
for(i=0;i<10;i++){
spalette(i+50,0,int(6.1*i),int(6.1*i));
}
for(i=0;i<60;i++){
spalette(i+60,int(6.1*i),int(6.1*i),int(6.1*i));
}
for(i = 0;i<80;i++){
vram[i]=i;
}
DisplayVram();
bioskey(0);
}

void spalette(int colour,int red,int green,int blue){
__dpmi_regs regs;
regs.x.ax=0x1010;
regs.x.bx=colour;
regs.h.dh=red;
regs.h.ch=green;
regs.h.cl=blue;
__dpmi_int(0x10,®s);
}

If ne1 could suggest a good way plz reply

0

Share this post


Link to post
Share on other sites