Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: It Usually Ends In Nuclear War  (Read 42340 times)

0 Members and 1 Guest are viewing this topic.

Hapax

  • Hero Member
  • *****
  • Posts: 3379
  • My number of posts is shown in hexadecimal.
    • View Profile
    • Links
Re: It Always Ends In Nuclear War
« Reply #15 on: September 28, 2014, 07:40:26 pm »
I like how this is looking.  :)
Selba Ward -SFML drawables
Cheese Map -Drawable Layered Tile Map
Kairos -Timing Library
Grambol
 *Hapaxia Links*

Jesper Juhl

  • Hero Member
  • *****
  • Posts: 1405
    • View Profile
    • Email
Re: It Always Ends In Nuclear War
« Reply #16 on: September 28, 2014, 10:41:52 pm »
I'm getting a "Civilization" feel from this - which is a good thing ;)
Looks like it's progressing nicely..

ChronicRat

  • Sr. Member
  • ****
  • Posts: 327
  • C++ programmer
    • View Profile
    • My blog
Re: It Always Ends In Nuclear War
« Reply #17 on: September 29, 2014, 01:04:49 pm »
Terrain is wonderful!

Glocke

  • Sr. Member
  • ****
  • Posts: 289
  • Hobby Dev/GameDev
    • View Profile
Re: It Always Ends In Nuclear War
« Reply #18 on: September 29, 2014, 03:04:49 pm »
Nice!! ;D I'm looking forward to future updates
Current project: Racod's Lair - Rogue-inspired Coop Action RPG

Sub

  • Full Member
  • ***
  • Posts: 159
    • View Profile
Re: It Always Ends In Nuclear War
« Reply #19 on: December 29, 2014, 11:32:59 am »
I’m still working on this.  I admittedly don’t have much progress to show at the moment, but I am putting in a great deal of time and effort.   The hard part is coming up with a design that I like



Graphically I like the direction I’m headed, but there’s definitely something not quite right about it. I’m about as far from an artist as one can possibly get, so I think what I’ve done so far is pretty good, but like I said, it’s still not there yet. As you can see, the current thinking is that the entire game is going to have a textureless look, possibly even going as far as to have no sprites or external images used at all. This serves a dual purpose - It takes some pressure off of me having to somehow get high quality art assets, and I also think it gives off a unique stylistic vibe.

Hopefully I’ll have some actual progress to report soon.
« Last Edit: July 15, 2017, 12:44:08 am by Sub »

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 11034
    • View Profile
    • development blog
    • Email
Re: It Always Ends In Nuclear War
« Reply #20 on: December 29, 2014, 11:47:03 am »
It's nice to hear that this project is still going! :)

Btw. you need to use the public Dropbox links, because currently we can't see the first three images (same for your blog post).
And if you want a certain width to be applied to the images you can do so with [img width=700]url[/img].

It's kind of normal to get frustrated when developing and working alone on a project can be very tedious. What helps me personally a lot, is having a group of equal or similar minded people to chat with, which is probably the main reason I keep hanging around in the #sfml IRC channel. There are often quite interesting discussions about code design etc., but at times there are also general discussions about anything really, which then can take away your time, if you choose to chime in. Feel free to join us if you ever want to talk about your project. :)
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

Sub

  • Full Member
  • ***
  • Posts: 159
    • View Profile
Re: It Always Ends In Nuclear War
« Reply #21 on: December 29, 2014, 11:59:25 am »
Ah damn, I thought I was grabbing the public URL.  Thanks for the heads up, and thanks for the invite :)

Mörkö

  • Jr. Member
  • **
  • Posts: 96
    • View Profile
Re: It Always Ends In Nuclear War
« Reply #22 on: December 29, 2014, 12:33:30 pm »
Quote from: Sub
I implemented a pathfinding algorithm known as a* forever ago, and it miraculously still works with It Always Ends In Nuclear War after all the changes I’ve made to the code (check out the above screen; purple tiles would be the path), but I’m going to have to improve the system further if I don’t want it to grind the game to a hault.

Is your program single threaded? What about having two threads, one for graphics and one for game logic, that way the UI can remain responsive even if you need to run CPU intensive tasks such as A* on a very large graph.

I really like the visual style btw.

Sub

  • Full Member
  • ***
  • Posts: 159
    • View Profile
Re: It Always Ends In Nuclear War
« Reply #23 on: December 29, 2014, 11:29:27 pm »
Thanks  :D

It's single threaded.  I'd like to eventually have it be multithreaded, but I think it's worth it to optimize the pathfinding regardless, as I think the game is going to have to calculate large paths quite a bit.  Not going to lie though, a lot of the reason I want to do it is also because I like working on that type of thing. 

edit:  It's also the type of thing that's almost entirely self contained, so I can play around with it and have it be useful regardless of what changes I make to the rest of the game.
« Last Edit: December 29, 2014, 11:34:35 pm by Sub »

Cmdu76

  • Full Member
  • ***
  • Posts: 194
    • View Profile
Re: It Always Ends In Nuclear War
« Reply #24 on: December 30, 2014, 12:54:22 am »
Hi !

I'm looking at your project since a long time, and I'm again asking myself, what are your technique to generate the map ??

Your world looks very realistic and if you want to make a game like Civilization, you can be sure I'll try it :)

Sub

  • Full Member
  • ***
  • Posts: 159
    • View Profile
Re: It Always Ends In Nuclear War
« Reply #25 on: December 30, 2014, 01:32:00 am »
Thanks, I really do appreciate it :).

There are a lot of ways to go about the map generation.  I'd like to eventually have multiple map generation algorithms, but for now I'm doing something reasonably simple.  I'm doing this from memory, but from what I remember, this is the main algorithm:

-  Start with a small board (70 x 75 tiles)
-  Make every tile water
-  Pick a tile at random and make it land.
-  Add that tile to a list we'll call tiles to check.

while the number of land tiles is less than some arbitrary number (I think I made mine 35% of the map). . .

  • For every tile in the list we made we look at each of their neighboring (i think only water) tiles to determine whether to change them to land or keep it as water.
    • The closer this tile is to the first tile that we chose, the greater chance it has of becoming land.
    • If we decide to make the tile into land, we add it onto the list of tiles to check.
    • Tiles that stay as water don't get added to this list.


Once all neighbors for a particular tile are checked, that center tile gets removed from the list. When the list is empty, you can repeat the process with a new starting tile. Repeat this entire process until we hit a desired number of land tiles.

I then translate this small board onto the larger board, which I described in one of the above posts.

It seems to produce reasonable results, and you have a bit of control over things like the size of a landmass (adjust the weight on distance), the % of the map that is water (adjust the # of desired land tiles), you can dictate certain areas of the map that are more likely to contain water/land (for example, if you want a map with a gigantic ocean in the middle, you can favor starting tiles that are far away from this area), you can control how many continents appear on the map, as well as the size variance between continents (that is, how large the largest continent is in relation to the smallest) by changing the distance weight for each continent you place.

That being said, I'm sure there are better ways to go about it.  A lot of people use perlin noise to generate random maps.  I found another project on the web a few weeks ago which generated similar maps in Javascript.  You can check out the results, code, and a writeup of that here if you're interested.  I actually highly recommend it, it was really interesting.

For the height, I did something that was roughly this -- All tile corners are at height 0, and there's a list of corners that are locked and will no longer be heightened, and a list of unlocked corners.  All corners start out unlocked.  First lock all water corners. Iterate over all remaining unlocked corners and randomly either heighten a corner if allowed (i.e. this will not make it too high over any of its neighbors) / do nothing if not allowed, or lock the corner.  Keep iterating over the unlocked list until it's empty.
« Last Edit: December 30, 2014, 01:35:25 am by Sub »

Sub

  • Full Member
  • ***
  • Posts: 159
    • View Profile
Re: It Always Ends In Nuclear War
« Reply #26 on: January 01, 2015, 05:44:04 pm »
Happy new year!  Let's get to it.

The Civilization series used to have a flaw in that the minimap would reveal exactly where you were on the map.  It wasn't a huge deal, but it could be abused in some situations.  For example, if you spawned near the top of the map, you'd be able to see that and plan accordingly.  Scouts would be sent south, settlers would be sent south, and no time would be wasted exploring the north of the map.  I'm not sure what version of Civilization fixed this, but it was fixed by having the minimap zoom in to fit the area explored.   

I'd like to have that same need for exploration in IAEINW.  You should have to explore or look at the terrain type to figure out where you are on the map.  Up until today, however, you were able to abuse the sides of the map to figure out where you were in the world.  Check out this old screenshot to see what I mean.



A few months back I sort of fixed it by only drawing a side of the map if a player discovered a tile on that edge of the map, but this wasn't perfect.  The entire side was still drawn, so you could gauge exactly how large the map was and where you were in it once you discovered one edge.  I've been wanting to fix this for a while now, and today I finally got around to it.  I'm now only drawing the edges of the map between the furthest explored reaches of the edge.  Check it out to see what I mean







There are more important things I could be working on, but it's the little things that make me happy.  And as an aside, I think I've now got all the pathfinding stuff worked out.

Sub

  • Full Member
  • ***
  • Posts: 159
    • View Profile
Re: It Always Ends In Nuclear War
« Reply #27 on: January 11, 2015, 09:24:32 pm »
I worked a bit today on the code for getting armies (units) working, and then got bored of that and decided to get the game up and running on Linux.  SFML is awesome -- It basically worked out of the box. 



The low FPS is from the screenshot program freezing everything.

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 11034
    • View Profile
    • development blog
    • Email
Re: It Always Ends In Nuclear War
« Reply #28 on: January 11, 2015, 09:48:55 pm »
Cool! :)

Yes, if one uses platform independent code and libraries which support multiple platforms, there's usually not much if anything one has to adjust.
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

Sub

  • Full Member
  • ***
  • Posts: 159
    • View Profile
Re: It Always Ends In Nuclear War
« Reply #29 on: January 11, 2015, 10:16:16 pm »
Yeah, I was just surprised at how easy it was.  I suppose I was afraid that I might have some code which wouldn't work.

I was looking for a Linux IDE which was similar to Visual Studio, and the top reply for this SO thread recommends not using an IDE, but that seems crazy to me.  I just decided to use MonoDevelop since I've used it before and it works fine.
« Last Edit: January 11, 2015, 10:18:20 pm by Sub »

 

anything