aliens

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.


Messages - Nikita_Sadkov

Pages: [1] 2 3 ... 20
1
Offtopic / Warhammer 40k The Animated Series
« on: April 23, 2020, 06:27:25 pm »
Apparently crowd-funding works.


2
Offtopic / Re: XCOM Inspired Fantasy Game
« on: April 21, 2020, 06:51:03 am »
That's a lot of boots
That is a movement map. Boot icon means that the picked unit will be moving on land. There is also a wing icon, which hints the unit will be moving by air. When unit has to swap places with another unit, there is a swap icon. When unit has to jump down taking fall damage, there is a fall icon. Etc...

Alternative would by highlighting walk-able cells, which is a bit less robust solution, especially if the cell is transparent/invisible - there will be nothing to highlight. Final Fantasy Tactics games instead palce square movement square, but these don't look nice with sloped terrain, and are a bit more scifi-ish.

One thing I don't like: the sprites for the ground make it harder to know what is in front/back.
These are old screenshots.

Finally implemented the world map save/load. For example the save game for the map below would look like https://pastebin.com/ppFerZWH

It is a bit lispy and uses Symta's read/print to parse the save. Still needs some formatting to look nicer since Symta supports less cluttered syntax inside the Lisp-one. Then again, these maps are not really made to be directly user-editable for now, and there will be a proper adventure editor with ability to use a hand drawn map provided by user, instead of the generated one. That way one could quickly import say a Middle Earth map from google image search, setup terrain and make some adventure on it.


3
Offtopic / Re: XCOM Inspired Fantasy Game
« on: April 16, 2020, 05:33:31 am »
A little playtesting has shown that my initial idea with castle garrison intercepting city plundering was flawed. Since each city should have scouting range, allowing garrison to react properly. And plunder has little value beside killing city dweller and plundering the wealth, so attacker has little reason to do it, give there are enough strength to start castle siege.

Now defending player can also pay dweller to help defending the castle (which is cheaper than hiring them long term). But if the attacker has previously plundered the city, there will be no such mercenaries.

Anyway, the city can also be plundered by a thief unit, like halfling.

So yeah, there is no special interception mechanics now at all. Guess the game became less XCOM. Although there is an option of breaking out of castle siege, which would be similar to XCOM operatives getting into Skyranger and evacuating into a reserve base.


4
Programming / Re: Magic & Mayhem Engine Open Source Clone
« on: April 09, 2020, 10:37:35 pm »
Ever considered uploading on bitchute or vlare.tv?
neither of them would give a crap about what a big bad bank wants, and it sounds like an important thing to have out there.
I don't really care anymore and I will try getting out of Ukraine when the quarantine will be lifted. PrivatBank was once private (therefore the name), but then the government nationalized it, and it turned into an even bigger mess (because the private owner actually cared about his bank's services). Basically Ukrainian government uses some non-free-market policies even today long after 2014. On the other side, Russian Sberbank is still freely operates in Ukraine, despite the pure ideological reasons to shut it down or at least convince to change the name, associated with the USSR and the Russian Empire financial systems.

5
Programming / Re: Magic & Mayhem Engine Open Source Clone
« on: April 09, 2020, 10:29:40 pm »
I have successfully managed to re-create the sprite extraction routine as a JavaScript plugin which is more suited to my use case. I have uploaded it here.

Massive thank you to Nikita_Sadkov again for sharing your work.

@Nikita_Sadkov: would you object to me including the C files in the repository for the sake of posterity? I would of course make sure it's clear that you're the author.
I'm completely fine with that. SAU project has the MIT license: https://en.wikipedia.org/wiki/MIT_License

6
Resources / Re: UFO aliens using breathing equipment underwater.
« on: April 09, 2020, 07:37:03 pm »
Not directly - there's nothing in the engine that designates something as 'breathing equipment', just some bubble sprites drawn on units when you decide the mission is 'underwater'.

You can write some scripts to simulate it though - setting energy/stun/HP changes per turn related to taking damage, or even primary stat penalties like accuracy loss. It'd take quite some work to communicate these things visually to the point a player could easily say, "oh, looks like the breathing equipment is malfunctioning" though.
BTW, why not give all underwater aliens the ability to swim? (and maybe some floating animation when they are above the soil). It is a bit strange how they are magnetized to the soil. Maybe with some handicaps, like spending full movement to change Z levels for non-amphibious units without a jetpack. Then there could also be several grades of swim equipment.

In addition there could be maps with both underwater and above water segments. Like say a sewer or a shore map.

I think underwater mechanics could be greatly extended and improved. Since originally MicroProse made the game in a few months, without the time for any changes to the game logic.


7
Resources / Re: UFO aliens using breathing equipment underwater.
« on: April 09, 2020, 05:34:43 pm »
Now is there a way to target the breathing equipment, or it starting to malfunction after an explosion? The result will be either direct damage to aliens or the reduction of their abilities.

8
Offtopic / Re: XCOM Inspired Fantasy Game
« on: April 09, 2020, 05:27:52 pm »
I've decided to rethink the ship sailing mechanics. There are several options
1. When a party visits a city with a shipyard, it can buy/rent a ship. Such ship will be shown like a usual roster unit, but wont be present in battle. It will have an inventory, which could only be accessed while in sea. Such ships can be traded between parties. This system still doesn't accommodate for a ship being bound to some single sea. But it is, well, simple.
2. Warcraft 2/Heroes of Might & Magic system. Like above, but the ship will be left on in the sea, when party disembarks. This system accommodates for several seas. Yet since the world map is randomly generated, it is not that useful and makes AI much harder to implement. Both Warcraft 2 and HOMM games had notoriously bad ship AIs (proper AI requires building a zone connectivity graph). And it resulted in a few crazy twists, like some party ending up landlocked, after its ship gets stolen or sunken. In HoMM games there is a low level spell "Scuttle Boat", which was used to trick and landlocked larger AI armies. I still don't get why one needs magic to damage a ship :D Many HoMM maps explicitly relied that the player will seize a boat from a disembarked AI party, which in some cases got stuck in a loop and failed to disembark (or disembarked at a wrong place), soft locking the whole game.
3. Some games, like Ogre Battle and Warlords, allow parties entering the sea even without a ship, but greatly slow down the movement, unless the party has some flyer or ship like units (i.e. octopus).

So yeah, picking anything here is a trade-off.

9
Offtopic / Re: XCOM Inspired Fantasy Game
« on: April 06, 2020, 03:57:40 am »
An XCOM-like game obviously needs some artillery unit. I made a cannon sprite. But a cannon all by itself without a cannoneer looks silly. So I used previously scrapped gremlin sprite. Hope it looks passable now.

That gremlin is obviously hard coupled with the cannon. But allowing turrets to be operated by any humanoid can be a nice idea too, albeit a bit hard to implement. Especially for AI. I still plan adding mounts for some humanoids.

BTW, many games like Age of Wonders, Age of Empires and all Warcraft have possessed catapults moving without any service units. Warcraft 2 ones are provably possessed since they have "inorganic" property, meaning life drain doesn't work on them.

On the other hand a few classic games like Z and Fallout Tactics had explicitly manned vehicles and turrets. In Z that was a major feature with many maps featuring a race to capture unmanned vehicles.



10
Offtopic / Re: Recommended method(s) for offline file storage?
« on: April 05, 2020, 04:02:20 am »
Here, a German guy wrote on a social network that Coronavirus doesn't exist:
https://bnn.de/nachrichten/suedwestecho/demo-aufruf-gegen-corona-auflagen-mann-vorlaeufig-festgenommen

All electronics at his family's apartments got confiscated. That obviously includes USB sticks.

So yeah, be careful with what you store offline - all of your work can be lost to a zealous police ride over some online joke you made 10 years ago.

Same with your savings. If police gets after you, they will first of all block all your bank accounts (they can block accounts in foreign banks too, through Interpol and cross-government agreements). During the home search, cops can confiscate any valuables you have at home "to prevent you from committing further crimes". So the only way to secure your savings would be cryptocurrency. Although there are also blockchain filesystem, which you an use to save important things by paying in cryptocurrency.

11
Offtopic / Re: This engine should be a xcom sequel
« on: April 04, 2020, 11:26:00 pm »
Found it! His engine has far nicer landscape:


12
Offtopic / Re: This engine should be a xcom sequel
« on: April 04, 2020, 11:12:28 pm »
There were countless of such voxel engines already. Most made by single-man team. Starting with the voxlap engine by Ken Silverman (programmer behind Duke Nukem engine). That "unlimited detail" engine was also similar to voxels, but with nearest neighoubr/point cloud instead (a far smarter approach without nasty blockiness).  Unfortunately as of yet nothing really came out of them without large funding, beside the unlimited detail engine, which was used for theme parks attractions. There was a nice open source isometric voxel engine actually suitable for an XCOM somewhere at github (it even had character animation system), but its author apparently got overwhelmed with real life problems and too ceased working on it.


For example...

11 years ago (engine is much older):

5 years ago:

Unlimited Details now:

13
Offtopic / Re: Recommended method(s) for offline file storage?
« on: April 04, 2020, 10:49:40 pm »
I use external USB drives. And still I would advice you against offline storage. When I was charged with the "hate speech" crime in Russia, all my laptops, phones, storage device and paper notes were confiscated as "the tool of the crime". Except for a single USB drive (fortunately having all my backup source code), which was hidden and wasn't found during the search by lazy FSB operatives. Also, if cops find any password protected files, they will likely apply torture to you until you tell them the password.

Since one of the confiscated textbooks had online passwords written in, I had to change all my passwords for all sites or create new accounts. You may ask how did I managed to evade the jail and left Russia in a single piece? Using bribery obviously. But it was just impossible to bribe them into getting back my computing devices.

So yeah, it is a good idea to learn the usage of anonymous online storage services. Steganography in addition to encryption wont hurt either. Some people suggested uploading a popular porn movie with your data hidden inside into the ed2k network. Then it will persist until the extinction of humanity :D

Then again, if they kill you in prison or during interrogation, you wont need your data afterwards ;) Everything is temporary in this World, so a Buddhist approach of not holding to the things could also work well.

You probably think that it will never happen to you, because you have no problems with police. But they may charge you by mistake or if your room mate or relative gets in trouble with government - they will confiscate all devices in the vicinity, without asking about ownership. Then there are such things like fires and floods.

IIRC, all storage and trust services are required by law to be non-anoymous. But you can still hide your storage device in some forest. Just watch for forest guards. If they find you hiding something, they will call police outright.

14
Fan-Stuff / Re: The X-Com Files Operations Manual
« on: April 03, 2020, 06:50:27 pm »
Unfortunately dropbox has no linewrap and to download a txt file you need to have an account. Maybe you can re-upload it to a better site or attach to your top post?

15
Programming / Re: Magic & Mayhem Engine Open Source Clone
« on: April 01, 2020, 01:47:50 am »
Wow, that sounds like a lot of hassle. Do you still share your code online anywhere (e.g. GitLab, SourceForge)?
In future I will setup a personal site written in my own programming language - Symta, which is especially geared towards the shared nothing architecture.

I just noticed that fmt_spr.c requires the file "common.h" in order to be compiled. I'm new to C programming, but I'm guessing that's a custom file you made which contains helper functions (such as "times" and "picNew")? Could I trouble you once again and ask for this file?

The .cfg decrypter works perfectly, so thank you again for that.
Yeah. common.h/common.c files typically have stuff used by other C files.

Code: [Select]
#ifndef COMMON_H
#define COMMON_H

#include <stdio.h>
#include <stdlib.h>
#include <stdarg.h>
#include <string.h>
#include <ctype.h>
#include <time.h>
#include <unistd.h>
#include <sys/stat.h>
#include <sys/types.h>
#include <dirent.h>
#include <assert.h>
#include <math.h>

typedef void u0;

typedef unsigned char u1;
typedef unsigned short u2;
typedef unsigned int u4;
typedef unsigned long long u8;

typedef signed char s1;
typedef signed short s2;
typedef signed int s4;
typedef long long s8;

typedef float f4;
typedef double f8;


static s2 s2le(u1 *P) {return (P[1]<<8) | P[0];}
static s4 s4le(u1 *P) {return (P[3]<<24) | (P[2]<<16) | (P[1]<<8) | P[0];}
static u2 u2le(u1 *P) {return (P[1]<<8) | P[0];}
static u4 u4le(u1 *P) {return (P[3]<<24) | (P[2]<<16) | (P[1]<<8) | P[0];}

static s2 s2be(u1 *P) {return (P[0]<<8) | P[1];}
static s4 s4be(u1 *P) {return (P[0]<<24) | (P[1]<<16) | (P[2]<<8) | P[3];}
static u2 u2be(u1 *P) {return (P[0]<<8) | P[1];}
static u4 u4be(u1 *P) {return (P[0]<<24) | (P[1]<<16) | (P[2]<<8) | P[3];}

static u8 _ru8_tmp;
static u4 _ru4_tmp;
static u2 _ru2_tmp;
#define ru8(X) (_ru8_tmp = *(u8*)X, X+=8, _ru8_tmp)
#define ru4(X) (_ru4_tmp = *(u4*)X, X+=4, _ru4_tmp)
#define ru2(X) (_ru2_tmp = *(u2*)X, X+=2, _ru2_tmp)

#define ru4be(X) (_ru4_tmp = u4be(X), X+=4, _ru4_tmp)
#define ru2be(X) (_ru2_tmp = u2be(X), X+=2, _ru2_tmp)

#define unless(x) if(!(x))
#define times(i,e) for(i=0; i<(e); i++)
#define n(Type) ((Type*)memset(malloc(sizeof(Type)), 0, sizeof(Type)))
#define ns(Type, Sz) ((Type*)memset(malloc(sizeof(Type)*(Sz)), 0, sizeof(Type)*(Sz)))

static void s2bePut(u1 *P, int V) {
  P[0]=(((u4)V>>8)&0xff);
  P[1]=(((u4)V)&0xff);
}

static void s4bePut(u1 *P, int V) {
  P[0]=(((u4)V>>24)&0xff);
  P[1]=(((u4)V>>16)&0xff);
  P[2]=(((u4)V>>8)&0xff);
  P[3]=(((u4)V)&0xff);
}


typedef struct {char *Root; int Size; char **Names;} fileList;

typedef struct pic pic;
struct pic {
  char *N;      // name
  int C;        // compression (0=uncompressed, 1=grayscale, 2=RLE)
  int W;        // width
  int H;        // height
  int B;        // bits per pixel
  int I;        // bytes per line
  int S;        // compressed/uncompressed size of D
  int K;        // color key (-1 means no color key)
  int BK;       // bounding key (for selection)
  int SK;       // shadow key (for shadow)
  int X;        // X displacement
  int Y;        // Y displacement
  int BoxW;     // bounding box width
  int BoxH;     // bounding box height
  int Delay;    // animation delay
  int SharedPalette;
  u1 *P;        // palette
  u1 *D;        // pixels
  pic *Proxy; // this pic acts as a proxy, for other pic.
};

typedef struct {
  int NPics;
  pic **Pics;
} fac;

typedef struct {
  char *Name;  // animation name
  int NFacs;   // number of faces
  fac *Facs;   // faces
} ani;

typedef struct {
  int ColorKey;
  u1 *Palette;
  int NAnis; // number of animations
  ani *Anis;
} spr;




// misc utils
static int max(int A, int B) {return A>B ? A : B;}
static int min(int A, int B) {return A<B ? A : B;}
void hd(u1 *P, int S); // hex dump
char *downcase(char *t);
char *upcase(char *t);

// filesystem utils
int fileExist(char *File);
int fileSize(char *File);
int folderP(char *Name);
int fileP(char *Name);
char *loadFile(char *name);
void removeFile(char *fn);
void tmpName(char *rn, char *pat);
char *shell(char *fmt, ...);
void makePath(char *Path);
void *readFile(u4 Offset, u4 Length, char *FileName);
int writeFile(u4 Offset, u4 Length, char *FileName, void *Data);
void pathParts(char *Dir, char *Name, char *Ext, char *Path);

// enumerates all files recursively, returns them in sorted order
fileList *getFileList(char *DirName);
void freeFileList(fileList *FL);

// Out image and sprite formats (should work as a common denominator)
pic *picNew(int W, int H, int BPP);
void picFree(pic *P);
pic *picDup(pic *P);
pic *picClear(pic *P, u4 V);
#define PIC_FLIP_X 0x01
#define PIC_FLIP_Y 0x02
void picBlt(pic *Destination, pic *Source, int Flags
           ,int DestinationX, int DestinationY
           ,int SourceX, int SourceY
           ,int BlitRegionWidth, int BlitRegionHeight);
spr *sprNew();
void sprDel(spr *S);
pic *picProxy(pic *Src, int X, int Y, int W, int H);
void saveFrames(char *Output, spr *S);
spr *loadFrames(char *DirName);
void picPut(pic *P, int X, int Y, u4 C);
void picPut24(pic *P, int X, int Y, u4 C);
void picPut32(pic *P, int X, int Y, u4 C);
u4 picGet(pic *P, int X, int Y);
u4 picGet24(pic *P, int X, int Y);
u4 picGet32(pic *P, int X, int Y);

#define R8G8B8(R,G,B) (((R)<<16)|((G)<<8)|(B))
#define R8G8B8A8(R,G,B,A) (((A)<<24)|((R)<<16)|((G)<<8)|(B))

#define fromR8G8B8(R,G,B,C) do { \
  u4 _fromC = (C)&0xFFFFFFFF; \
  B = (((_fromC)>> 0)&0xFF); \
  G = (((_fromC)>> 8)&0xFF); \
  R = (((_fromC)>>16)&0xFF); \
 } while (0)
#define fromR8G8B8A8(R,G,B,A,C) do { \
  u4 _fromC = (C)&0xFFFFFFFF; \
  B = (((_fromC)>> 0)&0xFF); \
  G = (((_fromC)>> 8)&0xFF); \
  R = (((_fromC)>>16)&0xFF); \
  A = (((_fromC)>>24)&0xFF); \
 } while (0)
#define fromR5G6B5(R,G,B,C) do { \
  u4 _fromC = (C)&0xFFFF; \
  B = ((((_fromC)>> 0)&0x1f)<<3)|0x7; \
  G = ((((_fromC)>> 5)&0x3f)<<2)|0x3; \
  R = ((((_fromC)>>11)&0x1f)<<3)|0x7; \
 } while (0)
#define fromR5G5B5A1(A,R,G,B,C) do { \
  u4 _fromC = (C)&0xFFFF; \
  A = (_fromC)&1; \
  B = ((((_fromC)>> 1)&0x1f)<<3)|0x7; \
  G = ((((_fromC)>> 6)&0x1f)<<3)|0x7; \
  R = ((((_fromC)>>11)&0x1f)<<3)|0x7; \
 } while (0)
#define fromA1R5G5B5(A,R,G,B,C) do { \
  u4 _fromC = (C)&0xFFFF; \
  B = ((((_fromC)>> 0)&0x1f)<<3)|0x7; \
  G = ((((_fromC)>> 5)&0x1f)<<3)|0x7; \
  R = ((((_fromC)>>10)&0x1f)<<3)|0x7; \
  A = ((_fromC)>>15)&1; \
 } while (0)
#define fromA4R4G4B4(A,R,G,B,C) do { \
  u4 _fromC = (C)&0xFFFF; \
  B = ((((_fromC)>> 0)&0xf)<<4)|0xf; \
  G = ((((_fromC)>> 4)&0xf)<<4)|0xf; \
  R = ((((_fromC)>> 8)&0xf)<<4)|0xf; \
  A = ((((_fromC)>>12)&0xf)<<4)|0xf; \
  B |= B>>4; \
  G |= G>>4; \
  R |= R>>4; \
  A |= A>>4; \
 } while (0)

void rgb_to_hsv(u1 r, u1 g, u1 b, double *h, double *s, double *v);
void hsv_to_rgb(double h, double s, double v, u1 *returncol);

void pcxSave(char *File, pic *P);
pic *pcxLoad(char *File);
void pcxSavePalette(char *File, u1 *Palette);

void gifSave(char *Output, spr *S);
spr *gifLoad(char *Input);

void tgaSave(char *File, pic *P);
pic *tgaLoad(char *File);

void lbmSave(char *File, pic *P);
pic *lbmLoad(char *File);

void bmpSave(char *File, pic *P);
pic *bmpLoad(char *File);

void pngSave(char *Output, pic *P);

spr *impLoad(char *Input);
void impSave(char *Output, spr *S);

spr *mam_sprLoad(char *Input);

void mpqDecompile(char *OutDir, char *FileName);
void mpqCompile(char *FileName, fileList *FL);
// StormLib cant handle Warcraft 2 and Diablo MPQs
void mpqDecompileOld(char *OutDir, char *FileName, char *ListFile);

// zlib utils
u1 *inflateBufIE(int OLen, int Len, u1 *In, int IgnoreError);
u1 *inflateBuf(int OLen, int Len, u1 *In);

typedef struct {
  int L;  // length
  u1 *D; // data
} bytes;
void bytesDel(bytes *B);


void wavSave(char *Output, u1 *Q, int L, int Bits, int Chns, int Freq);

#define FMT_IMAGE     0
#define FMT_SPRITE    1
#define FMT_ARCHIVE   2
#define FMT_BYTES     3 /* plain raw buffer */
#define FMT_TEXT      4 /* plain text */
#define FMT_PCM       5
#define FMT_MIDI      6
#define FMT_2D        7 /* 2d vector graphics */
#define FMT_3D        8 /* 3d vector graphics */

#define MAX_FORMATS 4096

typedef struct {
  int Type;
  char *Name;
  char *Description;
  void *Save;
  void *Load;
  void *Compile;
  void *Decompile;
} format;

extern int NFormats;
extern format Formats[MAX_FORMATS];

extern char ProgDir[];
extern char ProgName[];

#endif


Pages: [1] 2 3 ... 20