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


  • Content count

  • Joined

  • Last visited

Community Reputation

106 Neutral

About triangles

  • Rank
  1. [quote name='ApochPiQ' timestamp='1317064784' post='4866184'] The Standard Model of [i][b]PARTICLE[/b] [/i]Physics is a totally different beast. [/quote] Well, I'll let Steve speak for himself, but it seemed quite obvious he was talking about THE 'Standard Model'... which is what most physicists refer to it as. Maybe not though.
  2. [quote name='ApochPiQ' timestamp='1317058245' post='4866150'] There is no "standard model of physics."[/quote] [url="http://en.wikipedia.org/wiki/Standard_model"]http://en.wikipedia.org/wiki/Standard_model[/url] How wrong can you be? ;P Surely you heard of the standard model before?
  3. I expect you can use SDL to render the font glyphs onto a surface and save that, but since I haven't used fonts with SDL I can't help with that. GDI is pretty easy. In fact I have some code here which renders all the ASCII characters for any given font. Hope it helps. [code] /// create font ///param font Win32 font handle ///param sz wSize of font ///param fg foreground colour ///param bg background colour ///param hdc Win32 device context handle ///return rectangle representing bounds of drawn area RECT texmapfont::Create(HFONT font, WORD sz, COLORREF fg, COLORREF bg, HDC hdc) { // allocate and clear pBitmap data SetSize(sz); // create windows hdc and pBitmap HBITMAP hbm = 0; HGDIOBJ oldgdiobj[2]; if (hdc == 0) { HDC tdc = GetDC(NULL); hdc = CreateCompatibleDC(tdc); hbm = CreateCompatibleBitmap(tdc, wSize, wSize); oldgdiobj[0] = SelectObject(hdc, hbm); ReleaseDC(NULL, tdc); } // create and fill character buffer with ASCII characters 32-126 char buffer[256-32]; for (int i = 0; i < 255-32; i++) buffer[i] = 32 + i; buffer[255-32] = 0; // set text colours SetTextColor(hdc, RGB(255,255,255)); SetBkColor(hdc, RGB(0, 0, 0)); // wipe DC to black HBRUSH hb = CreateSolidBrush(RGB(255,0,0)); RECT rc = {0, 0, wSize, wSize}; FillRect(hdc, &rc, hb); DeleteObject(hb); // set font details oldgdiobj[1] = SelectObject(hdc, font); LOGFONT lf; GetObject(font, sizeof(LOGFONT), &lf); name = lf.lfFaceName; dwItalic = lf.lfItalic; dwWeight = lf.lfWeight; // draw glyphs GLYPHMETRICS gm; MAT2 matrix; char txt[2] = {0, 0}; memset(&gm, 0, sizeof(gm)); memset(&matrix, 0, sizeof(matrix)); matrix.eM11.value = 1; matrix.eM22.value = 1; int sx = 0, sy = 0; // glyph rcPos for (int i = 0; i < 255-32; i++) { // calculate glyph wSize int wOhl = 0, wOhr = 0; // overhang left/right txt[0] = buffer[i]; rc.left = sx; rc.top = sy; rc.right = rc.bottom = wSize - 1; DrawText(hdc, txt, 1, &rc, DT_LEFT|DT_CALCRECT|DT_NOPREFIX); GetGlyphOutline(hdc, buffer[i], GGO_METRICS, &gm, 0, NULL, &matrix); if (gm.gmptGlyphOrigin.x < 0) { // glyph overhangs left edge wOhl = gm.gmptGlyphOrigin.x; rc.left -= gm.gmptGlyphOrigin.x; rc.right = rc.left + gm.gmCellIncX; } if (gm.gmptGlyphOrigin.x + gm.gmBlackBoxX > (WORD)(rc.right - rc.left)) { // glyph overhangs right edge wOhr = (gm.gmptGlyphOrigin.x + gm.gmBlackBoxX) - (rc.right - rc.left); rc.right = rc.left + gm.gmptGlyphOrigin.x + gm.gmBlackBoxX; } // rercPos if over end of line if ((DWORD)rc.right >= wSize) { sx = 0; sy += rc.bottom - rc.top; if ((DWORD)sx >= wSize) break; rc.left = sx; rc.top = sy; rc.right = rc.bottom = wSize - 1; DrawText(hdc, txt, 1, &rc, DT_LEFT|DT_CALCRECT|DT_NOPREFIX); if (gm.gmptGlyphOrigin.x < 0) { // glyph overhangs left edge wOhl = gm.gmptGlyphOrigin.x; rc.left -= gm.gmptGlyphOrigin.x; rc.right = rc.left + gm.gmCellIncX; } if (gm.gmptGlyphOrigin.x + gm.gmBlackBoxX > (WORD)(rc.right - rc.left)) { // glyph overhangs right edge wOhr = (gm.gmptGlyphOrigin.x + gm.gmBlackBoxX) - (rc.right - rc.left); rc.right = rc.left + gm.gmptGlyphOrigin.x + gm.gmBlackBoxX; } } // draw glyph DrawText(hdc, txt, 1, &rc, DT_LEFT|DT_NOPREFIX|DT_NOCLIP); // store glyph info in array glyph[i].bValue = txt[0]; glyph[i].wOhl = -wOhl; glyph[i].wOhr = wOhr; glyph[i].rcPos.left = (WORD)rc.left + wOhl; glyph[i].rcPos.top = (WORD)rc.top; glyph[i].rcPos.right = (WORD)rc.right; glyph[i].rcPos.bottom = (WORD)rc.bottom; // move draw rcPos sx = rc.right; } SelectObject(hdc, oldgdiobj[1]); // copy drawn data to pBitmap data COLORREF pv; for (DWORD iy = 0; iy < wSize; iy++) { for (DWORD ix = 0; ix < wSize; ix++) { pv = GetPixel(hdc, ix, iy); pBitmap[iy * wSize + ix] = (BYTE)(pv & 0xFF); } } if (hbm != 0) { SelectObject(hdc, oldgdiobj[0]); DeleteObject(hbm); DeleteDC(hdc); } dwHeight = glyph[0].rcPos.bottom; rc.left = rc.top = 0; RECT ret = { (WORD)rc.left, (WORD)rc.top, (WORD)rc.right, (WORD)rc.bottom }; return ret; } [/code]
  4. Assuming you are on windows, use GDI to output all the fonts glyphs to a window, storing glyph position info along the way. Then save the output to a bitmap image and store the glyph positions in a data file.
  5. The over ambition is probably due to this : [url="http://en.wikipedia.org/wiki/Dunning%E2%80%93Kruger_effect"]http://en.wikipedia.org/wiki/Dunning%E2%80%93Kruger_effect[/url] The lack of indie programmers asking for help with their smaller projects is probably that the experienced developers are mostly making their products rather than seeking help.
  6. [quote name='SnailCoder' timestamp='1314720282' post='4855506'] In my opinion, based on what you're saying, you want to use Awesomium, essentially, that should give you all you need. You can use both HTML and CSS with the Webkit library to get the kind of customisation you're looking for. Heres a couple of links to the GUI of a guy who did just that: [url="http://blog.wolfire.com/2009/05/new-object-palette-window/"]http://blog.wolfire....palette-window/[/url] [url="http://blog.wolfire.com/2009/10/animation-mixing-ui/"]http://blog.wolfire....tion-mixing-ui/[/url] NOTE: I haven't tried this yet, but I will be doing so soon, so I don't know how easy this is to pull off. You could [/quote] The berkelium library is free and open-source and is basically the same as Awesomium.
  7. I recently scrapped my c++ gui and instead implemented a simple windowing system with all rendering done by google chrome (using the berkelium library). This means I can now create my user interface with html and javascript. The windowing system can call custom javascript in the browser, and the browser can fire off events to the windowing system.
  8. glMatrixMode(GL_TEXTURE); [url="http://www.opengl.org/sdk/docs/man/xhtml/glMatrixMode.xml"]http://www.opengl.org/sdk/docs/man/xhtml/glMatrixMode.xml[/url]
  9. [url="http://en.wikipedia.org/wiki/Evolution"]http://en.wikipedia.org/wiki/Evolution[/url] [url="http://en.wikipedia.org/wiki/Speciation"]http://en.wikipedia.org/wiki/Speciation[/url]
  10. [quote name='Wilhelm van Huyssteen' timestamp='1312449197' post='4844412'] <P>Thnx I didnt know UDP works like that. i thought it was also just one continious stream of data. Didnt know you got split into packets and each packet gets checksummed. <BR><BR>I have one more question then. using udp for updating position and rotation is fine but what about shooting? if one client shoots his gun and the packet containing that information gets lost that would be bad seeing as the "shoot" data would only be sent once. Should i use a TCP/IP connection alongside my UDP connection for data that may not get lost.</P> [/quote] You could use this library: [url="http://enet.bespin.org/"]http://enet.bespin.org/[/url] It implements reliable UDP communications so you don't have to. There are python bindings (pyenet) too.
  11. [quote name='KrNaGe' timestamp='1312293076' post='4843597'] dude....i love you lol thank you so much...i worked ! [/quote] No probs
  12. I see now what is wrong. You are declaring the members of Entity in Player when they are inherited from Entity already. So when you set player->frame you are not setting entity->frame and vice versa. Remove the duplicate declarations from Player.
  13. Sorry, I was wrong about the modulo (The % button in windows calculator is not modulo) and the code would work. Although the code I gave (frame * width) is exactly equivalent and makes more sense.
  14. Actually, at frame zero we have: rect.left = (0 % 6) * width = 6 * width it should be rect.left = frame * width = 0 * width;
  15. 'columns' is always greater than 'this->frame', so 'this->frame / columns' is always zero. The statement "rect.top = 0;" is equivalent. I don't mean to be overly critical but doing things the way you were taught instead of understanding the maths involved is not a good way to do things... EDIT: If you have rows in the sprite map then you need to pass the number of rows and use 'rect.top = (this->frame % rows) * height;'