• Welcome to Randomland - The Forum. Please login or sign up.
 
Apr 19, 2024, 09:42 AM

News:

Get Out, See Green!


Flash/C++ Game Project

Started by Brad, Dec 18, 2009, 04:22 PM

Previous topic - Next topic

Brad

I've decided that I need to work on something fun again, so I'm going to make a game. I really want to use C++, but I really like the ease of using Actionscript for graphics. So I'm going to use both!

How you ask? (You didn't ask? Nobody is reading this?  :'( )

Well, it's going to be a network/online game. The graphics layer and control layer will all be handled entirely in Actionscript while all of the actual game code will be handled by the C++ server.

To make things simple-ish for me, I've decided it's going to be a walk-around RPG game with turn-based combat (think Final Fantasy). This basically means you (and 2-3 friends) can wander around in the game world each of you with different characters all controlled separately. You can chat back and forth with each other as well as meet and talk to NPCs. When combat happens it switches to a different "combat" view (again, think Final Fantasy style).  I'm thinking that if one player is attacked it alerts the other players (probably via a red text message in the chat window). Other players can then walk to that characters position (I'd probably display some sort of indication that they were being attacked) when they approach they are given the option to join in the fight.

I plan to design the C++ part so that you can play through battles in text-mode without Flash at all. The C++ server will be able to run and have all of it's functions tested completely alone. This will be for debugging purposes only of course. I really wanted to make a real-time game but the complexities it causes me for network code is too much to deal with. The turn-based battles will save me a ton of graphics drawing too. I'll only need one sprite per enemy instead of around 20 each. I'll still need about 16 sprites per playable character though.

I've don't have a story or any other details like that figured out yet. I've got a few ideas bouncing around in my head but nothing definite.

This will be entirely open source. I don't expect anybody to help me but you are free to jump in wherever If you'd like.

Nick

Cool. Are the players going to be limited in how far they can get from each other on the map? Then it would be a party of people exploring the world. And battles would be with groups instead of an isolated individual. Or just make it unsurvivable alone if there are more then one person playing. I don't know. But I like the idea of multilayer FF.

Brad

I wasn't planning on restricting distance from each other. If players want to work together, they can. Why force them to? If they are close enough together they all get in the same battles. If they are far enough away they can run to go join their commrade in battle if they get there before the battle is over.

I'd like it if the game was possible to play by yourself, but also not be really easy with multiple people. I'm not sure how I'm going to work that.

Nick

Increase the difficulty/number of the monsters that you face in battle when there are more people playing.

Brad

That would force them to work together to survive. You'd also have to give more reward too, so people have a reason to play together (other than the fact that it is fun).

Nick

You could do it the rpg way and have characters with the ability to add protection to other players or have a "field" around that that will give everyone +10 strength or -10% damage when in effect.  Also, better things could "drop" (if you are going to have it work that way) or enemies would be worth more points (because they are harder to kill) so you get a point bonus by working together because you kill bigger critters.

Brad

Dec 28, 2009, 10:10 PM #6 Last Edit: Dec 28, 2009, 10:17 PM by Brad
So I've got the UML class diagram for the game engine mostly finished. I think I've got all the properties figured out, but I'm missing a lot of the class member functions.

Most of the game engine decisions have been figured out. Here is a brief of list of various stuff.

  • Games can have at most 6 players simultaneously
  • A player can only control one charatcer (no parties as in Final Fantasy style games)
  • I'm thinking of using Morrowind/Oblivion style skill increases as opposed to straight XP -> level gain
  • Quests are non-linear. A character can be participating in multiple quests at the same time.
  • Quests can be shared with other players (only if at the first stage of the quest)
  • Enemies are controlled in battle by a fuzzy state machine.

There are a ton more things I've got planned out but I got tired of writing this list. So you'll have to look at the UML diagram if you want to know more.

Any help, feedback, criticism or suggestions would be greatly appreciated.

Brad

I've updated my class diagram to reflect some changes that I've made.

Maps, which are made up of cells (basically 1 viewable screen) now organize their cells using a 4-way linked list. Each cell has a pointer to it's North, South, East and West adjacent neighbor. The map only needs to keep a pointer to the starting cell. If I decide to to do multiple entrances then a map would need an array of possible starting cells.

I've also added character classes to go along with races, so now you can be a Druish Fishmonger or whatever.

Also the inventory system is similar to the oblivion/morrowind system. Defeating enemies only gives you whatever the enemy had in his inventory. So no getting "Giant Impaling Trident of Ultimate Doom" off of a lowly rodent or crab or whatever. To get a good weapon off an enemy you may have it used against you by that enemy first.

You will get rewards for completing quests though, and you'll be able to buy/sell items at shops.

I'm not expecting anybody to actual look at this, let alone thoroughly enough to actual critique it for me. But if anything I've said doesn't make sense, or if there is anything else you think I might not have thought of or planned out let me know. Thanks!

zourtney

Woah!! Typed arrays! I almost forgot those existed!

...Gosh, I need to get back into some C++...

zourtney

Where's our webbernet updates on your project?

Hello? [echo echo echo echo...]

Brad

Jan 07, 2010, 06:42 PM #10 Last Edit: Jan 08, 2010, 11:37 PM by Brad
The game is coming along well. I just finished getting XML loading for races and classes working. Next step is to make it so you can actually create a character. I should finish that tonight or tomorrow.

I'm uploading my UML diagram file as the gif files are getting too big to upload to the forum. The file can be opened or edited using UMLet.

As soon as I get an SVN server, you'll be able to download the game and try it out. I'll include project files for Visual C++ 2008 so anybody can build it.

EDIT: Forgot to attach UML diagram file.

Nick

Oh yeah! I was going to set one of those up for you! Sorry. And do we need to up the upload limit on the forums?

Brad

Created a repository for the game at http://www.randomland.net/repos/rpggame/.

I haven't enabled anonymous read-only access yet so nobody can actually downloaded it besides me and Nick. I'll try to get that working this weekend.

Brad

Anonymous read access has been enabled.

You can download the latest source code from: http://www.randomland.net/repos/rpggame/

It can be compiled using Visual C++ 2008 Express, available for free from here.

Brad

Here's a screenshot so you can all bask in the glorious graphics!

In this screenshot a lone hero name "Alfred" makes his way through an cavernous dungeon. A huge doorway leading into blackness looms up ahead of him. He can see a small pond on his right, near the west side of the dungeon. He cautiously heads for the doorway, knowing that he could be attacked at any time.