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

habus

Need advice with linked lists...

4 posts in this topic

Hmm not quite sure what your trying to do there. Why not just store the image with the object? Not quite sure what you are asking.
Personaly i just use a linked list for my objects and the objects have the images with them.
something Like this.

typedef struct Monster_{
int type;
directdraw suface buffer;
struct Monster_* next;
struct Monster_* prev;
} Monster;

0

Share this post


Link to post
Share on other sites
If you are building all the lists a initialization time, I would use a structure that had pointers to your images and put them on a multi-directional linked list. That way you can cycle through the images for animation purposes.

typedef node {

nodePtr *left;
nodePtr *right;
image *imagePtr;

} nodePtr;

Of course, this is C syntax, and if you are using c++ or another language, then you would have to alter things accordingly.

I like using linked list for animation, but tend to be careful that I am not doing any allocation at runtime. It can really cause some problems. Using pointers will help you out. Especially if you are doing a shooter and want to cat animations onto other animaitons, etc. You can extend your animations or limit them depending on how deep you sycle the list and what other lists you insert or attach to the parent list.

Skott

0

Share this post


Link to post
Share on other sites
The way I've always done it was to have a list of entities *seperate* from their images, i.e.:

struct Monster {
pointer to direct draw surface
int curframe;
int hitpoints;
int attackstrength;
int movementspeed;
// whatever
}

By using a pointer to a surface instead of an actual surface, you gain 2 things:

1) Multiple instances of Monster can share the same direct draw surface, saving gfx card memory;

2) it's easy to have monsters with the same stats, but different appearances. This is the classic "red blob/green blob/blue blob" technique used by lots of old NES games (FF springs to mind).

Keep in mind that even though your images are outside the struct, each struct needs to know what frame of animation it's on... otherwise, all of your monsters will all have to be on the same frame at the same time, which doesn't look realistic.

Mason McCuskey
Spin Studios
www.spin-studios.com

0

Share this post


Link to post
Share on other sites
Hi!

For the little shooter I'm doing I want to have a linked list to hold
my objects and other for the images. But I have a doubt here, should I
use this schema - 2 linked list - or :
1 List for images
1 For objects that don't need to be validated - background tiles, explotions,
planets in the first plane,etc.. -
1 For objects to validate - spaceships, bullets, lives and so on - ..

I used the last one in a DOS side view game I did once but I'm not sure if
the first method will affect the performance - the second one does less
collition detection -. The first one allow me to deal with everything in just
one class and the map editor could be used for both..

What method do you use to hold your information - objetcs - and images?
Any advice?

Thanks in advance.

0

Share this post


Link to post
Share on other sites
Thanks for all your posts!

The way I'm doing it its to have a class for holding the foe info, something like this:

Class miFoe{
int iKind;
int iFrame,iMaxFrame;
int iHp, iSpeedx,iSpeedy,...
}

the var iKind allow me to search in the images lists to display the correct one..

With the technique used by mason, Do you search the right image every time you create a new object?? Is this faster than just looking for the image when you update the screen?..

0

Share this post


Link to post
Share on other sites