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

Elrinth

Members
  • Content count

    17
  • Joined

  • Last visited

Community Reputation

130 Neutral

About Elrinth

  • Rank
    Member
  1. Well I figured out why my file i/o was so slow... I rewrote the code to load / save the sections via FILE *fp and use fgetc and fputc.. This was soooo much faster... Before I had to convert strings into values this was probably slowing down my code considerably... Now it's working flawlessly even if I move the camera really fast
  2. Hi! I'm working on a level editor for a 2D game atm, and I'd like to have the file you're editing to stream from/to a file or many files. I've got Resolution 800x600. I make sections outta 256x256 pixels. Where there are 16x16 pixels large tiles. Which makes 256 tiles per section. NrOfSectionsX = ceil(resolutionX / sectionXpixels) + 2 NrOfSectionsY = ceil(resolutionY / sectionYpixels) + 2 i add +2 so I can get sections -1 and +1 outside of the screen so I got that in memory and can display it instantly without having to load anything. However the problem comes when I wanna load sections outside the screen. I store each section as it's own file. Where I call them for example: 0,0,0.txt being the upper left screen which can be seen when starting. Then next is called 1,0,0.txt which is 256 pixels to the right of previous section. Problem is. There's choppiness when I load these sections which are outside of the screen. It happens because I write sections to disk which aren't important anymore. and I read sections which become important. So I put the level save/load in separate thread. Sure there is no choppiness any longer.. However, there is delay before they are presented. So I thought, hmmm what about having one large file containing all the level data with pointer-data in the beginning of the file which says where in the file each section is... Sure that works.. However, what happens when data is changed? Yes that's right, it doesn't work, because you cannot edit stuff you've already written to the file. I thought about putting it all into a zip file aswell. But there seems to be no libraries which can fix my problems. Now I'm asking if you guys have any good idea to fix this problem? If I remove the whole file i/o then my program runs smooth at 1000 fps. But sadly no sections are stored which kinda sucks. Visual example of what I'm trying to deal with: [url="http://www.youtube.com/watch?v=ZauORPgxxJY"]http://www.youtube.com/watch?v=ZauORPgxxJY[/url]
  3. like you guys suspect. I was doing other stuff which was eating alot of FPS. Still haven't figured everything out. It's still eating quite alot of FPS. But I started with replacing all variables in the draw functions to reference objects rather than copy objects. It's still not quite there yet tho. Filling a screen with tiles and drawing 3 lines of text and drawing mouse cursor still sets me at 240 fps. The moment I don't call the draw methods for all tiles I go back up to 1600 fps. I also tried modifiying the code by removing the glDrawArrays in runtime. It did not affect the FPS at all. Meaning it's calling the methods which is costly. Right now all variables sent thru all "draw"-methods are reference variables. 240~260 fps @ ~0.004 sec per frame with screen filled with tiles @ resolution 800x600.
  4. Indeed seems what's eating my fps isn't any GL stuff.. I tried commenting out all draw code and FPS remains the same... It's either me allocating memory every frame or it's something else. [img]http://public.gamedev.net//public/style_emoticons/default/smile.png[/img] Seems what's eating fps is cause I'm not passing references of variables everywhere [img]http://public.gamedev.net//public/style_emoticons/default/smile.png[/img]
  5. 16x16 tiles means 16 pixels wide and 16 pixels high per tile. Resultion is 800x600. That makes 50 tiles in X and 37.5 (37) tiles in Y. which in total makes 1850 tiles for a screen (resolution will be 640x480 or low later, right now I'm still in testing stage). But this will call the function glDrawArrays (1850 times) As you can see.. there is barely any state changes. I'm doing glTranslate and glDrawArrays per tile and that's it, they're all using the same texture. I will bind between max something like 5-6 different textures each frame. I'll use sprite sheets for everything. I might not be using mipmaps. I'm using DevIL to load images. If I set: glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR_MIPMAP_LINEAR); then the textures don't appear. My computer is decent. i5 processor, 4gb ram, nvidia 560ti. So seeing poor performance already means I'm doing something very wrong, and I'd like some guidence on where the error is and the proper way to get it running faster than the furious
  6. Hi! I'm having troubles with poor performance with drawing of sprites. I create a sprite sheet from each texture. (a vbo for each texture, which contains position and texcoords for each sprite inside the texture) Code to draw a letter (from font): [code] GraphicsManager::GetInstance()->Draw("data\\gfx\\fonts\\ansi-thin.png", letter, iPos, iScale, iColor); [/code] Code in graphics manager to draw a sprite [code] void GraphicsManager::Draw( string i_fileName, int i_index, Vector3D iPos, Vector2D iScale, ColorF iColor ) { if (!_isInitialized) return; TextureManager::GetInstance()->BindTexture(i_fileName); glColor4f(iColor.R, iColor.G, iColor.B, iColor.A); glPushMatrix(); glTranslatef(iPos.X, iPos.Y, iPos.Z); GetSpriteSheet(i_fileName)->Draw(i_index); glPopMatrix(); } [/code] Code in SpriteSheet for drawing [code] void SpriteSheet::Draw( int i_index ) { if(!isAlreadyBound) Bind(); glDrawArrays(GL_QUADS, i_index*4, 4); } [/code] Drawing only a mouse cursor sprite: 4000+ fps. Drawing mouse cursor AND a letter from font (two texture binds, two vbo binds, two glDrawArrays calls): 2400+ fps Draw a string of text "Mouse Screen Pos:[1,319]" and the cursor takes me down to: 680 fps. Filling screen(800x600) with 16x16 tiles, drawing the string of text and mouse cursor makes: 20 fps. You see that performance drops pretty damn quickly. I'd like to know what I'm doing wrong. I did also try with ONE universal VBO created with 160 000 vertices before this code. Which had like 3-4 draw calls to that vbo. (one for each texture). Then I drew only parts of that giant VBO for each texture. depending on how many sprites we're drawn. That didn't give me any performance either. It was because I was constantly changing the VBO (GL_DYNAMIC_DRAW).
  7. yo! I'm having trouble.. flash is kind of a pain with loading files n stuff. so here's what I want to do. I want to load an image and once that's done I want to return the Bitmap data. But the problem is, there's no bitmap data until Event.COMPLETE has been done, yet flash allows me to do all kinds of stupid things while the file is being processed. I'll show you my graphicsmanager so far. right now my GetImage calls itself a bunch of times before it actually has the bitmap data to return. which isn't good ;) so how can I make the GetImage function WAIT for the file to have been loaded? I get stackOverflow if I'm unlucky cause the GetImage calls the LoadImage function gazillions of times because the bitmap data hasn't been made just yet. and no I can't simply set the filename and add it to the arraylist then the imagedata won't be ready and the place I'll be using it will whine about it being null. pretty prease help! http://www.pastebin.ca/926766
  8. oh sorry :D haha I'm using C#.NET http://www.cyrillic.com/3dkbd/ansitable.html am I supposed to do a REPLACE for all of those charactes to UTF-8? Seriously, there has to be an easier way. :)
  9. Ok I'm having trouble. I'm getting Latin1 encoded strings in UTF-8 format. So loads of characters are "SQUARES" if u guys see what I mean. anyways, how do I convert these SQUARES into their UTF-8 correspondent. For example, I've already succeeded in converting new-line (VT) by doing a .Replace((char)0x0B, "<br/>\n") now I want to replace -, ` among others so they show up nicely in the UTF-8 coded mode. What do I do? ANSI: 697359 CASH JOHNNY HELLO SWEDEN, I’M JOHNNY CASH –EN COUNTRYLEGEND OCH HANS SVERIGEBESÖK 2007-06-21 Böcker 1 BOKK Johnny Cash lever i svenska hjärtan. Han älskade Sverige och vi älskade Johnny Cash som fåandra artister. Han var en trogen gäst hos oss under ett kvarts århundrade. Från publikrekordet iScandinavium 1971 till den sista bejublade turnén 1997, när han märkt av sjukdom erövrade enny ungdomlig publik. Johnny Cash gjorde ett stort avtryck i vårt land. Det är hög tid att berätta omhans svenska konserter, hans nära vänskap med svenska fans, hans aptit på Janssons frestelse,hans oväntade besök i Pingstkyrkan och inte minst hans unika framträdande för fångarna påÖsteråkersanstalten. I boken kommer vi stjärnan nära in på livet genom nygjorda intervjuer,tidstypiska citat, personliga upplevelser och ett bildmaterial utan motstycke. REV REV UTF-8: 697359 CASH JOHNNY HELLO SWEDEN, IӍ JOHNNY CASH ֋EN COUNTRYLEGEND OCH HANS SVERIGEBES׋ 2007-06-21 B礫er 1 BOKK Johnny Cash lever i svenska hj峴an. Han 孳kade Sverige och vi 孳kade Johnny Cash som f匡ndra artister. Han var en trogen g崴 hos oss under ett kvarts 注undrade. Fr殠publikrekordet iScandinavium 1971 till den sista bejublade turnꮠ1997, n岠han m峫t av sjukdom er緲ade enny ungdomlig publik. Johnny Cash gjorde ett stort avtryck i v泴 land. Det 岠h秠tid att ber嵴a omhans svenska konserter, hans n峡 v寳kap med svenska fans, hans aptit p塊anssons frestelse,hans ov寴ade bes章i Pingstkyrkan och inte minst hans unika framtr奡nde f粠f毧arna p化ster欥rsanstalten. I boken kommer vi stj峮an n峡 in p塬ivet genom nygjorda intervjuer,tidstypiska citat, personliga upplevelser och ett bildmaterial utan motstycke. REV REV EDIT: .Replace((char)150 + "", "-") to replace the - to UTF-8 correct one. Now only the ’
  10. Hi fellow developers! I've tried exporting from 3DS via the Panda exporter and we successfully got the meshes rendered with the diffrent animations in our game. However sometimes the mesh turned into soup of random crap when we exported. So we tried to head over to Maya since it had an official exporter. When we try to export a skinned mesh from maya, it all looks good in the dxviewer. however our game would not load the mesh. It locks up at: "AnimationMeshContainer meshContainer = new AnimationMeshContainer();" where it says: value is out of bounds. According to the documents the problem lies somewhere in the inparamters. Oh and in Maya, if I set "show popup" [false] in the plugin export menu, how do I get it back? I tried replacing the .mel files with no success.
  11. Hi! I've started fiddling with directX in fullscreen and so on. Now I'm wondering if I can somehow get forms dropdown boxes, sliders, text and stuff like that in there somehow? How do I render them once I've successfully created them? Have any of you done any ui stuff, if so, how did you do it? Currently I'm trying to get the managed UI sample from DXSDK to work with my own program. But so far it's not working, but hopefully soon it will.
  12. nope.... my vertex array is 8*3 my normal array is 6*3 my indice array is 12*3*2 I'm not sure how I'm supposed to correctly make my normal array 24 elements large and still have the same content. I'm not familiar on how I flatteren something, what does it mean to do it? How should I store the loaded points for using a fast drawing method... and which is this fast drawing method (if not gldrawelements). [Edited by - Elrinth on October 23, 2006 6:41:49 AM]
  13. as I've said, the cube is drawn correctly... however the normals aren't. and yeah.. I should probably rename that var to m_facesX3 or something.. because that's what it is. ;)
  14. Hi! I'm new here :) and I've just made my first REALLY REALLY simple obj loader, however, I'm having trouble. I'm using JOGL just so you know. I'm storing my mesh data in these: private FloatBuffer m_vertices; private FloatBuffer m_texCoords; private FloatBuffer m_normals; private IntBuffer m_faces; I've successfully rendered a cube however I'm having trouble with normals. I store like this in the indices buffer(m_faces): [nx1, ny1, nz1, vx1, vy1, vz1, nx2, ny2, nyz2, vx1...] Which is the correct order? :D [n,v,t]? am I even in the correct order? :P Also, can someone post a nice cube OBJ file... currently I'm using: http://www.scs.fsu.edu/~burkardt/data/obj/cube.obj with made up texture indicenumbers.. :) here is my render func: // Enable Pointers gl.glEnableClientState(GL.GL_VERTEX_ARRAY); // Enable Vertex Arrays gl.glVertexPointer(3, GL.GL_FLOAT, 0, m_vertices); gl.glEnableClientState(GL.GL_NORMAL_ARRAY); // Enable Normal Arrays gl.glNormalPointer(GL.GL_FLOAT, 0, m_normals); gl.glEnableClientState(GL.GL_TEXTURE_COORD_ARRAY); // Enable Texture Arrays gl.glTexCoordPointer(2, GL.GL_FLOAT, 0, m_texCoords); // Render // Draw All Of The Triangles At Once gl.glDrawElements(GL.GL_TRIANGLES, m_nrOfFaces, GL.GL_UNSIGNED_INT, m_faces); // Disable Pointers // Disable Vertex Arrays gl.glDisableClientState(GL.GL_VERTEX_ARRAY); gl.glDisableClientState(GL.GL_NORMAL_ARRAY); gl.glDisableClientState(GL.GL_TEXTURE_COORD_ARRAY); (yeah I know it's supposed to be m_nrOfFaces*3 but I've made my reader increasing m_nrOfFaces *3 :) ) Well the lighting on my cube looks like crap because my normals are somehow strange... anyone know how to store the index array correctly with texture, normal and vertex? [Edited by - Elrinth on October 21, 2006 4:06:25 PM]
  15. I wanna see too!!! :D