Java-Gaming.org Hi !
Featured games (91)
games approved by the League of Dukes
Games in Showcase (798)
Games in Android Showcase (234)
games submitted by our members
Games in WIP (865)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
    Home     Help   Search   Login   Register   
Pages: [1] 2
  ignore  |  Print  
  The Marionette Cards -- WIP multiplayer/singleplayer card game  (Read 22554 times)
0 Members and 1 Guest are viewing this topic.
Offline ShadedVertex
« Posted 2015-10-06 03:20:38 »

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!


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.) Cheesy

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   Undecided Shocked

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 Cheesy 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 Cheesy Now I only have multiplayer and housing to worry about.






















Click to Play
Offline ags1

JGO Kernel


Medals: 367
Projects: 7


Make code not war!


« Reply #1 - Posted 2015-10-06 10:38:59 »

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

http://www.java-gaming.org/topics/vangard/36394/msg/345106/view.html#msg345106


Offline ShadedVertex
« Reply #2 - Posted 2015-10-06 12:03:43 »

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

http://www.java-gaming.org/topics/vangard/36394/msg/345106/view.html#msg345106

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 Cheesy
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline ShadedVertex
« Reply #3 - Posted 2015-10-07 07:58:16 »

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).
Offline Springrbua
« Reply #4 - Posted 2015-10-07 12:12:26 »

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 Smiley
Offline ShadedVertex
« Reply #5 - Posted 2015-10-07 13:03:45 »

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 Cheesy
Offline Springrbua
« Reply #6 - Posted 2015-10-07 13:21:45 »

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 Smiley
Offline ShadedVertex
« Reply #7 - Posted 2015-10-07 13:33:33 »

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 Smiley

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 Cheesy
Offline ShadedVertex
« Reply #8 - Posted 2015-10-08 14:01:16 »

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!
Offline Springrbua
« Reply #9 - Posted 2015-10-08 14:58:48 »

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...).
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline ags1

JGO Kernel


Medals: 367
Projects: 7


Make code not war!


« Reply #10 - Posted 2015-10-08 22:33:08 »

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

Offline ShadedVertex
« Reply #11 - Posted 2015-10-09 02:35:25 »

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...).

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.  
Offline Springrbua
« Reply #12 - Posted 2015-10-09 06:04:19 »

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 Cheesy
Offline ShadedVertex
« Reply #13 - Posted 2015-10-09 08:45:18 »

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.
Offline ShadedVertex
« Reply #14 - Posted 2015-10-10 02:45:09 »

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!
Offline Springrbua
« Reply #15 - Posted 2015-10-12 07:26:21 »

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.
Offline ShadedVertex
« Reply #16 - Posted 2015-10-12 10:18:41 »

I know where you're coming from, but trust me, I know what I'm doing XD
Offline Springrbua
« Reply #17 - Posted 2015-10-12 12:17:49 »

I don't want to "convert" you Cheesy 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.
Offline ShadedVertex
« Reply #18 - Posted 2015-10-13 06:04:03 »

@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.
Offline Springrbua
« Reply #19 - Posted 2015-10-13 06:10:36 »

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! Smiley
Offline ShadedVertex
« Reply #20 - Posted 2015-10-13 07:02:02 »

Thanks, @Springrbua Cheesy I'm haven't been making much progress with the game for the past couple of days because I'm trying to get the hang of JavaFX. Tip for programmers: when you're learning a new API/library, try not to jump into things and make sure you get the small things settled before moving on to bigger things. Don't just glance at a tutorial and say you can do it Tongue I used to do that, but it definitely doesn't work.
Offline Springrbua
« Reply #21 - Posted 2015-10-14 08:32:26 »

Yea i guess you should first create another project where you just mess arround with the JavaFX basics. Create a window, a dialog, buttons, try to react on button clicks ...
I can imagine, that your buildings can be simple ImageButtons, so the JavaFX-Basics might be enough for a big part of your game...
Offline ShadedVertex
« Reply #22 - Posted 2015-10-14 12:50:13 »

It would look a little unsightly and unprofessional, though  Tongue Also, I pretty much learned the basics of JavaFX. It's actually time to convert the currently-text-based game to a legitimate game with graphics. That will take quite some time and there are already 17+ classes. For the first couple of development phases, I won't bother about the aesthetical aspects of the game except for images and text and all stuff that profoundly affects the gameplay itself. After that, I'll prepare custom stylesheets and improve the appearance of the game. Can't wait Cheesy
Offline ShadedVertex
« Reply #23 - Posted 2015-10-16 13:25:15 »

Alright, I guess I'm more ready than I ever was to get started on the maps and cards algorithm (yes, there's going to be an algorithm that adds stuff to the map (paths, shops, etc.) without me having to manually re-design the map) but at the same time, I don't think I can finish all that soon because I have C++ training and stuff, so...yeah. I just thought all of you needed a quick update on the current progress. This is the first game I've ever really made (excluding a couple of other small and simple games I made while learning Java) and I can't say I've got really high hopes for The Marionette Cards. I'm obviously not thinking about selling the game, because I'm new to the whole game programming thing. At the very least, my wish is for this game to become fairly popular and I also want this game to retain its popularity unlike many other games which ended up being huge failures.
Offline ShadedVertex
« Reply #24 - Posted 2015-10-17 12:05:30 »

Yep, I got the cards working. Now it's the simple matter of making everything look nicer. I've even attached another screenshot to the main post Cheesy That screenie just shows how the cards work. The left side is the deck and the right side will be used for the map. Don't walk away with the idea that the screenie shows exactly what the game's gonna look like. The game is going to look almost completely different once I fix the cards once and for all (the cards look terrible now, and you can't do anything with them yet) and once I develop a stylesheet for the whole program.

I've created a couple of classes to make it easier for me to add cards, change their properties, align the cards to be positioned three in a row and et cetera. All that is working, so that's really good news. Don't bother about the text on the cards, it doesn't mean anything. And remember, the cards are gonna look a whole lot better once I'm through with them.
Offline Springrbua
« Reply #25 - Posted 2015-10-19 09:09:52 »

I can't see the new Screenshot, there are only 2 showing the Text-Area (one with Login-Window and one without).
Offline ShadedVertex
« Reply #26 - Posted 2015-10-20 09:33:22 »

Sorry, my bad  Tongue I'm putting it up now.

EDIT: Yep, it's up on the main post now.
Offline ShadedVertex
« Reply #27 - Posted 2015-10-21 11:52:15 »

In case no one saw my previous post on this thread, there's another screenshot of a very early version of the cards part of the game, so if you're interested you can go check that out.

I've been working on the map lately, and boy, it's hard. The map is supposed to adjust itself when a shop is added so I don't have to manually create the map, and it's definitely not as hard as procedural terrain generation in 2/3D games but since there's a little bit of pathfinding involved, it can be hard.
Offline ShadedVertex
« Reply #28 - Posted 2015-10-23 08:00:40 »

Eureka! I finished the algorithm, and it works seamlessly, except that after a while memory usage becomes a problem. Once I've sorted out the memory problem (does System.gc() help? A lot of people hate that method Tongue), I can implement the algorithm and bazinga! I can get to work for legit.

EDIT: I've put up a GIF showing how the algorithm works. It doesn't start from the beginning of the program, but it gives you a rough idea of what's going on behind the scenes. Basically, a random node (circle) is picked and the program checks if the north, south, east or west rectangle spaces are available. If any one of them is available, that one is chosen to be the position of the next path. I might not have explained it right, but that's pretty much how it works.
Offline ShadedVertex
« Reply #29 - Posted 2015-10-24 05:35:15 »

Well, then, now that I've finished and implemented the random map generation algorithm I came up with myself (sorry for the lack of modesty; it's my first time creating an algorithm of that much complexity), I'm working on the cards now. I got the card classes working a week ago or so, but I need to place them correctly on the map and the player deck. And the storage cards might be a bit of a problem, because I need to figure out how exactly I'm supposed to display the stored cards.
Pages: [1] 2
  ignore  |  Print  
 
 

 
Riven (45 views)
2019-09-04 15:33:17

hadezbladez (4025 views)
2018-11-16 13:46:03

hadezbladez (1468 views)
2018-11-16 13:41:33

hadezbladez (4048 views)
2018-11-16 13:35:35

hadezbladez (780 views)
2018-11-16 13:32:03

EgonOlsen (4098 views)
2018-06-10 19:43:48

EgonOlsen (4685 views)
2018-06-10 19:43:44

EgonOlsen (2762 views)
2018-06-10 19:43:20

DesertCoockie (3657 views)
2018-05-13 18:23:11

nelsongames (3867 views)
2018-04-24 18:15:36
Java Gaming Resources
by philfrei
2019-05-14 16:15:13

Deployment and Packaging
by philfrei
2019-05-08 15:15:36

Deployment and Packaging
by philfrei
2019-05-08 15:13:34

Deployment and Packaging
by philfrei
2019-02-17 20:25:53

Deployment and Packaging
by mudlee
2018-08-22 18:09:50

Java Gaming Resources
by gouessej
2018-08-22 08:19:41

Deployment and Packaging
by gouessej
2018-08-22 08:04:08

Deployment and Packaging
by gouessej
2018-08-22 08:03:45
java-gaming.org is not responsible for the content posted by its members, including references to external websites, and other references that may or may not have a relation with our primarily gaming and game production oriented community. inquiries and complaints can be sent via email to the info‑account of the company managing the website of java‑gaming.org
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines | Managed by Enhanced Four Valid XHTML 1.0! Valid CSS!