Sub's coding pool party

Steam Registered User
Joined
Aug 1, 2013
Messages
82
Best answers
0
Thanks for the kind words. You really need to play Civilization though :p

It's a turn based game. You start off with one city at the dawn of civilization and you have to grow your city, build other cities, raise armies, research technologies, compete with other civilizations, etc., all with the goal of thriving and reaching modern day without being wiped out. They're really good games.

http://en.wikipedia.org/wiki/Civilization_(series)
No problem man!!Ok.I ll try it out!I played Age of empire,AOE2,AOE3 and other all kinds of RTS games but i never tryed Civilization.
How old are you?
 
Active Member
💻 Oldtimer
Joined
Jun 18, 2003
Messages
5,935
Best answers
0
I'm 24. Btw, if you like RTS games, check out Starcraft 2 if you haven't already. There's a free starter version out there which lets you play online as Terran, I love that game.

Also, I figure I'll link to the combat test I made. The combat is very simple, but keep in mind that combat in civ is supposed to be simple. It doesn't check for proper input, so it'll go crazy if you enter in a letter when it expects a number, and it might also act up if you give a division 0 number of men, but it was just a quick and dirty test I made.



Units in the ancient era would be around 10k men per division, with a effectiveness of like 1 - 10 depending on how awesome they are. Late game something like a tank would be like 15 men, but with combat effectiveness of 1000. I'm considering adding in a morale component too, which would mean that armies could lose and retreat if morale gets too low instead of fighting to the last man.
 
Last edited:
Active Member
💻 Oldtimer
Joined
Jun 18, 2003
Messages
5,935
Best answers
0
In an effort to outdo Deathshot's "DS Learns C" thread, I've decided to go back and get a game I worked on a while ago into a releasable state. Ladies and gentlemen, I present to you:

Sins of a Hex Empire
Disclaimer: This won't work on Windows XP.



  • Turn based strategy game
  • Your goal is to defeat three opposing AI and conquer the entire map
  • The black dots scattered across the map are cities. If you own a city, it generates one army every turn.
  • Capitals (the stars) generate two armies per turn. If you capture a capital, that enemy will be eliminated
  • Your units have two values -- armies and experience. Armies are the thin black crosses, experience is the black outline around those crosses.
  • A unit gains experience whenever it expands your nations borders
  • You only get 5 moves per turn
  • Pressing enter moves to the next turn
  • Pressing spacebar at any time spawns a new map.

I think that's about it. It was originally written with SDL, but I ported it over to SFML. I also drastically changed the code structure, updated a lot of old functions since a lot of my old code was terrible, fixed a bug with the pathfinding which took forever to figure out, and added in an AI. The AI is terrible, but it only has a few hours of work on it, and I don't care enough to improve it. It's managed to beat me a few times so I figure that it's good enough for a base line level. It's still mostly retarded though. If you want a harder challenge you can artificially handicap yourself by picking a terrible starting position.

I didn't really test it too much, so there are probably some bugs.
 
Last edited:
Active Member
💻 Oldtimer
Joined
Jun 18, 2003
Messages
5,935
Best answers
0
Decided to mess around with my civilization clone some more. I was told I needed to make the tiles transition into each other, and I tried to make that happen using only code. I thought maybe it might look all right if I make a small rectangle between every tile type which isn't the same, with each pixel of the rectangle either being transparent, or a random pixel from tile1's texture, or a random pixel from tile2's texture.

I implemented it easily enough, but it kind of looks like shit. It looks like someone took the spraypaint tool from MSPaint and went across every tile. I still don't want to do it by drawing a transition for every tile type, so I'm going to go back to the drawing board and see if there's a better way that I can do it through code.



Maybe I can still do it this way except instead of a rectangle shape between each tile, it was a randomly curved polygon shape.
 
Last edited:
New Member
Joined
Mar 13, 2017
Messages
3
Best answers
0
IMPORTED_SSJG3_VEGETA_SSJ here -- four years later, I'm getting close to actually finishing this.







 
Active Member
👮 Moderator
★ Black Lounger ★
💻 Oldtimer
Joined
Jul 14, 2002
Messages
6,874
Best answers
0
That actually looks awesome, I'm glad you figured out how to make it work. Are you still coding this in C++ or a different language?
 
New Member
Joined
Mar 13, 2017
Messages
3
Best answers
0
Thanks dude.

It's all c++ and continued from the codebase that I started with back in the day. Although I guess it's like Theseus's ship since I've probably rewritten every part of it since then. No scripting language used, but I am trying to have everything defined in an external json file so that there's some degree of flexibility if anyone wants to mess with the rules / look of the game.

But yeah, tonight I started coding a tech tree gui which is generated dynamically at runtime, kind of excited about that.
 
Last edited:
NOT IN THE MANGA™
★ Black Lounger ★
💻 Oldtimer
Joined
Jan 5, 2008
Messages
3,270
Best answers
0
Good, it has CHEATS.
 
New Member
Joined
Mar 13, 2017
Messages
3
Best answers
0
I've found myself working over the past few days on what could be thought of as a 2D take on concepts found in ESF. Video is posted below, but it needs an explanation.

You control a very tiny and nimble square. It can fly / teleport and (eventually) shoot energy beams / energy balls / lazers. I'm the yellow dude. The circle around me is how much energy I have. Flying and teleporting drains energy. Energy automatically regenerates after not using any for a short period of time. Energy regenerates 3 times faster if you're completely stationary.

If you fly into the opponent square, a melee collision happens, and the loser gets damaged and knocked back. The winner is determined by whoever was moving faster in the opponents direction. It's all about momentum.

The video is me testing the melee combat against an AI to the tune of questionable music.
[video=youtube;DISSpp6xMxE]https://www.youtube.com/watch?v=DISSpp6xMxE[/video]

On the list of things I think would be cool to do
- Improved collision detection / melee resolution. It's a bit janky in the video, but I know what I need to do to improve this.
- Add malleable / destructable terrain (already have the code for this written, just need to integrate it)
- Add energy attacks
- Add in a proper camera. I have decent code for this already written, I just need to add it in.
- World generation. Instead of the level taking place on a flat surface like in the video, it should instead take place on a rather large circular world populated with enemies. Gravity should point towards the center of this circle.
- Make it look pretty

On the more insane end of things I'd like to do
- Add rpg elements, where your character can level up to learn new attacks / gain more energy / speed.
- Add rogue-lite elements, so that when your character dies, you start over with a new character on a newly generated world.
- Going hand in hand with the above point, it'd be cool if there were a handful (not to be cliche but 7 would be a good number) scattered items for you to collect on each world. After collecting all of them, you'd be able to select from a list of bonuses to choose from. One of these being immortality aka respawn.

---

So yeah, that's that idea. I'm posting this here because I know the idea is kind of far out there, and I figured feedback from people who actually have seen dbz might be appropriate. If you watched the video and read this post, let me know what you think.
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Top