Jump to content
  • Advertisement

irbaboon

Member
  • Content Count

    131
  • Joined

  • Last visited

Community Reputation

1631 Excellent

About irbaboon

  • Rank
    Member

Personal Information

  • Role
    Programmer
  • Interests
    Programming
  1. irbaboon

    OpenGL, oh my god

    You can get a simple base going on with some basic setup code. Download GLEW and get that working if you haven't already. I will post some code without error checking, and hopefully this step by step will help you understand better.   This is not a full example, and there might even be a typo in here, but if you start from the main function and read what's happening line by line, you will come to an understanding of how it all comes together.   Keep in mind the shader must have input attributes 0: vec4 position, 1: vec4 color and 2: vec2 uv.   This is intended to be a reference if you're stuck, not a complete example.        If you need help figuring out projection and view matrices, feel free to ask.
  2. irbaboon

    Multiple bullets?

    Yes, you would be correct if the OP was using C++. But the tags on his topic states “Java,” so he should use java.util.ArrayList instead.   Oh my, I didn't catch that.
  3. irbaboon

    Multiple bullets?

      heh.   Anyway, look into "std::vector".     You could just make a variable like this: std::vector<Bullet> myBullets; then use it like this: myBullets.push_back(Bullet(x, y)); // or however your constructor goes, if any. You can probably do myBullets.push_back({ x, y }); as well If you have update and draw functions in your bullet class, then you can do this to call those: for (auto& i : myBullets) { // Loop through all the elements in "myBullet" and let "i" be a reference to the current element.     i.update();  // or i.draw(); } Hope that helps in any way.
  4.   The question is kind of vague to get a good answer. Sure, you can use templates or polymorphism - but is that really what you need?   If you have a specific scenario in mind, I'd advise you to post that and see what response you get then. Sometimes you might only need to pass a few common variables instead of the class itself.   Edit: Oops, I realised now that Lactose wrote the same thing :)
  5.   1. No   2. There is not really a format. As long as you get the code, you should be fine. If he has some fancy project setup, then it would be great if he sent you those or told you how it was set up.   3. I doubt someone would do that. Especially if you have made a game with him. Anyway, I would open the source files and see if you can find things you recognise. For example, see if you find the code for the player or the code for the main menu or enemies. Just read the code a bit like English, and you should figure out what it does. If you have no idea after that, you should perhaps either trust someone else to look over it, or learn to build the project yourself given you have the project files.   Edit: Got ninja'd. Lactose probably has a better answer than mine though.
  6. irbaboon

    2D Transforms 101

  7. irbaboon

    Programming a simply 2D game

    I think GameMaker is your best option. You barely need to know how to code. http://www.yoyogames.com/studio
  8.   When I first started with transitions and animations, I added them to everything. It eventually started to annoy me how it felt like it was slower... My solution is to not animate when you highlight something (or at least one main feature of the UI element shouldn't be animated), but when you leave the UI element, some transition or other animation may occur. This makes it feel better if you move your mouse across many buttons. It feels faster and you can see where you just highlighted.   Perhaps kind of offtopic, sorry about that.
  9.   Lol, what are you talking about? Took forever to load? If it was 20 seconds or so, a subsystem probably failed to load. Usually solved by restarting your computer. This has only happened to me once in 4 years of programming though. Game controller subsystem failed for some reason.   You probably did something wrong though. My games start in less than a second.   In my opinion, you only want to build your own window management library if you want to do fancy stuff. For regular window features, SDL is fine. 
  10. irbaboon

    How To Make An RPG

    https://www.rpglibrary.org https://www.rpglibrary.org/articles/storytelling/36plots.php http://en.wikipedia.org/wiki/Attribute_(role-playing_games)   Here are a few resources you can check out.
  11. irbaboon

    sfml health bar

      It doesn't seem like you understood marcjulian, so I'll try to rephrase it in a different manner: The function "setScale" takes floats. If you try to do this:  int health = 50 / 100; You're not going to get 0.5, because an integer can only be whole numbers. So that is: 0, 1, 2, 3, 4, 5, 6...   Also, you could make a "healthRatio" function, like this: float healthRatio() { return (float) m_playerHealth / (float) maxHealth; } healthBarSprite.setScale(healthRatio(), 1.0f); I recommend reading marcjulian's post a few more times until you get it.
  12. irbaboon

    When to release?

    HAS NOBODY CHECKED THE SEXTETS IN THIS TOPIC ID?   since this isn't 4chan, sorry for being off-topic.
  13. irbaboon

    Game programming is hard

      Sadly posts cannot be upvoted here, but here you go: +1    It's always nice when someone makes a lengthy post about an interesting subject.
  • 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!