Jump to content
  • Advertisement


  • Content Count

  • Joined

  • Last visited

Community Reputation

589 Good

About luveti

  • Rank

Personal Information

  • Interests
  1. luveti

    OpenGL, oh my god

    Here's a couple more good resources for modern opengl (which I found in my bookmarks from a while back!) https://open.gl/, and http://www.opengl-tutorial.org/. This video is quite funny and shares your frustration  :)
  2. luveti

    Indian spam

    I've been getting a lot of spam lately too. It typically shows up in the form of a dozen or so emails!  :blink: Could you guys extend the sites backend to look for common phases of text that look like spam? A common thing I'm seeing in these post are repeated words, for example in this post, http://www.gamedev.net/topic/680862-%D9%83%D9%8A%D9%81-%D9%86%D8%AD%D8%B5%D9%84-%D8%B9%D9%84%D9%89-%D8%B5%D9%8A%D8%A7%D9%86%D8%A9-%D9%83%D9%84%D9%81%D9%8A%D9%86%D9%8A%D8%AA%D9%88%D8%B1-0235700994-%D8%A7%D8%AC%D9%87%D8%B2%D8%A9-%D9%83%D9%84%D9%81%D9%8A%D9%86%D9%8A%D8%AA%D9%88%D8%B1-0111/#entry5302932, the word / name "kelvinator" is repeated several dozen times. A few lines of php could easily scan the post and determine that this is spam :)   If you guys are looking for some help backend wise, I would be more than welcome to help! My day job involves a lot of PHP!  :D
  3. It always seems to be the littlest of bugs when it comes to programming! Happy to hear you've fixed it though!  :D   One thing that may help prevent issues like this is to follow a strict syntax, and to use CamelCase when naming variables / classes / etc. I typically only capitalize the first letter of ClassName's, lowercase variableName's, and completely capitalize CONST_NAMES (or #defines).   With that said, here's a small benefit to following CamelCase. You could call your texture class "Texture" instead of "zTexture" and then when creating an instance of it you would just call "Texture texture = new Texture(). Then if the Texture class has any static functions you could use this syntax "Texture::myStaticFunction()". People reading your code may see a variable named "Texture" and think it refers to the class itself opposed to the variable name you've associated with that instance.   Hope you find that useful! Best of luck! :)
  4. It's been a year or two since I've wrote pure OpenGL like this, so please forgive me if I'm wrong. But depending on what OpenGL profile you're using, you may need to call glEnable(GL_TEXTURE_2D) after binding your texture (or maybe before? or after you set the current texture unit). Also I would make sure your textures are in powers of two. Some GPU's don't like textures that are not in powers of two.
  5. Heres a simple javascript example of an object pool in case you still need help: function Bullet(alive) { this.alive = alive; // ... all your other stuff here } // maxSize is optional and is only there to // protect you from allocating to many objects function Pool (maxSize) { this.objects = []; this.maxSize = maxSize; } Pool.prototype.get = function() { // first check for any objects that aren't being used for(var i = 0; i < this.objects.length; i++) { if(this.objects[i].alive === false) { objects[i].alive = true; return objects[i]; } } // only create a new object if the pool allows for it if(this.objects.length < this.maxSize) { this.objects.push(new Bullet(true)); return this.objects[this.objects.length - 1]; } // this means there are no more bullets available, either set // maxSize to a higher value or stop requesting so many bullets! return null; }
  6. Try doing the collison check right after each movement.
  7. luveti

    Game Engine for Linux

    Defiantly check out Urho3d http://urho3d.github.io its a great, opensource, cross-platform engine! Ive used it quite a bit (though I haven't finished anything in it). Development is defiantly active (last commit was 20 hours ago). It's worth checking out :)
  8. In this case you could remove a lot of that code. Here's my refactor of it: if(state == ActionState.RUNNING) { if(direction == Direction.LEFT) { runLeftAnim.update(); } else if(direction == Direction.RIGHT) { runRightAnim.update(); } if(leftReleased || rightReleased) { state = ActionState.IDLE; } } As you can see I combined the two top level "if(state == ActionState.Running)" statements into one. Then did "direction" specific logic inside of that. Since the "if(leftReleased )" and "if(rightReleased)" both share the same code you can just combine them into one if statement by using an "or" operator. EDIT: Sorry about editing this 5 times :)
  9. luveti

    Advice for first mobile game engine

    Gamemaker has a pretty cool drag and drop interface if you're looking to make a game without needing to get into to much coding. I'm not so sure how well it supports 3D stuff (3D was quite limited back when I used it a few years ago). They have a couple paid versions too. Just in case you want to put some cash down ;) haha
  10. That Anthony guy has a lot of cool stuff on his site! Thanks for sharing that :). But this would be a really nice addition to the scripting engine itself!
  11. luveti

    Create class by value of string

    Sorry I was talking about doing this from within a script, not from within C/C++
  12. Basically what I'm trying to do is create an object by the value of a string (the string will refer to the Class that the object needs to be). This is to be used in an Item/Inventory system for the game I'm working on. What will happen is I'll save items to a folder based on their object type. Then later when I load those, I need to be able to recreate that object according to the class it used. Is this possible in AngelScript?
  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!