Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Topics - Xecutor

Pages: [1] 2
Early Dev / High Tech Survival
« on: April 04, 2015, 10:47:33 AM »
I'm going to continue development of my 7drl 2015.
Here is a little more detailed idea. I'm open for suggestions, corrections etc (more like I really need them :) ).

First of all player will need to find sources of:
  - oxygen
  - food
  - water
  - energy

Planet is defined by:
  - temperature (day and night)
  - oxygen in atmosphere (with possibility of toxic atmosphere, but with oxygen)
  - terrain

Terrain types:
  - rocks and stone (whole range of temperatures)
  - swamp (not too cold and not too hot)
  - forest (taiga when too cold, jungle when hot)
  - desert (hot only?)

Ideally there should be at least 2 ways to get crucial resources for each combination.
In a forest with breathable air there should be hostile and non-hostile, but annoying (too curious) animals.

To make thing more fun, following encounters could be generated nearby:
  - hidden space pirates base (can be aggressive, the base might contain useful machines, food etc if conquered).
  - abandoned secret laboratory/military base with still functioning defense systems (passive, if conquered, always contains useful machines).
  - smugglers entrepot/base (can be neutral or aggressive, no machines, but might be food and raw materials).
  - ancient ruins (passive mechanical traps, might have some raw metal may be?)

Ways to get oxygen:
  - condenser (?) for low oxy atmosphere
  - filter for toxic atmosphere
  - hydrolysis from water (expensive?)

Ways to get (drinkable) water:
  - boil + filter if there is source of water nearby
  - thaw snow ice, then boil+filter
  - collector of condensate early in the morning? (in desert)
  - drill underground water
  - collect cacti in desert, use squeezer to get cacti juice, filter it to get water?

Food (need more here):
  - in forest/swamp/jungle: vegetables, fruits, animals. kill children of dangerous animals and get attacked by parents?
  - rocks + stone: - mushrooms in caves? animals may be?
  - desert: bugs? :)

  - solar panels in desert
  - wind generators in rocks?
  - oil refining and combustion engine+generator if there is source of oil (or natural gas)
  - bioreactor that generates methane (combustion engine+generator) :)

Probably it's better to do one thing at a time. I'll post ideas about production chains for plating and fuel rods once things above are settled.

7DRLs / High Tech Survival - 7drl 2015 - Success?
« on: March 19, 2015, 05:04:18 PM »
On the last day of challenge motherboard of my PC was struck with a thought - "Damn, it's 3 weeks till the end of the warranty. And I wasn't repaired/replaced even once!"
In service they said that I can take it back on next day. On next day it was next day again. And again. And only today I've got it back.
I decided not to announce success/failure before I checked that hard drive is ok.

Download link 1:

Why question mark in the subject? Well... I had to cut a lot of features. Why still 'success'? It was quite big list of features, and looking
back I'm quite happy with what was implemented.

So, the game.
In this game you play as space maitenance engineer who
managaed to screw coordinates for hyper jump and ended
up in the atmosphere on an unknown planet.
Automatics prevented destruction of the ship,
but titanium plating was badly damaged and most of the
fuel of reactor was burned during emergency landing.
Luckily computer managed to find a spot where materials
required for repairs and refuling are not too far.
With your advanced engineering space suite you can survive!

The idea was to generate some randomized environment where you have to survive.
Temperature, oxygen, satiation and hydration are all tracked and must be maintained.
Depending on environment and conditions different strategies must be used.
Different types of temporary energy generation, food, water and oxygen sources...

What was implemented:
  • virtually unlimited terrain with generation on demand
  • day/night cycle
  • global/local light with tinting, like colors are a little reddish on sunrise and purplish on sunset.
  • tracking of temperature and oxygen in enclosed rooms
  • power cables and pipes connections
  • crafting with different machines
  • you can die from many different things
  • you can win

What went wrong:
  • not enough time :)
  • logical errors in original design document. I wasn't able to find workaround quickly
  • I started with little things. When I reached complex things I had lots of half-assed solutions that weren't good enough for complex things...
  • as a result of previous point there are some things that have no use in the game. Like manual pump and barrel. But no liquids to use them with.
  • because of broken PC the game lacks some final polish and balancing. Well. it's completely unbalanced. On easier side though.

Result? Can't say it's very interesting... But there is quite complex simulation to look at.
For example all devices in the ship are connected to electric grid and consuming power.
Reactor fuel feed is connected with reactor core and fuel rods are 'fairly' transferred there.

p.s. Inspired by Factorio and techical mods for MC, and crashlanding modpack :)

p.p.s. Like my 7drl 2014, this game is mostly written in Zorro programming that I created and working on.
You can look into source code in game subfolder.
.exe file is just a scripting host that exposes pseudo-console api, 'Map' class and some other utilities.
This week gave me quite big backlog of bugs to fix :)

Design / on melee combat
« on: December 19, 2013, 04:37:17 AM »
Yesterday white trying to fall asleep I've got some vague idea on how to improve melee combat.
Now it doesn't look as fascinating as yesterday, but I'll write it down, just in case.

On first 'bump to attack' you enter combat mode. In combat mode each turn takes two keypresses.
One for attack and one for post-attacks-stance (or exiting combat mode).
If the enemy is to the north of the character then:
up is top-down slash
up-left is slash from left-top to bottom-right (if looking from character's perspective).
left is horizontal slash from left to right
up-right and right similarly.
post attack stances:
up - aggressive close attack stance. next attack might deal extra damage, also bonus damage dagger as secondary weapon.
up-left - attempt to evade attack from the right
left - I don't know :) probably attempt to evade attack from left and forward, but cost more stamina then up-left.
wait - prepare to block/parry incoming attack
up-right and right similarly.

down is to exit combat mode and try to retreat.

evasion might drain less stamina then blocking/parrying, and doesn't reduce durability of weapon(s)/shield,
but if you try to evade in wrong direction, you'll get extra damage.

This might work well if lesser enemies will have some randomly generated attack pattern (one pattern for one kind of enemies).
Stronger enemies might alternate between 2-3 attack patters.
Even stronger enemies might sometimes randomly switch pattern right in combat.
Something like this.

Programming / Legalized items/exp farming
« on: October 24, 2013, 03:40:30 AM »
A lot of authors are trying to prevent players from farming. Sometimes this includes artificial limitations and not very logical/interesting mechanics.
But what if instead of preventing farming, you allow farming as integral part of the game.
For instance - you need 20 bat wings for quest or may be crafting recipe.
You go to the cave in appropriate equipment, with enough healing potions and food.
Than press 'f'arm key, enter end conditions and wait a little, while AI kills bats all around the cave.
The same with exp. You need a little till next level. You know that you can kill monsters
in this area relatively easily. Why not 'f'arm till level up then?

Programming / cfov
« on: May 10, 2013, 01:47:38 PM »
Hello there.

When I was playtesting Tetrogue I found one strange bug in a fov.
I'm using non-recursive shadowcasting implementation.
I tried to fix the bug, but I understood that I have no idea how this algo actually works, despite the fact that I wrote it several years ago. Well, I understand how it is supposed to work, but actual implementation has a lot cryptic flags and variables.

I looked at mrpas. The idea is pretty simple. But actual implementation is not really easy to understand.
While I was thinking about mrpas, I've got an idea.

And this idea is so straightforward, that I don't really understand why I haven't heard about algo like this.
So, here is idea:
The algo requires precomputation. Data for rings up to max sight range radius must be precomputed.
Ring of radius r is set points x,y such that:
floor(sqrt(x*x+y*y))<=r and that point doesn't belong to any ring with radius less than r.
Note, that x*x+y*y<=r*r is NOT equivalent to what I wrote above.
In addition to x,y following info is stored:
indexes of corners that create shadow
octant index of the tile (and second index if tile belongs to two octants).
Actually precomputing this is not strictly necessary, but making these calculation in runtime is not very efficient.
On this image:

indexes of corners that create shadow are 1 and 3.
i.e. lower left corner is 0, lower right 1, upper right 2, upper left 3.

The actual fov calculation works like this:
For each octant there is a list of tiles that block vision.
For each blocking tile starting and ending angles are stored.
Rings from 1 to max sight range are enumerated.
For each ring tiles in this ring are enumerated.
Each tile is checked if it is shadowed by one of blocking tiles in an octant.
If tile is completely shadowed, it is skipped and next is checked.
If current tile is blocking vision and partially shadowed, it is considered visible, and is added to the list of blocking tiles.
If current tile is transparent then it is considered visible if:
at least 50% of it's angle range is visible or at least 20% of it's angle range is visible and median angle is in visible range.

That's all.
Well. Almost. We haven't used corners indexes yet.
Indexes of corners are required to properly implement vision thru diagonal tiles.
Blocking angles of tiles corners that are dungeon corners can be reduced.
Like here:

Here only 60% of possible blocking angle range of corner is used.
This creates diagonal view like here:

So, what are benefits of this algo?
It is reasonably fast. On my PC 1000 fov calculations of range 15 takes around 100ms.
It looks more or less ok. :)
Using this algo it is possible to implement following features almost for free:
 - temporal blockers, to simulate something like bushes, where you can't see several tiles behind the bush, but can see further.
 - delayed blockers, to simulate something like cloudy glass in a window, or low located window.
 - directional fov of arbitrary direction and angle range.

Here are samples and C++ implementation:cfov.
sampleDbg.exe is a little older implementation that shows some debugging information when clicking on tiles.
sample.exe have realtime directional fov mode. In samples green tiles are bushes, grey are windows.
Ah! Almost forgot. cfov stands for Circular Field of View :)
testmap.txt is editable, but the code that reads it is not really foolproof, so be careful.

Method generateFov is template and it's argument MapAdapter must implement following methods:
TileInfo getTile(int x,int y); - returns info about tile
void setVisible(int x,int y); - this one is called to report visible tiles.
int getWidth();
int getHeight();

Hm. Probably instead of getWidth() and getHeight() it is better to make method like:
bool isInside(int x,int y);

Whole CircularFov class is also template and it's parameter is some kind of Point class, that must have
at least members x and y and operator< (to be stored in the std::set).

This is first experimental implementation, so I guess it can be improved in many ways.
Suggestions are welcome.

Thank you for your attention.

7DRLs / Tetrogue and screen resolution
« on: March 28, 2013, 08:44:20 AM »
It looks like the game have some problems on smaller displays.
In conf directory there is tetrogue.ini
You can add following parameters:
Code: [Select]
screenWidth=<your display resolution width here>
screenHeight=<your display resolution height here>
to make it run in fullscreen. It might improve playing experience a little.

Also, some additional controls:
Alt-C will center character on the screen.
Ctrl-G to travel to distant point with keyboard.

Crafting minigame is mouse only, sorry.
It possible to play the game with mouse only. Click and drag to scroll level.
Click on the ground to move there. Click on the enemy to attack. Click on the character when standing on stairs to travel to next level.
You only need keyboard to enter the name and exit from the game.

Traditional Roguelikes (Turn Based) / 7DRL Success: Fragile Wrath
« on: March 20, 2012, 06:23:03 AM »
Win32 and Mac OS X intel x86 binaries are available here:

To Mac OS X users: do not try to run it from dmg. Copy it to
writable directory please.

To Windowns users: the same request, copy it somewhere where it
can create file in own directory.

To Linux users: I have used some C++11 features in the code, but
the only available to me linux box has too old compiler.
It is possible to compile the game under linux.
I just can't do this at the moment.
Win32 version probably will work with wine.

This is an attempt to bring beat'em'up spirit into roguelike.

Here are short instructions:
Technically you have only one hit point.
But your attacks do paralyze demons for several turns.
While demon is white - it is paralyzed.
When it is black - it is ready for attack.
There are three combo meters:
wrath - filled while attacking
move - filled while moving
zen - filled while standing still
combo moves for last two combo meters are not available at start and
must be unlocked with items.
It is relatively simple to just kill demons, but you need to collect
soul shard that they drop upon death. You need shards to unlock new
wrath combos and upgrade old.

I had to cut a lot of features in order to complete it in time.
But as a playable proof of concept it is success.
IMO gameplay like this should revolve around ambush-like behavior of monsters.
I had in plans 4x4 boss with some randomly generated movement and
attack patterns. But failed to fit it in time frame.

Have fun and good luck!

Programming / rl oriented scripting language features.
« on: June 17, 2011, 01:22:14 PM »
What features in the scripting language can make development easier?
Beside all the basic stuff that most of scripting languages have.

Something that can't be done on a library level.

Probably some kind of high level rules matching for advanced AI?
Some advanced algo that would be much easier to use when it is built in into engine
rather than when it is exists as external lib?

All ideas are welcome :)

Programming / idea about mana
« on: April 11, 2011, 01:14:04 PM »
Let's say our wizard has 100 mana.
He casts a spell that cost 40 mana and has 'return delay' equal to 6 turns.
'return delay' is number of turns after which mana spent for spell returns to pool.
So after 6 turns wizard's mana pool will be increased by 40.
Buff spells will reserve part of mana pool which is returned when buff is turned off/dispelled.

Traditional Roguelikes (Turn Based) / 7DRL - Monster Slayer Show
« on: March 13, 2011, 10:37:59 AM »
Simple score based rl.
It's relatively easy to win, but much harder if you want to score a lot :)

current highest score is 997 by JustHarry!

upd: mac os x and linux versions. win32 version fixed. If it didn't work, give it another try please.

Off-topic (Locked) / Kingdom of Loathing
« on: September 23, 2010, 02:43:08 PM »
Anyone playing KoL?
It's really fun turn based browser rpg game :)
Somewhat multiplayer.

It's really hard to describe it.
Classes, items, quests, everything is hilarious.

Traditional Roguelikes (Turn Based) / Wizard's Quest 0.8.1
« on: May 05, 2010, 07:25:17 AM »
Versions for windows, mac os x and linux can be downloaded here here.

Code: [Select]
- tutorial added to main menu!
 - % of gained experience till next level is displayed now (for character and spells).
 - bindings config now available. Bindings help on ? improved.
 - ascii binding added to avoid ? and <> confusion on some national keyboards.
 - new item - Purifying sphere. Can remove all effects and protect from further
   effects for short duration.
 - new perk - Freezer.
 - interupting spell effects now properly stacking with each other.
 - quick hp display improved.
 - cooldown window now have 3 states (right, left, hidden).
 - in-game help now available in game menu.
 - now bumping into monster will cause attack with staff/orb.
 - now if current directory is read-only, all data stored in player's home directory for unix users (~/.wq),
   and local profile for windows users.
 - now it is possible to assign several spells to single hotkey.
 - staff master perk reworked.
 - new dungeon object - magical forge. Can interchange magical
   properties of two items.
 - armor property of body armor is 'base' now.
 - healing potion removes deep wounds now.
 - crystal walls on levels 20-24
 - bloody walls and floor on lvl 25
 - significantly boosted hp of monsters on levels 15+.
 - some changes to monsters AI and stats.
 - now it is possible to attack in direction with staff/orb.
 - immobile enemies can't dodge.
 - arrows of archers are arrows now (visual)!
 - more damage stats are gathered.

Programming / libtcod+lua
« on: March 30, 2010, 11:00:15 AM »
Anyone interested in libtcod enabled lua scripting host?
i.e. application that can run lua scripts and have built-in support of libtcod.
I even have 'walking @' with fov demo in lua :)

It's completely standalone (beside libtdoc and SDL runtime).
It's probably good for prototyping... if you know lua :)

Traditional Roguelikes (Turn Based) / 7DRL: Dungeon Sweeper
« on: March 17, 2010, 07:19:48 AM »
I finally got some time to play my own 7drl and managed to win it.
Downloads: win32, linux and osx.
Not every attempt is winnable I guess.
But game is rather short - 10-15 minutes I think.
So several attempt are not too time consuming.

Actually it's more of 5drl, than 7drl.
1st day I spent prototyping 2 other ideas I had.
1st idea was suggested by my friend.
Kind of ZombielandRL. The trick is - you constantly move to
the right. And there is horde of zombies to the left.
ANY successful attack of zombie and you are part of them.
Idea was to make some limited use items like shotguns and pistols
+terrain (climb on the roof of bus, roll under fallen tree, etc),
+some special abilities like long jump, wall jump, mb some kicks and punches.
But when I made simple prototype, I found that it's very hard to balance difficulty.
You need some kind of AI director to make up situations where player can barely
escape zombies if doing things right. I decided that there is high chance to fail
to do this in 7 days (along with the remaining work).
Next idea was RGBRL. Enemies of 7 main color (R,G,B,R+G,R+B,G+B,R+G+B),
and various color changing tools - mirrors, filters, prisms etc.
But what is good for puzzle isn't good for roguelike.
I failed to think a way of convenient controls for all this things.
I made some kind of arena where you can place all this items,
and than monsters are coming from different sides, you supposed to lure
them in specific spot and kill with corresponding light.
But it failed in practice.

Than I came up with idea of Dungeon Sweeper.
Formula of the game is Desktop Dungeon+Minesweeper+PuzzleRogue.
You can see sum of levels of monsters in adjacent cells.
By analyzing this numbers you can find monster of your level and attack it,
probably using some of spells prior to this.
Most popular choice is sleep. If you know where monster is for sure
and know it's level - you can put it to sleep than close in and make blow first.
If you carry some weapons and monster is not +2 levels from you,
you can kill it with one blow, thus avoiding taking any damage.
Other available spells are:
Reveal - you need to select at least monster level/2 power level of spell to successfully reveal monster.
Pull/Fetch - move things around. For items max distance if equal to power level.
For monsters max distance is equal to power level/level of monster.
Pulled monsters become aggressive.
And finally - Invisibility. In order to successfully hide from monster power level of invisibility
must be greater than level of monster!
That makes things a little more difficult at last level with lvl9 monster,
since max power level of spell is 9. You can't hide from lvl9 monster.
But you still can put it to sleep. Attacking monster will break invisibility.
Mana spent is equal to power level used for all spells.

Because there is a lot of information to be displayed for each cell,
I decided to use graphical backend. When I tried to draw some tiles,
I figured out that pixel artists are indeed masochists.
There is very little pixel art oriented software.
And everything I tried is either bugged or not too convenient (for pixel art).
Best thing I found is pixen. But it is crashing time to time.
After I done some basic framework, I've spent 3 evenings drawing tiles.
Actual game was written in 2 days of rush coding.
I had around 2 hours to balance things a little.
I managed to make game more or less challenging and winnable,
but there are some useless items - rings of fire and cold.
It's much easier to put wizards to sleep and one shot kill'em,
than spend time with rings.
Probably ring is required if main boss (lvl10 monster) is wizard.
Shield also not too useful until lvl3 of dungeon.
Ah! Main task in a game is to clear 3 levels of dungeon of monsters.
You advance to next level once you kill all monsters on current one.
There are a few quickly done achievments to accomplish.
One of them is really hard.
Experience system was borrowed from POWDER.
You need to collect 100 exp to advance to next level.
Killing monster of your level gives you 10 exp.
If monster is 1 level higher than you - 15 exp.
If monster is 2 levels higher than you - 20 exp.
There are 10 lvl1 monsters, 10 lvl2 monsters and 10 lvl3 monsters on 1st level.
So you are guaranteed to be lvl4 by the end of first level of dungeon.
Actually it's not much of a dungeon. 15x15 field with a few walls :)
At lvl1 things may be somewhat hard until you find amulet of protection from poison.
Than you can easily kill snakes and eat poisonous corpses.
Ah! Items!
There are only 3 slots for items. Items are picked up automatically.
Once all 3 slots are full - next picked item will discard first picked item.
i.e. item will be lost!
Potions, food and corpses are consumed automatically.
Beware of poisoned corpses!
Corpses of wizards restore mana.
Corpses of kobolds are not edible at all!
If at starting location you are surrounded by lvl2+ monsters - use invisibility to sneak past them.
When 1 turn of invisibility is remaining - you can recast it without being noticed by monsters.
Healing potions can cure poison. Wielding amulet of protection from poison when already
poisoned also removes poisoned status.

Known bug on macosx version: backspace is not working. sorry.

Once I'll get some free time I'll probably make new version with
races and classes, with more balanced items and monsters,
and much more achievments :)

Good luck and have fun!

Programming / Walls
« on: March 02, 2010, 08:52:39 AM »
At some point I decided to add different types of walls in Wizard's Quest.
Just to make progress visible, and to add some variety.
First decision was simple: starting from first levels with undead enemies walls are moldy.
On next set of floors there were no enemies with some specific trait.
So I came up with 'wet' walls. Not so uncommon in mines.
Along with wet walls there are puddles.
After wet walls there are walls ... covered with fluorescent mushrooms :)
You can see the wall itself in darkness, but not the floor near it.
And than ... I ran out of ideas.
I have 3 main colors left: red, yellow and purple.
Red color I reserve for bloody walls of final level.
So, yellow or purple.
Sandstone can be yellow, but it's not very common as a walls material in mine. AFAIK.
Purple... mb walls covered with mystic runes or something like this.
And some random special effects when player is wondering around. Horror style.
Can't decide.
Any good ideas?

Pages: [1] 2