Stories
Slash Boxes
Comments

SoylentNews is people

Log In

Log In

Create Account  |  Retrieve Password


IRCiv progress

Posted by crutchy on Sunday May 18 2014, @10:00PM (#397)
0 Comments
Code

fixed save/load routines and currently working on refining authentication to allow for smooth bot restart

coming up next (still)... detecting other players within unit/city sight range

====
pushed latest code to github: https://github.com/crutchy-/test
note: irciv.php and irciv_lib.php contain most of the game functionality and can be found in the scripts directory
latest web map demo here: http://irciv.port119.net/?pid=2

join #civ channel in soylent irc to get involved, or use the github source for your own project

more info:
http://wiki.soylentnews.org/wiki/IRCiv
http://wiki.soylentnews.org/wiki/IRC:exec

IRCiv progress

Posted by crutchy on Sunday May 18 2014, @02:59AM (#393)
0 Comments
Code

got fog of war working... thanks to chromas for the idea of using a gd filled circle image :-D

city name and proximity detection also implemented

coming up next... detecting other players within unit/city sight range

====
pushed latest code to github: https://github.com/crutchy-/test
note: irciv.php and irciv_lib.php contain most of the game functionality and can be found in the scripts directory
latest web map demo here: http://irciv.port119.net/?pid=2

join #civ channel in soylent irc to get involved, or use the github source for your own project

more info:
http://wiki.soylentnews.org/wiki/IRCiv
http://wiki.soylentnews.org/wiki/IRC:exec

IRCiv progress

Posted by crutchy on Thursday May 15 2014, @09:54PM (#386)
0 Comments
Code

got basic city building working last night. only settlers can build cities using the "build" or "b" command in irc

city images cover 3x3 terrain tiles, with the reference as the center tile. this will allow big cities to look big on the map.

pushed latest code to github: https://github.com/crutchy-/test
note: irciv.php and irciv_lib.php contain most of the game functionality and can be found in the scripts directory
latest web map demo here: http://irciv.port119.net/?pid=1

coming up next... city building proximity detection, and fog of war implementation

join #civ channel in soylent irc to get involved, or use the github source for your own project

more info:
http://wiki.soylentnews.org/wiki/IRCiv
http://wiki.soylentnews.org/wiki/IRC:exec

IRCiv progress

Posted by crutchy on Wednesday May 14 2014, @09:57PM (#381)
0 Comments
Code

fixed up some of the map image stuff last night.
thanks to Brylarke for correcting my misconception about png filesize; i incorrectly assumed that gif output would be smaller than png (without testing my assumption), but i was very wrong. png++
painted gridlines on the map if "grid" player flag is set.

when a player moves, the irc bot outputs two URLs; the long one is specific for that instance of the game (for timeline feature to be added later) and the other just shows the latest map image. if you open the latest image URL and move again, you can just refresh the browser and it will update the map. in some (probably most) browsers you can scroll to the area of the map where your units are, and when you refresh the browser will keep that position.

demo here: http://irciv.port119.net/?pid=1

civ2 fans might recognize the map graphics... i won't tell if you don't. if anyone is handy with game graphics, replacement images will be welcome. images are png format with magenta (255,0,255) for transparent regions. have a squiz in the scripts/images directory. i might reduce the unit image down to 48x48 tonight.

pushed to github: https://github.com/crutchy-/test
note: irciv.php and irciv_lib.php contain most of the game functionality and can be found in the scripts directory

coming up next... fixing bug in map_img function (vertical unit image offset is wrong, but i might change the unit image as well), and adding a city to the map :-)

http://wiki.soylentnews.org/wiki/IRCiv
http://wiki.soylentnews.org/wiki/IRC:exec

IRCiv progress

Posted by crutchy on Monday May 12 2014, @09:55PM (#379)
0 Comments
Code

was a bit lazy last night, but instead of fillrect terrain we have terrain images (atm only land and ocean).

website now has a png logo, and players can access their latest map using http://irciv.port119.net/?pid=<player_id>

example: http://irciv.port119.net/?pid=1

haven't pushed to github yet. will do tonight (australian time).

coming up next... playing with the map image generator to get settlers and warriors on the map. wanna try png maps for antialiased layers, as long as the files aren't unreasonably large.

IRCiv progress

Posted by crutchy on Thursday May 08 2014, @09:57PM (#367)
0 Comments
Code

have been having some difficulty with my internet connection, so progress has been a bit slower than i would like

set up an apache vhost on my dmz server for the IRCiv website, and coded a little php web app that will allow exec to upload map images to the website using a private key, and displays an image based on a map filename passed in the URL (validated to allow only a alphanumerical chars)

the IRCiv logo is displayed in a gif format (less sexy) on the IRCiv webpage @ http://irciv.port119.net/
thanks to mrbluze for use of his domain and also for some style guidance on the logo

pushed to github: https://github.com/crutchy-/test
note: irciv.php is in scripts directory and contains most of the game functionality

coming up next... making IRCiv upload map images to the website when a player moves

Generic Journal Entry

Posted by The Mighty Buzzard on Wednesday May 07 2014, @01:38PM (#361)
8 Comments
/dev/random

This is a generic journal entry posted entirely so that you can tell me I'm awesome, call me a dick, or impart useful information since SN lacks a messaging feature and I'm not giving out my email address.

IRCiv progress

Posted by crutchy on Tuesday May 06 2014, @01:08PM (#357)
0 Comments
Code

updated unit movement, added settler, got active unit cycling working

made up a simple logo to (eventually) go on the IRCiv website
for now its here: http://wiki.soylentnews.org/wiki/IRCiv

pushed to github: https://github.com/crutchy-/test
note: irciv.php is in scripts directory and contains most of the game functionality

coming up next... building/setting up the IRCiv website (to eventually host player map images)

IRCiv progress

Posted by crutchy on Monday May 05 2014, @01:52PM (#355)
0 Comments
Code

put movement of active unit into a function

created <init> and <quit> reserved aliases in exec (irc.php), which i'll eventually use for loading/saving game data (in addition to timed saves).

used cmd.php (attached to * alias which runs on every received line of data) to fire commands on a 330 numeric event (whois/logged in as) to make startup a bit easier - automatically sets player alias lock to "civ" (in game channel only) and outputs a status command, so that when a player joins a game channel, they can start moving their active unit pretty much straight away (after a 2 or so second delay in processing login script).

IRCiv wiki page created: http://wiki.soylentnews.org/wiki/IRCiv

latest source pushed to github: https://github.com/crutchy-/test

next up... adding a settler unit and getting the active unit cycle function working

IRCiv progress

Posted by crutchy on Sunday May 04 2014, @09:57PM (#352)
0 Comments
Code

IRCiv is a little game (and game engine of sorts) for building stuff like in "Civilization"-branded games.

Currently it piggybacks as a couple of scripts for the exec bot. Refer to the wiki for more info on exec: http://wiki.soylentnews.org/wiki/IRC:exec

Implemented some basic unit movement last night. Can use "up" or "u" action on the active unit (along with equivalents in the 3 other directions).

The game is being gradually developed/tested most nights (Australian time) in the #civ channel of Soylent IRC. Feel free to join, but be aware that you may get pinged by the bot a fair bit (you're always free to duck in and out whenever you like of course).

Other stuff that has been implemented already:
- auto-login on join/logout on part
- logins based on nickserv account name (using whois), so means that players must be registered with nickserve
- supports nick changes
- map generator has been developed (random landmasses based on a couple of parameters)
- map image dump
- map text file dump
- player settings and flags system
- player active unit status output to either game channel or private message (based on "public_status" flag)

Currently development is mainly in PHP, but using the exec bot system, game features/modules can be developed in any language.
Each command runs as a separate script in its own process instance, but can easily communicate with IRC and access persistent game data.
The project is open-source (GPL2) and can be found here: https://github.com/crutchy-/test
Feel free to fork or pilfer, but please share your changes/derivatives.
Anyone interested in contributing to the current project, look for crutchy in #soylent or #civ on IRC.