• 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.

xProwler

filling a pixel... sure, SOUNDS easy.

3 posts in this topic

Funkymunky sounds like a nice chap
could you do a quick DDraw example?
the SDK is giving me a freakin headache...

just a fullscreen 640*480 or sumthing with lots of comments and how to put a single pixel. Thanks on beforehand.

0

Share this post


Link to post
Share on other sites
Now that I have that info, I still can't get the book for another 4 or 5 weeks. I have to buy some pics from my sisters wedding and get new shoes, a new wallet, some other things, and I really need a TNT2 ultra if I get the $ :P Anyway, I'm gonna try and get the book before the TNT2 and after the rest if I have the $ on that paycheck.. but if i go from $0 to $260 then the TNT2U it is :p Even if I get it ASAP, I have a dilemma. I have like weeks to kill before then. I love C++, I have learned tons about it, but can't use it really without any kind of graphics. I want to start writing my own game - can someone help me with a way, using basic C++ and VC++6 standard edition, to fill a pixel? I was told at first I could just write to a000:0000, but then they said that I couldn't, they being some friends of mine, and I don't know how to write to a specific location like that anyway. (sigh). If you can help me I would greatly appreciate it.

xProwler

0

Share this post


Link to post
Share on other sites
OK, sure, here's an example of putting a pixel to the primary buffer (the screen that you see). I hope this helps.

I won't cover any windows that is not completely necessary, because it is a pain in the ass.

[CODE]
// Include DirectDraw thrash
#include

// * Gasp! global variables! *
LPDIRECTDRAW lpdd;
LPDIRECTDRAWSURFACE primary;

// Later down in the code, in the main loop
// (i'm assuming you put this stuff in a
// separate function

// Create Direct Draw Object
if(DirectDrawCreate(NULL,&lpdd,NULL)!=DD_OK)
return(0);
// Now set cooperative level
if(lpdd->SetCooperativeLevel(window_handle, DDSCL_FULLSCREEN | DDSCL_EXLCUSIVE | DDSCL_ALLOWREBOOT)!=DD_OK)
return(0);
// Now set the display mode
if(lpdd->SetDisplayMode(640,480,16)!=DD_OK)
return(0);

// Now set up the primary surface
DDSURFACEDESC ddsd;
// Fill the big happy house to 0
memset(&ddsd,0,sizeof(DDSURFACEDESC));
// Set data fields
ddsd.dwSize=sizeof(ddsd);
ddsd.dwFlags=DDSD_CAPS;
ddsd.ddsCaps=dwCaps=DDSCAPS_PRIMARYSURFACE;

// create the primary surface
if(lpdd->CreateSurface(&ddsd,&primary,NULL)!=DD_OK)
return(0);

// Now get the video pointer
USHORT *vidmem_ptr;

// Lock the primary surface
primary->Lock(NULL,&ddsd,DDLOCK_SURFACEMEMORYPTR | DDLOCK_WAIT, NULL);

// Now get the address of the memory and stuff it into the pointer
vidmem_ptr=(USHORT *)ddsd.lpSurface;
// Now set up where you want the pixel to go
int x=320,y=240,col=40;
// Now plot the pixel
vidmem_ptr[x+(y*ddsd.lPitch >> 1)] =col;

// Unlock the display memory
primary->Unlock(NULL);

Whew! Now here's how to shut down DirectX:

lpdd->Release();
primary->Release();


Hope that helps!

------------------
That's how you do it, but that's just the opinion of a MADMAN!!! BWAHAHAAHAHA! :D :D :D

0

Share this post


Link to post
Share on other sites