Advertisement Jump to content
  • Advertisement


  • Content Count

  • Joined

  • Last visited

Community Reputation

325 Neutral

About BLM768

  • Rank
  1. I don't necessarily have any specific ideas, but I can think of some questions to ask yourself: How much do the worlds interact with each other? Are some of them friendly or hostile toward other worlds? Why does the cat want these gems? Do they enable access to more worlds? Are they used for some kind of weapon to fight the aliens? Does having more gems give the player access to more power-ups? Do the aliens know about Doc, the cat, or the gems? Do they have some of the gems? (This would provide a logical reason for boss fights.)
  2. That could be interesting. It seems likely that other towns would be resistant to allowing the refugees in. After all, they're paying the fee to the "sky knights," and the refugees would just be "freeloading." Because of that, the refugees would likely end up sitting outside one of the towns, which means that they're partially under the knight's protective "umbrella" but still need the mentor's help to fend off attackers.   As far as contact with the "sky knights" goes, one of the ideas I had was that the PC would encounter an off-duty knight during the PC's first night in a protected town and would be challenged to a battle. Upon victory, the PC would probably get his/her first creature capture device. The knight may be impressed with the PC's potential and state that he/she could join the knights after becoming stronger. This would potentially open an avenue later for the PC to infiltrate the knights.
  3. The goal shows up a bit later. Although the PC is no longer "part" of the minority, he/she still represents that minority's interests. To summarize: the PC eventually finds a way to expose the corruption of the "sky knights," who are actually encouraging the spread of the dark forest. He/she takes them down, but in the process, an ancient evil is awoken. Nastiness ensues, but the PC eventually fixes it.
  4. For the past couple of years, I've been playing with the idea of making a game. The concept has some significant similarities to other "creature-training" games like Pokémon, but it also has a good number of unique traits. Anyway, I thought I'd start looking for input to help me flesh out the story and mechanics. I'll focus on the story in this post:   Backstory: [spoiler]In the game's world, humans have somehow managed to obtain a form of magic which enables them to capture and control powerful creatures by using devices known as "soul stones." This ability has influenced the development of society, technology, etc. For poorly-understood reasons, there is a relatively small portion of the population which is unable to use soul stones. These individuals are largely ostracized from society and have migrated to a rural area to the north of the world.   Many of these settlements are located near a forested area with a swampy "core." The swamp has always contained dangerous creatures, but in recent years, particularly dangerous shadowy creatures have been appearing in unprecedented numbers. For the towns closest to the "dark" areas of the forest, the threat is significant enough that they cannot survive without protection, especially because the society in general has never developed effective weapons due to the effectiveness of creatures as defensive units.   The only hope for the survival of these towns is a group which (for lack of a better name) I'm currently calling the "sky knights." They look kind of like the stereotypical "light-aligned flying knight" guys (who live on a floating island, no less!), but they're arrogant and authoritarian. Several towns have entered into an agreement wherein the "sky knights" will protect them...for a hefty fee. Some towns have resisted the idea of hiring the "sky knights", but so far, as the dark forest has spread, each town has eventually given in.[/spoiler]   The player's character (PC): [spoiler]The PC lives in one of the "non-magic-user" villages. For years, the village was a safe distance from the "dark forest," but the forest has spread and is threatening the town. The village elders are adamant in their refusal to work with the "sky knights," but the situation is almost completely out of hand. The PC decides that something must be done, and he/she travels out of town to an abandoned temple which was once used to train magic-users. He/she searches the temple for anything that might be of use. Partway through the search, the PC encounters an older man (who is a magic user). He is initially wary and somewhat hostile, but once he hears the PC's story, he becomes friendly and explains his purpose.   The old man (whom I call the "mentor" for now) explains that he has been searching for a way to make magic accessible to everyone. After a short test, he determines that the PC may be a candidate for the method he has been developing, and the PC agrees to try it. The procedure is successful, and the player obtains a soul stone containing an ancient creature from a cache deep within the temple.   Both characters return to the town. The mentor determines that no one else in the town is a candidate for his procedure, but he decides to remain there to protect it and tells the PC to travel south and become stronger.[/spoiler]   Anyway, that's it for this post. I've got a rough world map, a number of random plot fragments, and an ending, but I'll leave those for a bit later so this post doesn't become gigantic.   Thoughts? Constructive criticism? Not-so-constructive criticism?
  5.   Aside from a lookup table, using a switch statement is probably the most efficient option. The compiler might actually rewrite the switch statement to use a lookup table, but it's not required to. However, using a lookup table would require a lot of boilerplate unless the switch statement is just mapping key codes to character values, which doesn't seem to be the case, so I'd go with the switch statement unless this code became a major bottleneck (which is quite unlikely).   Edit:   Looks like Álvaro got to it before me.
  6. BLM768

    Advice for 2D game structure

    I'm not sure whether you're using OpenGL or DirectX, but in either case, you might be able to take advantage of instancing.   Here's a good article on OpenGL instancing:
  7. BLM768

    OOP Design

    Component-based and object-oriented approaches are not mutually exclusive. A good component-based design is likely to implement object-oriented (or at least object-based) principles, and vice versa.   Looking at this game from the component-based perspective, there are two main components: the game world and the screen. The game world has the job of simulation, while the screen (or at least the IngameScreen) has the job of drawing a game world. Since the IngameScreen is responsible for drawing a specific world, make the world a member of the IngameScreen. That way, the IngameScreen has access to everything in the world, and the screen doesn't need its own list of game objects, which would just be duplicating data and wasting memory.   If the idea of making the game world a member of the IngameScreen doesn't feel quite right conceptually, you could also pass the world as an argument to IngameScreen's drawing method.
  8. BLM768

    Revew my pong clone: game and code!

    This code's not bad for a first project; it's organized reasonably well and is pretty easy to read. As far as structure goes, you'd need only a few tweaks to make it more solid:   The functions that manipulate the ball and paddles could be moved into the classes as methods, like so:   class Paddle { public: int x, y; int width, height; BITMAP *paddleSprite; void moveUp() { y-=5; if(y < 0) { y = 0; } } void moveDown() { /* ... */ } void draw() { /* ... */ } }; Then instead of calling moveup(paddle1), you would call paddle1.moveUp().   You could also take advantage of the similarities between the paddles and the ball. They are both game entities with coordinates, width, height, and an image, so you can pull those similarities into a base class:   class Entity { int x, y; int width, height; BITMAP* sprite; void draw() { blit(sprite, buffer, 0, 0, x, y, width, height); } } //Has all the fields from Entity plus whatever we add here: class Paddle: Entity { //moveUp(), moveDown, etc. } class Star: Entity { void rotate() { /* ... */ } //etc., etc. } I can think of a few more things you might want to tweak, but I'll leave you with that for now because it's getting late, and this post will probably take a little while to "digest" if you're not already familiar with methods and inheritance.
  9. The main example I've found is with I/O; to send an object on a socket, I had to get the socket's output stream object, then create a ByteArrayOutputStream, wrap that in a DataOutputStream, serialize the object to the DataOutputStream, convert the ByteArrayOutputStream to a byte array, and dump the byte array into the socket's output stream. Apparently, this is "proper, idiomatic" Java code. It has a lot of nice conceptual separation, but the separation is too fine-grained and leads to allocation of piles and piles of wrapper objects in some cases.   Admittedly, I'm no Java expert, though; someone with more experience might have found a more concise way of doing it.
  10.   Java may not have quite the raw speed of solid C++ code, but if it's good enough for Minecraft, it should be able to handle just about any 2D game. Implementations of the runtime environment do have bugs, but you are pretty unlikely to run into one of them with this kind of code unless you're trying to run Java on a very obscure platform that hasn't had Java updates in years.   The problem I have with Java is that it tends to be quite verbose, but every language has its tradeoffs. In all, it probably wouldn't be a bad choice.
  11. The problem is that when you draw the contents of the VAO, the currently active shader will be used for everything that the VAO contains. In general, when I'm drawing a mesh, I use one VBO for each of the vertex attributes (position, normal, etc.), but I split the face index data into several VBOs, with one VBO per material. I iterate over the face-index VBOs, setting the correct material/shader for each before drawing it.
  12. BLM768

    Jumping - What did I do wrong?

    Here's a hint: when the player presses a button, inAir is set to true, but what are the values of rising and falling?
  13. BLM768

    Gun Control In Australia vs the USA

      Not having guns beforehand would make things much harder. How are you going to raid a police station when you don't have guns?   I think that this is at least partially a regional issue. In a place like Wyoming, the danger from guns is considerably lower than in more urbanized regions. They should have different restrictions.   Guns are definitely a part of American culture, probably because of our frontier roots. It's not just about self-defense; hunting and shooting sports are probably where most gun use occurs.   One thing that might make stricter gun control more palatable to Americans would be to provide better options for "non-lethal" self-defense weapons, but it wouldn't convince everyone. Personally, I'd like to have a gun for self-defense, but I'd be extremely reluctant to actually use it unless I really have no other option, which is unlikely. One of the places where a gun could be most useful is at home; if an armed assailant breaks into a home, there will most likely be more than just one person's life at stake, which makes the ability to put up an effective defense far more critical, and if the gun never leaves the home, it's pretty tough to commit a crime with it.   Maybe a partial solution would be to impose much harsher penalties on criminal uses of guns. That should at least discourage the less committed criminals, which frees up resources to tackle the hard-core bad guys, who would probably have guns no matter what the law says.
  14. BLM768

    ellipsoid collisions

      I started on a capsule-based implementation for object-object collision, but after some work on it, I decided that using Bullet is a more efficient use of my time and would open up more possibilities. Besides, I'm a bit lazy.
  15. BLM768

    ellipsoid collisions

    I've tried it (and adjusted it a bit), but I've never really stress-tested it. I've set my implementation aside for now because detecting collisions between the ellipsoids themselves is extremely hairy. I'll probably just end up using Bullet; it's considerably more powerful and mature than anything I could do myself.
  • Advertisement

Important Information

By using, you agree to our community Guidelines, Terms of Use, and Privacy Policy. 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!