The Marionette Cards -- WIP multiplayer/singleplayer card game

THE MARIONETTE CARDS

Hey, good people! This game was originally meant to be a small project of mine, but I realised that the idea was pretty cool. Basically the game is a unique yet limited simulation of real life in which you can’t see yourself moving around or anything of the sort; instead, it’s a lot like a nation simulation game, but you don’t start off as a ruler. You always begin as a citizen who’s just a nobody in the virtual world, but you can get jobs (and yes, you can become a president or a minister and rule the country, but not immediately, just like in real life). The twist is that the gameplay revolves around the use of cards. Believe it or not, the game, as of now, looks nothing like anything I just told you. In fact, it looks totally different. It’s a little hard to explain, but I’m sure you get the gist of it. There will be a map and shops, buildings, job centres, houses and other things will be marked on the map as cards.
To collect a house card, you have to pay money and get the house. To collect a shop card, you have to apply for a job at that shop. Or you can simply visit a shop, buy food, store the food in your inventory and sooner or later you’ll have to eat it, because if you go hungry for too long, you’ll die. If you’re playing with another friend on a server, you can visit your friends house by finding his house card on the map. You have almost full control in the game (hence the “marionette” in the name of the game). There’s more to the game, of course, but that’s the main idea.

Right now, there are no cards or any maps. All you can do is set your username and type in commands to do things, like, “enter uncle sam’s snack store”, or “buy 2 fried carrot sticks” or “sell 1 5” and stuff like that. Once I’m done with all of the commands, I’ll have to do the Great Conversion (or at least, that’s what I call it), which involves converting the whole game into a card game. Trust me, it can be tedious, but it’ll be easier than starting with the cards themselves.

Oh yeah, the GUI looks pretty…um…ugly, right now. That’s because I’m still using Swing, without a Look & Feel (or if you prefer, a theme). I’ll eventually have to create my own theme. I’m also working on usernames right now, because even though the usernames and multiplayer connections are working (more or less), there’s a problem with the detection of username conflicts. It’s really annoying, but not as annoying as that time when I couldn’t detect multiplayer inputs because I wasn’t calling the BufferedReader ready() method (trust me, I spent three days figuring out that problem before I realised that I only had to check if the reader was ready to read). Eventually I’ll have to design the cards and the map (that’ll be really fun), so look forward to that! Anyway, that’s all right now, because I started on the game just a couple of weeks ago, so it hasn’t amounted to much yet. Still, it’s something. Let me know what you think of the idea, because I’ll be going with it anyway. I won’t be taking suggestions right now, but it’d be cool to have some support from the community, at the very least. Here are a couple of ugly screenshots (plain Swing is plain) upon which you can feast your eyes!

[i]
UPDATE (#1):

I have improved interaction between servers and clients. I’ve started work on a logo for the game, too.

UPDATE(#2):

Fixed a NullPointerException and organised the code in preparation for the implementation of the “Unique Jobs” feature. Begun work on adding content (food items, shops, furniture, etc.).

UPDATE(#3):

I added the text area to a JScrollPane. Should have done that ages ago, but ah well. It’s a little more convenient for me to test the stuff now.

UPDATE(#4):

I created a Player class so that multiplayer would be easier for me to work with. I haven’t tested it yet, but it’s actually a huge improvement. I used to have a HashMap and a List to handle multiplayer, but now I only need a single List. It was exciting to create the Player class, because I’d never used Generics in Java to create my own classes before I made the Player class.

UPDATE(#5)

I have to do a complete re-write of the code which concerns jobs, because I made huge changes to the shops. After I’m done with the jobs (I’ll probably finish it by today) I’ll begin work on the graphics (cards, maps, etc.) :smiley:

UPDATE(#6)

Haha, yeah! I fixed the jobs. Right now all that happens is that you can join a job at a shop which actually offers that job and you get a certain sum of money every 150 seconds. It’s time to prepare for the Great Conversion, which means I have to get started on the graphics right away!

UPDATE(#7)

Yesterday was a productive day, but today certainly wasn’t. I spent most of my time goofing around with the current version of the game, but I’ve started to learn JavaFX, so that’s something. Tomorrow will probably also be devoted to learning JavaFX, but I might also plan the layout of the entire GUI.

UPDATE(#8)

I’m learning JavaFX…slowly. It’ll take a while, because I devote my free time to other activities too, not only to programming.

UPDATE(#9)

I’ve begun work for real on giving the game a GUI overhaul. It’s been great, and today was a real productive day! I’ve attached another screenshot down below, so you can go check that out. Also, I added like 5 classes :wink:

UPDATE (#10)

I’ve got the map generation algorithm working (the logic side, at least). I still need to fix the positioning of the pathfinding nodes and paths and stuff.

UPDATE (#11)

The algorithm is working, yes, but it does lag after a while. I still have some memory management to do, I guess. And System.gc() just makes things worse, so nope, I’m not going to use System.gc().

UPDATE (#12)

The gaming was shaping up, but now everything has gone wrong. It’s not a bug I discovered, but a huge flaw in the concept. With multiple levels of interaction between the cards and the layout panes, there isn’t a way to properly modify the card after the card has been submitted to the main pane. I have to do something about it :-\ :o

UPDATE (#13)

I managed to squash that terrible bug, and I fixed up the buying/selling of items. It’s going great!

UPDATE (#14)

I fixed buying/selling again; there were a couple of bugs. Also, I added an “eat” feature, so you can now actually eat food items stored in your inventory :smiley: Oh, and yes, I uploaded another couple of screenshots for you to feast your eyes upon. Check them out down below!

UPDATE (#15)

Jobs are up and working. It’s all going really great. Expect a tech demo to be released soon :smiley: Now I only have multiplayer and housing to worry about.
[/i]

I am working on a social simulator with some parallels to yours (mine is better because it has Vikings :slight_smile: ):

[quote]I am working on a social simulator with some parallels to yours (mine is better because it has Vikings Smiley ):


[/quote]
There’s no denying that your game is pretty interesting, but I’m certain that your gameplay is completely different, because my game uses cards. Anyway, thanks for sharing :smiley:

Just added about 10 flavours of potato chips to Uncle Sam’s Snack Store in the game. The game is now about 20 times better. Ya’ll know why? Because POTATO CHIPS.

Update: Housing will come after the Great Conversion (for more details on the Great Conversion, read the main post).

Idea sounds interesting, even cause (precisely because) i can’t realy imagine what the game looks like.
I guess working with commands for now isn’t a bad idea. You can code and test the logic and just switch out the view later down the rode.
I suggest you to use libgdx for the game later down the road, i guess scene2D could be perfect for your needs.
It also has the advantage to be cross platofrm. So your code runs on Desktop, Android, HTML5 and even iOS with only a few additional lines of code.
You don’t even need to take care about the difference between touch inputs and mouse-clicks, they are the same for libgdx :slight_smile:

I get where you’re coming from (I’ve used LibGDX before, back when I was still learning Java) but you’re right, because LibGDX is probably the best choice for 2D graphics in Java. Originally I was planning to make a 3D version of the game but that would be crazy, even if I use jMonkeyEngine (I’m OK at using jMonkeyEngine for simple stuff, and I gotta say, it’s pretty sweet). After I’m done with the game itself, I’ll probably work on a modding API for the game to make it easier for modders out there who’re interested. Thanks for the comment, it’s nice to see somebody else who’s actually interested :smiley:

I don’t know how experienced you are, but i wouldn’t rush into 3D. Also i think that kind of game should be 2D or 2.5D (isometric), but i can’t really imagine it in “real” 3D.
You may know the RTS series “Stronghold” from Firefly Studios. In Stronghold 3 (i guess) they started using 3D instead of 2.5D and the game wasn’t really playable. In Stronghold Crusaer 2 they went back to the good old isometric view and everything works fine :slight_smile:

Precisely why this game won’t be in 3D. I eventually discarded the idea of making the game 3D, not because I’m not experienced, but because it would be a lot of hassle. I’m OK with 3D, because I started by learning OpenGL. I don’t remember much about actually using LWJGL, because the methods and classes are a little confusing, but I remember the concept, the logic and roughly how the GPU is utilised by the API.

Thanks a bunch for the advice, though, it’ll come in useful if I get any ideas later on :smiley:

I’m now working on jobs and I added a class called “Player” to make modding a lot easier. The jobs are going to be pretty hard, because each of them have to be unique. I originally wanted jobs to be something simple which just pays you money at a fixed rate, but nah. It should be a lot better and interesting than that. For the first release, I think 5-8 jobs will be enough.

After I’m done with the jobs, I’ll have to work on writing to and reading from .dat files to save and load important data. A little like what Minecraft does, but a lot simpler. Once I’m done with that I’ll have to begin work on the map of the city and the cards. Stay tuned!

I am really wondering how the game could look like and what concrete role the cards will play. You said, that the shops etc. are cards on the map. Will it look similar to monopoly then?
Also how will the jobs be realized, if it is not just gaining money with time? Will there be minigames (maybe card-based?) for the jobs?

Would be cool if you can explain it all a bit more detailed, i can’t really imagine the game by just reading the startpost (it might be only me…).

I’m curious too. Do you collect cards in a deck and play them against an AI?

Trust me, it’s pretty hard to explain without showing you, but I can’t do that yet. Just imagine this: almost everything will the represented by cards (inventory, location, shops, items, etc.). Each card will have different properties. For example, the player location card will have 3 properties: the x, y and z co-ordinates. But the player location card can’t be modified by directly changing the values on the card. Your location will change only when you enter a different place. A shop card will have a “name” property and an “available jobs” property (manager, clerk, etc.). You can click on a card and view its properties. If the card is a shop card, you can click on it and press the “enter” button to enter the shop and view the shelves inside the shop. An inventory card is a storage-type card, like the “shelf” cards in shops. Storage-type cards are cards which “contain” other cards, mostly item cards. Then there will be a player card, with a “username” property and “job” property and et cetera. It might still be a little hard to visualise everything, but that’s roughly how things are going to be.

If you’re playing multiplayer, you can view your opponents’ decks, but you can’t modify their cards’ properties, obviously. Only they have the ability to do that. If you have a house, there will be a house card shown both in your personal deck (which contains your job card, your user card, your inventory card, etc.) and on the map. Just like shops, you can enter houses and houses can behave a little like storage-type cards, because you can add furniture item cards to your house. That’s what I meant when I said that the whole gameplay revolves around the use of cards.
To answer ags1’s question, no, there will be no AI of any sort. Not much. There might be a couple of NPCs and you might see other people walking up and down streets on the map, but that’s it, pretty much. There will be a day-night cycle on the map and the map will be the satellite-view kind.

Well that sounds, like the cards are just the visual representation of the things, it does not really sound like a card game (IMHO). Anyway i am stil wondering what the game looks like in the end, it is really hard to imagine it :smiley:

Yeah, you’re kind of right, in a way. You’ll eventually see how it’ll look after I’m done with the Great Conversion.

In other news, I’m still trying to make things a lot easier to work with. I created a “Shop” class, which allowed me to remove a couple of HashMaps and Lists.

Alright, if you’ve been keeping a tab on this thread, you’d know by now that it’s time for the Great Conversion - I’m going to be changing the current text-based game into the card game we’ve all been discussing in the earlier posts. So right now I’m going to be using JavaFX to do all the stuff because I don’t require the power that LibGDX offers. Nothing against LibGDX, but I really don’t need that much power right now. JavaFX is more than enough for me.

Oracle sort of “gave up” on releasing SceneBuilder for JavaFX so I decided to use Gluon’s SceneBuilder. I’m not great shakes at JavaFX, so I’ll have to learn how to use it to my advantage. Stay tuned for more updates!

What exactly do you mean by “not require the power LibGDX offers”? I don’t know JavaFX verry well, but it seems to offer lots of usefull stuff so i don’t think it is wrong to stick with it. But i suggest to think about it twice, because it won’t be that easy to switch Framework, once you started working on with it.

I know where you’re coming from, but trust me, I know what I’m doing XD

I don’t want to “convert” you :smiley: Just wondering what you mean.
As i said JavaFX seems to be pretty good, it’s definitly worth learning, i am just wondering what you think javaFX makes better then LibGDX.

@Springrbua well, for starters, I’m not saying JavaFX is better than LibGDX. I’m saying JavaFX is better suited to my needs. That’s because LibGDX offers power beyond almost anything JavaFX can offer, but that power isn’t necessarily what I need. JavaFX is far easier for GUI developers to master and LibGDX’s Scene2D is directed mainly at people who require more complex GUI. This game won’t have a GUI that complex and…you know, complicated, like Skyrim’s or Minecraft’s GUI. So I chose JavaFX because while it isn’t as powerful as Scene2D, it still has the capacity to fulfill my needs and is far easier to learn and master.

I am not sure, if Scene2D is really more powerfull and complex then JavaFX, i’ ve heard, that JavaFX is pretty powerfull. But you can tell me, when you worked a little morewith it, good luck! :slight_smile: