gfxgfxFreeBASIC Games Directory Forumgfxgfx
gfx gfx
gfx
Welcome, Guest. Please login or register. July 21, 2018, 11:05:55 PM

Login with username, password and session length
14.09.2014 - Check the results of our latest game dev competition here: http://games.freebasic.net/forum/index.php?topic=606.0
gfx
gfx
*
gfxgfx
gfxgfx gfxgfx
gfxgfx Home Help Search Login Register   gfxgfx
gfx gfx
gfx
Pages: [1] 2
Print
Author Topic: 4xc Seasons  (Read 8174 times)
Mitchell
Forum Howler
****
Gender: Male
Posts: 197


Rockin Geek


View Profile Email
« on: June 09, 2013, 04:46:45 PM »

Hello, still alive. Now that I have some free time again, I'm working on the code from the seasons competition to see where it goes. Attached should be a screen shot of the current client. So far the chat functionality, gui framework, and ability to connect to the server are more or less complete. Currently I'm working on the communication protocol between server and client; the short term goal being the basics of setting up the server lobby chat room, account creation, and basic admin control.
Logged

Never underestimate the destructive powers of somebody doing something new without having any clue of how to do it. Tongue
Jonge
Novice
***
Gender: Male
Posts: 78



View Profile WWW
« Reply #1 on: June 10, 2013, 01:27:16 PM »

Nice to see someone working on a FB game =) Though how will the game part be?
Logged

codeheim.NET - Homemade game madness!
Mitchell
Forum Howler
****
Gender: Male
Posts: 197


Rockin Geek


View Profile Email
« Reply #2 on: June 10, 2013, 03:01:40 PM »

I'm trying to make a kind of FreeCiv/Minecraft/globulation hybrid. The idea being that players control characters to build infrastructure, fight other players and natural enemies, research tech trees, improve terrain, harvest resources in a tile base world, pretty much 4x style stuff. The minecraft influence being the style of the tech tree, such as upgrading from stone to iron, better harvesting of mob materials, stuff like that. The globulation influence on me is getting the game to help remove the burden of micromanaging individuals

So the core focus of the game are managing characters. Characters have traits that allow then to be more efficient at certain jobs. Traits logarithmically increase as characters perform related tasks, at the cost of non-used traits. Characters can also have affinities for traits, meaning that certain traits they can learn faster. New characters gain affinities from parents best traits. New characters are born from older pairs of characters that have a high happiness value; happiness goes up when characters have access to luxury and vanity resources, and goes down when 'poor' (ie having to wait for resources like food and housing). Character efficiency is based on skill level, better tool access, nutrition, and bureaucracy.

Now, I don't want to just regurgitate what other games do, so I want to float something of my own. One of the mechanics I plan to implement are time limits for turns. The rule I have in mind is that once ~50% of the players have moved, the time limit is set to 150% of the time it took the last person to move. The turn moves when either the time limit is hit or when all connected players have moved. So disconnecting from the game or going AFK doesn't mean a player is out of the game. Enter the bureaucracy; certain characters (those with traits as bureaucrats) are allowed to automatically control the actions of other characters. Higher skill levels and access to better infrastructure and certain government buildings increases their efficiency, which increases how many other characters they can control.
The points of this system are that:
A) It doesn't become extremely tedious to manage a large empire
B) It allows AFK or disconnected players to still be productive to some capacity
C) With some tweaking, it allows for wholly AI-controlled sides as opposed to reimplementing a brand new AI. Not good AI, but then again Sid Meier's Civ's AI was pretty atrocious too. Tongue
D) There is an incentive to move faster. Only a fixed amount of work can be done in a time limit, so better delegating can lead to an advantage.
E) Slower players are penalized, but not by some arbitrary time limit.


The architecture is client-server, so multiplayer based. Single player is probably just going to be the client booting up a server in the background configured for one human player against AI players. Similar to how freeciv works.


But nothing is set in stone as of now.
Logged

Never underestimate the destructive powers of somebody doing something new without having any clue of how to do it. Tongue
Lachie Dazdarian
Double dipper
Administrator
Forum Sage
*****
Gender: Male
Posts: 1255


lachie13
View Profile WWW Email
« Reply #3 on: June 10, 2013, 11:27:10 PM »

I was wondering what happened with your planned competition entry. Nice to see you continuing the development. Will keep track of it.
Logged

"Things like Basic and Free Basic provide much-needed therapy and a return to sanity and a correct appreciation of people. The arrogant folk really hate a word like 'Basic' - fine, and good riddance." ~ pragmatist
Mitchell
Forum Howler
****
Gender: Male
Posts: 197


Rockin Geek


View Profile Email
« Reply #4 on: June 11, 2013, 12:07:10 AM »

Long story short, got caught up in having to move on a week's notice, switching to a new job while finishing the old one, moving again, and now switching to a new school. Drained me of time and energy, but I'm back again. Glad to be coding, and I'm going to try my best to see this through. I'm only taking two intro-level classes at a time this summer, so I should get quite a bit done. Off the top of my head, my goal is to be done around new years.

And I'll try to post weekly updates with pics. Usually go through spurts on weekends, so they'll probably be on mondays. Next week might be a bit slow as I need to go back to the server code, which I haven't touched since december.
Logged

Never underestimate the destructive powers of somebody doing something new without having any clue of how to do it. Tongue
Jonge
Novice
***
Gender: Male
Posts: 78



View Profile WWW
« Reply #5 on: June 11, 2013, 02:57:37 AM »

Sounds like an interesting project, keep updating this thread(to quiet around here)  Smiley
Logged

codeheim.NET - Homemade game madness!
Mitchell
Forum Howler
****
Gender: Male
Posts: 197


Rockin Geek


View Profile Email
« Reply #6 on: June 17, 2013, 04:55:19 PM »

Haven't been able to do a huge amount of coding this week; finals 'n life keeping me busy. But I have worked a bit on the server network api; I've decided to use a command-terminal based system. Also worked a bit on the account system; so logging in to an account happens after connecting to the server. IOW the client connects to a server as an anonymous guest, can use the lobby chat, and from there can try to register as a new user or log in to existing accounts. The type of account is determined by the command permissions associated with the account. So for instance, the server calculates a global delta map, then players send a request for a local delta map. Permission access succeeds if the local delta map corresponds to their own side or an ally's side. Admin controls are granted to admin accounts. So operating the server is similar to using the command line, while the client auto-generates the necessary commands for when the normal players just interacts with the GUI. Like clicking on a unit to move somewhere would send a string to the server "/move <unit id> <x coordinate> <y coordinate> <more parameters>". Though the player could type it into chat too, if they so wanted.

The client side chat system is a bit different than what I've seen in other games. I don't know if you can tell from the last screen shot, but there are three general areas on the screen: the menu bar on top, the main chunk in the middle, and the chat bar on the bottom. Clicking on the different menu buttons changes what context the main screen is displaying: the server login screen, the game map screen, the player team screen, a big chat screen, and options screen. The login screen will show the lobby chat, which anybody connected to the server can read and write to. If a client is not logged in to an account, the chat bar will be tied to the the lobby chat room. If a client is logged into an account, the chat bar is tied to the game chat. The main chat screen will be dedicated to any non-lobby chat; pretty much similar to the chat bar but with a much bigger screen.

There are reasons for the complicated chat system. Lobby chat is more for stuff involving anybody trying to talk to the server ops and general rabble. Like for somebody having issues logging in to an account, and asking a mod for help. Or just asking a mod to activate a newly registered account. Then there's the game chat for those who are focusing on the game, and don't want to be bothered with the general noise (and possible spamming). Game chat can be global (sent to all players), local (sent only to allies), or specific (sent to particular players or teams). Since the chat bar is pretty small, the chat screen is around for looking up the game chat history. Or if the client isn't in a game, just general chat history with the server itself (ie replies from commands sent to the server). Probably the main use is for admin control of the server, as well as debugging to see the exact messages the server has given the client. And to quickly test new features added to the server before I code in the GUI portion.
Logged

Never underestimate the destructive powers of somebody doing something new without having any clue of how to do it. Tongue
Mitchell
Forum Howler
****
Gender: Male
Posts: 197


Rockin Geek


View Profile Email
« Reply #7 on: June 23, 2013, 09:24:49 PM »

Update #2

So given that I had two finals, and working with the networking code felt like I was going at an excruciatingly slow pace of five LOC per day, I got a surprisingly large amount of work done. The server and client can now communicate. Also did a bit of online help serverside, and fleshed out the server response protocol.

So here's the roadmap as of now:
Currently I'm working on finishing the command system server-side; I probably won't be touching the client code much for a little bit. The command code infrastructure is going to take a lot of work, but after that's finished I need to finish the account system (much of which is tied to the command stuff) and the lobby chat. That's the near-future work.

In the intermediate future, I need to revisit the client side to complete the basis of the GUI. If all goes well with the previous code, this shouldn't be that bad. What will be bad is my artwork, but oh well. That can all be fixed once I have a fully functioning demo.

In the late game, the job'll be writing the server-side game rule logic.
Logged

Never underestimate the destructive powers of somebody doing something new without having any clue of how to do it. Tongue
Jonge
Novice
***
Gender: Male
Posts: 78



View Profile WWW
« Reply #8 on: June 24, 2013, 03:58:04 AM »

You could probably use some placeholder graphics while you work on the engine. I would think it's easier to get someone to help out with graphics when you have a working game.
Logged

codeheim.NET - Homemade game madness!
Mitchell
Forum Howler
****
Gender: Male
Posts: 197


Rockin Geek


View Profile Email
« Reply #9 on: July 02, 2013, 08:03:26 PM »

New apt, no internet, using phone with bad reception and tiny keyboard. Got server file config parser working. Trying to squash nasty hidden bug in networking.

ETA: Update #3
« Last Edit: July 16, 2013, 07:40:39 PM by Mitchell » Logged

Never underestimate the destructive powers of somebody doing something new without having any clue of how to do it. Tongue
Mitchell
Forum Howler
****
Gender: Male
Posts: 197


Rockin Geek


View Profile Email
« Reply #10 on: July 06, 2013, 10:56:40 PM »

Still no internet. Wrote a lot of back-end code this week. The parsing and binding of commands is almost complete. Also quashed a number of bugs.
Logged

Never underestimate the destructive powers of somebody doing something new without having any clue of how to do it. Tongue
Mitchell
Forum Howler
****
Gender: Male
Posts: 197


Rockin Geek


View Profile Email
« Reply #11 on: July 08, 2013, 10:49:42 PM »

Gaaaaaaaah. Stupid sockets keep garbling my data Sad . Anywho, server can now fully run off client packets. Gotta work on client side parsing. So far the gist is that the client sends a packet like "gui|/game/gettile -x 13 -y 27;" and the server responds with "gui,tile,game;key,value;x,13;y,27;unit,#182;unit,#487;owner,teamfeebee;improvement,roadwest;;". The current commands already coded are some version queries and the server shutdown command.
Hopefully i will have internet access tomorrow. And nicer packets that don't fill up with garbage.

ETA: Update #4
« Last Edit: July 16, 2013, 07:41:18 PM by Mitchell » Logged

Never underestimate the destructive powers of somebody doing something new without having any clue of how to do it. Tongue
Jonge
Novice
***
Gender: Male
Posts: 78



View Profile WWW
« Reply #12 on: July 09, 2013, 11:11:28 AM »

Nice to hear that you're making progress Smiley
Wouldn't it be more efficient if the commands was made up by smaller strings? Maybe it doesn't matter to much, I have never worked on any online game myself.
Logged

codeheim.NET - Homemade game madness!
Mitchell
Forum Howler
****
Gender: Male
Posts: 197


Rockin Geek


View Profile Email
« Reply #13 on: July 09, 2013, 04:35:47 PM »

Yay, I have a internets!

The commands themselves are pretty short. The command packet format is '<echo string> | <command> <parameters>;' . The echo string is just some string that the server echo's back in the response header; it doesn't care about it otherwise. It's for the client to help track what the response is for. The command itself is something in the form of /dir/subdir/function. For instance all of the debug commands are in the form /debug/*, game-related commands are in /game/*, account related commands are in /acc/*, etc. Parameters are like -time 5m, or -x 5, or -players jack jill bill. Not efficient at all, no Tongue, but easy to work with. Just did some testing with telnet on my phone and it works fine with communicating to the server.

Another reason I use this command system is for permission management. If an account has the permission with the name of a directory, it gets access to use the functions in that directory or subdirectory. The point being that it's relatively straightforward to set permissions for different players or types of players. ie an admin account has the permission /*, whereas brand new accounts get a limited amount. But right now permissions hasn't been implemented yet.
Logged

Never underestimate the destructive powers of somebody doing something new without having any clue of how to do it. Tongue
Mitchell
Forum Howler
****
Gender: Male
Posts: 197


Rockin Geek


View Profile Email
« Reply #14 on: July 16, 2013, 07:40:09 PM »

Update 5:
Didn't get as much work done this week. Recovering from a bug (the kind that infects people, not code) and two exams. Anywho, I have been working on the chat system backend for the server, though I trashed the old design and much of the code in favor of a much simpler system of just buffering a bunch of message strings. Also did a bit of cleaning up with some of the existing commands; most of it being better parameter checking. And I changed how the server reports back error messages; before the message was stored in the table packet header, now it's in the body. More of an aesthetic thing than practical, though I do plan to add extra information to the error packets.

There's also a bunch of other small changes here 'n there. Hoping I can hit the milestone of finishing the lobby chat and account system by next week.
Logged

Never underestimate the destructive powers of somebody doing something new without having any clue of how to do it. Tongue
Pages: [1] 2
Print
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines
Cerberus design by Bloc
Valid XHTML 1.0! Valid CSS!
gfx
gfxgfx gfxgfx