The Freebasic Magic castle , interactive dungeon

For other topics related to the FreeBASIC project or its community.
TESLACOIL
Posts: 1769
Joined: Jun 20, 2010 16:04
Location: UK
Contact:

The Freebasic Magic castle , interactive dungeon

Postby TESLACOIL » Jun 12, 2012 7:58

The Freebasic Magic castle , chatroom , lobby, interactive dungeon

Image


Might be an idea to work together to make some kind of interactive chat room , call it the Freebasic Magic castle , an excuse to try stuff out and have a bit of fun at the same time. Internet Networking issues are the main stumbling block to multiplayer
games. If we can crack these then peoples solo game ideas can become multiplayer dungeons.


A static single screen castle as depicted above would suffice. Log on and fight each other, or practice vs a dragon if no one else is about....yer 5 minutes o' fun for the day



A number of people have been working on mplayer network code, and got some basic stuff working. Might be a simple & fun deployment of that code....my 2 cents
Last edited by TESLACOIL on Jun 14, 2012 2:52, edited 1 time in total.
Lachie Dazdarian
Posts: 2338
Joined: May 31, 2005 9:59
Location: Croatia
Contact:

Re: The Freebasic Magic castle , interactive dungeon

Postby Lachie Dazdarian » Jun 12, 2012 14:02

ideas are dime a dozen
TESLACOIL
Posts: 1769
Joined: Jun 20, 2010 16:04
Location: UK
Contact:

Re: The Freebasic Magic castle , interactive dungeon

Postby TESLACOIL » Jun 12, 2012 22:45

yup , but thats a pretty good idea IMHO

At the moment hobby coders are still mainly constrained to write single players games. Even a crap and slightly cheesy game suddenly becomes 'daft fun' when its goes online multiplayer. That the win when you break through the glass ceiling and venture in to multiplayer land.

PC hardware and net connection speed no longer an issue.
Pritchard
Posts: 5492
Joined: Sep 12, 2005 20:06
Location: Ohio, USA

Re: The Freebasic Magic castle , interactive dungeon

Postby Pritchard » Jun 14, 2012 1:54

Well, I don't know. I think programmers would be more interested if they could write their own plugins for an open social project like this.
TESLACOIL
Posts: 1769
Joined: Jun 20, 2010 16:04
Location: UK
Contact:

Re: The Freebasic Magic castle , interactive dungeon

Postby TESLACOIL » Jun 14, 2012 2:15

if we could come up with some very easy to deploy & configure server code written in freebasic , something where the player inputs can be transmitted to a game.exe in an easy to comprehend manner then coders can focus on building their multiplayer game rather than get bogged down in server config issues. Which i imagine puts the dampers on most peoples efforts.

thats my thinking


eg

simple_FBasic_server.exe ( two way data pipe that say passes a single data string) to from your_multiplayer_game.exe

every 1/10th of a second the server polls through the connected players to see if they have transmitted a data string
this is fed into the game.exe which updates the world according to the inputs and then outputs a large data string to be sent to all the connected players

something that can handle a dozen players with a universe tick clock of say 1/3rd of a second still yields enough fluidity for many types of slower paced games


Im not hugely into rogue like games or zelda myself, but if we had a simple free-basic version up and running it would be a bit of fun, even if the quality was a bit cheesy, its the multiplayer action is what makes it fun

If multiplayer games isn't your thing then this wont appeal much. Myself i just think it would be a really good fun.



Pestery and argemenous have some basic server code that could support this. (that's the tricky bit)

Even my nooby skills are enough to rustle up a single screen "freebasic magic castle" interactive lobby. arrow keys + 4 actions keys , bit of sprite manipulation, handful of interactive artifacts, magicsword, frisbee what have you, pull the lever to release the firedragon from its lair. ( so long as the simple 2 way data pipe is straight forward its not a huge coding effort once the server code is up and running )






Events

The Sunday evening 'bash n slash' at the Freebasic Magic castle,

Wednesdays Frisbee football match, spectators cheering on from the castle towers ' the odd arrow let loose :-p

once a month ' Gladiator / jousting tournament '




you can squeeze a lot of fun out of a very simple multiplayer game



eg
Lachies dragon egg hunt ( 7 to 9pm this thursday )
Pestery server debug ( Saturday lunchtime )
Azys deathknight vs archmage archery contest ( Sunday 11 am till late )

this could make for a small but good community project ...im sure it would garner a lot of support from the zelda/rougelike fans as well as regular online gamers like myself. Have a community thread listing which freebasic servers are live, times, events etc
Pritchard
Posts: 5492
Joined: Sep 12, 2005 20:06
Location: Ohio, USA

Re: The Freebasic Magic castle , interactive dungeon

Postby Pritchard » Jun 14, 2012 4:54

All right, I don't see this being easy to do in FreeBASIC. Networking is so much easier and even integrated into .NET, HTML/JS, NodeJS, jQuery...

That being said, here's a proposal:

- A dedicated server which holds the "main" (official) events and also maintains a list of user-servers.

- User-ran servers register themselves to the dedicated server.

- Each server codes and registers their own "events" or "festivities" using the common API.

- Each player has a copy of the common client, which is able to perform actions based on communication with the server.

Here's an example:

Main Server

- Playground
- Capture the Flag
- Quick-Draw

Pritchard's Server

- Random explosions
- Nyan-cat
- FreeBASIC Tower Defense

TESLACOIL's Server

- Outl-AI-rs
- Futurism

Client API:

- Uses a message-sending model
- Supports animations, sounds, player stats, etc.
- Common to all players

Server API:

- Sends messages to client
- Validates that clients aren't cheating
- Server rule code is common to all servers
- Custom rule code allows for writing custom events/game logic
leopardpm
Posts: 1792
Joined: Feb 28, 2009 20:58

Re: The Freebasic Magic castle , interactive dungeon

Postby leopardpm » Jun 14, 2012 18:46

Just playing around with the sample code from the Freebasic tutorial files regarding internet chatting, it would seem to be rather easy to set up a server relay between multiple internet clients... its just basic text strings going back n forth. But maybe I am missing something, like having multiple connections... I will take another look and see what my amateurish brain can figure out....
Pritchard
Posts: 5492
Joined: Sep 12, 2005 20:06
Location: Ohio, USA

Re: The Freebasic Magic castle , interactive dungeon

Postby Pritchard » Jun 14, 2012 22:00

The problem will be formatting, parsing, providing, retrieving and converting the data. Data serialization isn't always straight-forward. FreeBASIC doesn't have builtin support for SOAP or JSON, or event-handling/asynchronous callbacks tied into this afaik.

So yeah, just "simple strings", but making everything work how you want isn't always so straightforward.
codeFoil
Posts: 255
Joined: Dec 22, 2011 4:45
Location: United States
Contact:

Re: The Freebasic Magic castle , interactive dungeon

Postby codeFoil » Jun 14, 2012 22:55

Pritchard wrote:The problem will be formatting, parsing, providing, retrieving and converting the data. Data serialization isn't always straight-forward. FreeBASIC doesn't have builtin support for SOAP or JSON, or event-handling/asynchronous callbacks tied into this afaik.

So yeah, just "simple strings", but making everything work how you want isn't always so straightforward.


A JSON parser and encoder shouldn't be too difficult. I've been trying to find an excuse to write one.
leopardpm
Posts: 1792
Joined: Feb 28, 2009 20:58

Re: The Freebasic Magic castle , interactive dungeon

Postby leopardpm » Jun 14, 2012 23:13

Here's a LUA JSON parser code to use as a base - I find LUA pretty easy to convert to Freebasic. I know nothing about JSON encoders/parsers though... just somewhere to start, if needed

http://files.luaforge.net/releases/luajson/luajson/1.2.2
pestery
Posts: 493
Joined: Jun 16, 2007 2:00
Location: Australia

Re: The Freebasic Magic castle , interactive dungeon

Postby pestery » Jun 15, 2012 8:04

leopardpm wrote:Just playing around with the sample code from the Freebasic tutorial files regarding internet chatting...
Easy enough. TESLACOIL and I got a simple chat program working a while ago. Here's a link to the code if your interested. It could definitely be improved and it doesn't do data compression or encryption, but it works.
TESLACOIL
Posts: 1769
Joined: Jun 20, 2010 16:04
Location: UK
Contact:

Re: The Freebasic Magic castle , interactive dungeon

Postby TESLACOIL » Jun 15, 2012 18:54

and i (the client ) was the sat the other side of the world , wireless linked to a typical home/bband modem router located 100ft away, so there was lots of string n tin cans between us and there's is a huge amount of wireless traffic in my locality too.

a good real world test of Pesterys code
angros47
Posts: 1513
Joined: Jun 21, 2005 19:04

Re: The Freebasic Magic castle , interactive dungeon

Postby angros47 » Jun 15, 2012 22:06

kiyotewolf
Posts: 1009
Joined: Oct 11, 2008 7:42
Location: ABQ, NM
Contact:

Re: The Freebasic Magic castle , interactive dungeon

Postby kiyotewolf » Jun 16, 2012 7:41

Why would an avatar based world need a JSON parser?



~Kiyote!
Pritchard
Posts: 5492
Joined: Sep 12, 2005 20:06
Location: Ohio, USA

Re: The Freebasic Magic castle , interactive dungeon

Postby Pritchard » Jun 16, 2012 16:40

Kiyote - Re-read every post in this thread and then ask that again if you must. I'll gladly answer, but you ask a lot of questions but never seem to think about them first.

Return to “Community Discussion”

Who is online

Users browsing this forum: No registered users and 1 guest