webciv - a civ for a browser

webciv

Chieftain
Joined
Jun 10, 2016
Messages
17
I started a hobby project called webciv - it's a civ-like game that is completely written in JS and uses canvas to do the rendering (no server required). Initially it was just an experiment to estimate how much time it would require to render the original CIV1 assets in the browser, but then I extended the renderer with terrain textures, added scrolling, added random map generator and initial support for units / cities, etc (no game logic yet).

Basically it started growing and I would like to see if anybody here is interested in helping with such project, especially architecture and graphics wise.

Attached a screenshot of a rendered map (only basic terrain types atm).

The prototype can be accessed here:

https://github.com/kobalicek/webciv (git)
https://kobalicek.com/webciv/ (preview)
 

Attachments

  • webciv-screen.jpeg
    webciv-screen.jpeg
    87.4 KB · Views: 617
Last edited:
Hi webciv.
I'm working on CivOne myself, please feel free to browse the source code... it should give you some ideas on the original game mechanics. I built most of it according to the topics on this forums by darkpanda and gowron.
If you post this on github/sourceforce/something like that, I will follow your progress and have a look at where I contribute. Looks interesting.

Question, where did you get the terrain textures? The rivers look really good!
 
Hey SWY, thanks! The server compressed the screenshot so it looks pretty bad here :)

I created all masks myself in gimp, and then let the engine use the masks and create all the terrain transitions. I did rivers in the morning, actually few hours ago before I wrote the post :) I'm still exploring how to blend different terrain types altogether, you see now just a desert texture blended with grassland or ocean, which is kinda limiting. It's a challenge to make it render real-time with html canvas. I have actually much more ideas to make the terrain nicer, but I just started, it's my first game project.

The reason I didn't publish the source yet is that I'm still using some of the original artwork extracted from civ1 (although it's not shown on the screenshot). I need to get rid off it, do some code cleanup, and then I'm ready to release it. I would like to publish a prototype that can just run as is, no additional files should be required to start messing with it - and I think that this is a mistake of many remakes - you cannot just play it, you need to add the original artwork first.

The main reason why I wrote the post is that if I can get an artist to help me with graphics while I can focus on programming it could be really an awesome project :) I would need some help with the game architecture later as I'm not experienced with that, but the graphics is more important for me to start the project.

BTW is there a screenshot of CivOne anywhere?
 
There's several screenshots in the CivOne topic... but it looks pretty much exactly the same as Civilization 1 for DOS (which is the main goal). CivOne uses the original Civilization files.
I can provide you with a binary so you can try it yourself?

I hope I'll find some time soon to finish off the first alpha release soon... but I'm also moving to a new home soon which is taking up a lot of my time as well.
 
I finished most of the rendering of various terrain types based on terrain dominance. I just need hills and forests, but not sure if I can just paint them :)
 

Attachments

  • webciv-screen-2.jpg
    webciv-screen-2.jpg
    67.9 KB · Views: 577
  • webciv-screen-3.png
    webciv-screen-3.png
    185.8 KB · Views: 550
Very nice graphics.

Modern games tend to clutter everything into one picture and I like this clean style better.

Less is more!
 
Thanks guys! Any volunteer to help with the project :) ?

I added a coastline texture and rendering (fully automatic done by the engine, calculated by blurring and adjusting coast blendmap) - still not perfect, but progressing :)
 

Attachments

  • webciv-screen-4.png
    webciv-screen-4.png
    283.2 KB · Views: 424
Hey SWY! I would like to avoid using original algorithms from civ1 in webciv as it could cause legal problems in the future. My goal is to create a new game that takes from civ its simplicity, but gives it a new look and new way of playing it. For example I would like to avoid the micromanagement of civ1 (all all next series), but I would like to keep the minimal graphics (units and their background).

Currently I'm more working on an engine than a game, but I guess I will get closer to the game logic in near future when I finish implementing some of the remaining things and work a bit on UI definition, as I have no UI yet and no way to define it within the game.

My prototype is here, you can check it out and let me know if it works:

http://kobalicek.com/webciv/

I tested in chrome and firefox - both browsers render it fine, although chrome is noticeably faster. To regenerate the map just press Ctrl+R to reload :)

Also, I'm mostly ready to put the code on github - I guess few more days and some more cleanup and it can be published.
 
Updated the renderer, some textures, and added more logic to the game and concept of AI (does random moves of initial settlers). Not playable, but fun to work on :)
 

Attachments

  • webciv-screen-5.jpeg
    webciv-screen-5.jpeg
    87.4 KB · Views: 389
Looks great! I just wonder whether it is possible to put here maps from different civs (1-4) and compare them in such graphics.
 
Well, starting from Civ3 graphics changed dramatically. I'm trying to achieve nice look while maintaining the clarity and simplicity of Civ1 design.
 
Why there was no black civ in Civ1, I think the artwork looks nice :)
 

Attachments

  • webciv-screen-6.jpeg
    webciv-screen-6.jpeg
    80.2 KB · Views: 521
Looks cool.

Pretty please make combat like Civ 2 at least, though. Civ 1 combat is the most frustrating thing in the universe when you have tanks get blown up by guys with sticks.
Then again it's also frustrating when you have two riflemen rifle behind city walls on a hill get pwned by a single chariot.
 
I will, I hate Civ1 simplified combat that doesn't have a concept of hit-points and healing. I don't intend to follow Civ1 rules at all, just the map clarity.

Here are more concepts I'm thinking of:
- No more workers, only settlers to make new cities - roads, and tile improvements will only be possible within civ borders through the concept I have seen in Call to Power - I guess it was called public service, or something like that - you click on tiles you want to improve and pay by gold and public service and they are improved immediately. Then you pay for each improvement you have also per turn, so you only improve what is really necessary.
- No more micromanagement of units - create a group and move it together, also auto-explore would be fine
- Cities - Ability to use automatic city management that would be based on goals (population, production, economics, etc)
- Resources - each resource provides huge local bonus to the city that utilizes it and very small global bonus to all other cities
- Lessen importance of strategic resources - resources would improve things in cities, but it will still be possible to build units/improvements without them, for full price.
- Civilization specific bonuses related to war-time - I think warmongering civs should produce units faster during war, for example...
- No religion - for me the most stupid concept introduced in civ games

Also some new ideas
- World war - create an alliance of few civs and declare war on all others, forcing them to ally against you if they want to survive.

There are just concepts, don't wanna complicate it, just make it fun so I can play it and enjoy it, and mostly, finish in few hours not days :)
 
It's gorgeous. I really hope this works out. It's very clean and pretty, and if you achieve what you're aiming it has the makings of an excellent game. The web paradigm is especially attractive.
 
Top Bottom