• 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

197 Neutral

About Tchom

  • Rank

Personal Information

  1. FlashDevelop is an extemely useful and free editor for AS3 development (with rad code-hinting)
  2. The two languages aren't really comparable in that  way. AS3 is a high-level language, with very abstracted graphics drawing. If you're after a gentle transition from AS3 to something else, I'd suggest Java over C++ as its more similar (though, probably not quite as useful in the long run) and OpenGL. If you have an Android device, Java and OpenGL ES is a lot of  fun to learn. I'd also suggest OpenGL ES2 over OpenGl 1.x as well, because its almost the same standard as WebGL and writing your own shaders is a useful life-skill. I'm sure what I just said is probably a  lot to  take in, but just do some research  into the things I just mentioned and it might help you decide where to go next. I've been a Flash programmer for a couple of years and have been transitioning to other languages to make games and this was a comfortable road for me. Of course, if you're just trying to make a game as quickly as you can, Unity is a pretty neat engine with a lot in common with Flash.
  3.     Yeah, I worked that out with some experimentation .   Is there a more typical way to colour light?
  4. I implemented those suggestions and that helped heaps. I had my own brainwave (slapped myself for not thinking of it before), and added a limit to the distance from the light that attenuation and colour would be calculated at.   if(distance < limit) { diffuseDiff = clamp(dot(v_Normal, lightVector), 0.0, 1.0); diffuseDiff = diffuseDiff * (1.0 / (1.0 + (u_LightPower[i]* distanceSquared))); gl_FragColor.rgb *= vec3(1.0) / ((vec3(1.0) + ((vec3(1.0) - u_LightColours[i])*diffuseDiff))); } Hopefully that might help someone else
  5.   Oops, sorry about the confusion. I come from a Flash background, so I'm stuck in the habit of using FPS as a measurement of efficiency (I'll get better). My original and target speed was 16.6ms per frame, but it increase to 22.ms after three light, 33.3ms after four, etc etc.   What's the theory behind this line? Is it necessary?   This line determines how much to tint the fragment's rgb by each light's rgb. If 'diffuseDiff' is 0, then gl_FragColor.rgb would just be multiplied by vec3(1.0). If 'diffuseDiff' is 1, gl_FragColor.rgb is multiplied by the full value of vec3(u_LightColours[i]).   Thanks heaps guys. I'll try implementing this when I get home from work and report back on the difference. I really appreciate the help.
  6. Hey devs!   I've been working on a OpenGL ES 2.0 android engine and I have begun implementing some simple (point) lighting. I had something fairly simple working, so I tried to get fancy and added color-tinting light. And it works great... with only one or two lights. Any more than that, the application drops about 15 frames per light added (my ideal is at least 4 or 5). I know implementing lighting is expensive, I just didn't think it was that expensive. I'm fairly new to the world of OpenGL and GLSL, so there is a good chance I've written some crappy shader code. If anyone had any feedback or tips on how I can optimize this code, please let me know.   Vertex Shader uniform mat4 u_MVPMatrix; uniform mat4 u_MVMatrix; attribute vec4 a_Position; attribute vec3 a_Normal; attribute vec2 a_TexCoordinate; varying vec3 v_Position; varying vec3 v_Normal; varying vec2 v_TexCoordinate; void main() { v_Position = vec3(u_MVMatrix * a_Position); v_TexCoordinate = a_TexCoordinate; v_Normal = vec3(u_MVMatrix * vec4(a_Normal, 0.0)); gl_Position = u_MVPMatrix * a_Position; } Fragment Shader precision mediump float; uniform vec4 u_LightPos["+numLights+"]; uniform vec4 u_LightColours["+numLights+"]; uniform float u_LightPower["+numLights+"]; uniform sampler2D u_Texture; varying vec3 v_Position; varying vec3 v_Normal; varying vec2 v_TexCoordinate; void main() { gl_FragColor = (texture2D(u_Texture, v_TexCoordinate)); float diffuse = 0.0; vec4 colourSum = vec4(1.0); for (int i = 0; i < "+numLights+"; i++) { vec3 toPointLight = vec3(u_LightPos[i]); float distance = length(toPointLight - v_Position); vec3 lightVector = normalize(toPointLight - v_Position); float diffuseDiff = 0.0; // The diffuse difference contributed from current light diffuseDiff = max(dot(v_Normal, lightVector), 0.0); diffuseDiff = diffuseDiff * (1.0 / (1.0 + ((1.0-u_LightPower[i])* distance * distance))); //Determine attenuatio diffuse += diffuseDiff; gl_FragColor.rgb *= vec3(1.0) / ((vec3(1.0) + ((vec3(1.0) - vec3(u_LightColours[i]))*diffuseDiff))); //The expensive part } diffuse += 0.1; //Add ambient light gl_FragColor.rgb *= diffuse; } Am I making any rookie mistakes? Or am I just being unrealistic about what I can do? Thanks in advance
  7. Is it null when you pass it into the renderer? Or just after you call Render()?   It may be you're trying to render before the bitmap is finished loading. Try:   package { //import stuff public class Renderer { var mBitmapData:BitmapData; var mPoint:Point ; var mRect:Rectangle ; var mDisplayBD:BitmapData; public function Renderer(bitmapdata) { mBitmapData = bitmapdata; this.mDisplayBD = bitmapdata; mPoint = new Point(); mRect = new Rectangle(); mPoint.x = 0; mPoint.y = 0; } public function LoadBitmap(URL:String) { var loader:Loader = new Loader(); loader.contentLoaderInfo.addEventListener(Event.COMPLETE, OnComplete); loader.load(new URLRequest(URL)); } private function OnComplete(event:Event) { mBitmapData = event.target.content.bitmapData; } public function Render(posX,posY,clipX,clipY,width,height) { if(mBitmapData != null){ mDisplayBD.lock(); mPoint.x = posX; mPoint.y = posY; mRect.x = clipX; mRect.y = clipY; mRect.width = width; mRect.height = height; mDisplayBD.copyPixels(mBitmapData,mRect,mPoint); mDisplayBD.unlock(); } } } }
  8. I'd use a 3d-engine with orthographic projection. 
  9. I think class variables in AS3 are internal  by default.    have you tried:   public class Entity extends Sprite { protected var mPosX:Number; protected var mPosY:Number; public var renderer:Renderer; or use a getter function public class Entity extends Sprite { protected var mPosX:Number; protected var mPosY:Number; protected var mRenderer:Renderer; public function Entity():void{ ... } public function get renderer():Renderer{ return mRenderer; }         :
  10. @L.Spiro   Thank you! Great answer and a super helpful link! I really appreciate it!
  11. Hey guys, I looking for some advice/insights into render batching. I've been building my own game engine for Android (OpenGL ES 2.0) and at the moment, I feel like I am handling my game object rendering very inefficiently.   Currently, I have GameObjects that have are stored in a list in a GameWorld. GameObjects have a reference to a texture and a mesh. At the moment, all I do is loop through the GameObjects in my renderer, binding textures and unbinding them object by object. My understanding is that binding is quite an expensive process. So, I guess my question is... does anyone have an elegant way to handle this?   Some of the ideas I had were:   - Sort the GameObjects list on the texture id (possibly also expensive to do) so that objects with the same texture render together - Instead of an array with everything in it,  GameObjects of the same type are kept in their own arrays, and each one of those is looped through with only one 'bind' call required per group.   I hope I was clear enough to create some idea of where I'm at and what I'm trying to do, I can't wait to hear your feedback.
  12. For a browser based game, I'd suggest coding with Javascript/HTML5. There is a very strong course on Udacty (which is also free), that can teach you most of the stuff you'll need to know code-wise.
  13. @frob   Thanks for the advice. I'm very quickly learning that debugging rendering code is very different to other kinds of debugging. I'm working on this for a hobby project, so I'm enjoying the challenge and the smug sense of self-satisfaction that comes with owning your own engine.   I found the bug and believe it or not, it was my own carelessness. Turns out I was passing the wrong number of indices into my "GLES20.glDrawArrays" call.
  14. I'm trying to render a basic plane and I'm having a pretty bad time. I render the square ant it draws, but it also seems to draw a giant half-cube on top of it.       Is there any obvious mistake I'm making that might be responsible for this?