61
Offtopic / Re: What happened to Blizzard?
« on: June 07, 2021, 05:49:41 pm »wow
Not just WoW, but the general bureaucracy, wrong priorities and mismanagement, resulting in key talents leaving or just losing passion.
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.
wow
No 100 + 1, you only get ride of driver. If we assume 24/7 then at max 100+5 will be replaced by one tractor. To replace million you need "million" tractors with or without AI.Given the auto-maintenance and manufacturing of the tractors, it will also get rid of the entire supply chain behind the tractor, and all the people servicing that chain (from hairdressers to house construction workers). That is what all these AI apocalypse movies are about. And large part of the world population is still employed in these basic easily automated jobs. I expect huge social unrest and the governments going even more nuts, before the humanity either collapses or evolves to the next stage with all the production automated.
Very cool -looks little bit like crazy mix of Xcom, Daggerfall and Star Wars
but need to say that this fighintg with plasma swords seems very repetitive...
MS created C++/CX or C++/WinRT that allow to interact with C# types (exactly with CLI). In theory this could work for Unity too.
At leasy you run pure C# code that simply call C++ dll using p/invoke.
In recent C++20 standers you could write something like this:Code: [Select]foo({.x = 5, .y = 6});
Thanks! I did play all the AoW (except 3) a lot actually. I am sorry about your refugee camp issues. It is a real disgrace that we in the West created so many, then handled the problem in such an inhuman way. I hope your situation will get sorted soon enough. In which country are you now? The Netherlands?Yeah. I'm in NL for now. I believe Age of Wonders developers are Dutch, and Dijkstra too!
Regarding selling your code, you can just call it an engine, and you should be able to do so, but with everyone using Gamemaker, Unity or Unreal Engine, it is harde to compete (the one I use, Moai, got completely destroyed by the competition of Unity, because it lacked tutorials, documentation, and things like the asset store, which come with a large user base).Well I doubt you can use C/C++ with Unity (it is C# only) and a macroprocessor is not really a video game engine, but a general text processing utility (like a regex library), which you can use for all sorts of things.
#count 0 //a variable like macro
#next() {#<count> #<count=#[count+1]>} // define a function like macro
next() //expands into 0
next() //expands into 1
That can also be used to implement gensyms in C/C++ void foo(int x, int y, int z) {...}
#foo(x,y=123,z=abc) foo(x,y,z)
now foo macro will supply the default values for y and z,foo(456,z=789)
too supply argument only for zNew C macroprocessor improvements over the original C preprocessor.
- Succinct declarations: instead of `#define PI 3.14`, we now have `#PI 3.14`
`#if #SYMBOL` instead of `#ifdef SYMBOL`
#once, instead of `#pragma once`
- Calculate arbitrary functions!
#fac(n,x) #if n>0 fac(#[n-1],#[x*n]) #else x #endif
fac(10,1) //factorial of 10
- Ability to redefine punctuation, like `+` and `-`, and to do it only in the
specific context of another macro.
- Nested macros with different scopes, just like normal C variables.
#x 123
x //expands into 123
#{
#x 456 //shadow the x defined above
#<x=#[x+1]> //increment x by 1
x //expands into 457
} //interior x gets out of scope
x //expands int 123
- No need to escape newlines with `\`:
#foo {
printf("hello");
printf("world");
}
- Much easier to use variadic args. For example:
#last([xs],x) x
picks the last element of the arglist.
- Macros can be defined anywhere, not just at the start of line.
For example:
#x 123
#y #z{456} x z
y
will expand into `123 456`
- Macros can be expanded inside of strings.
- Macros arguments can be inserted into strings:
#foo( x, y ) "#x+123+#y"
- Allows calling an external program with arguments. For example:
#+ -
#(echo "a+b")
will expand into `a-b`: first external `echo` command is called with "a+b"
Then then its stdout is being macroexpanded.
- Special builtin command #(say ...) printing to stdout. Useful for debugging.
- Nested / * * / comments.
- When a function-like macro invokation has no () arglist,
NCM takes as the arguments everything up to the newline or the //-comment
That would allow user the create elegant looking DSLs.
Or use NCM to preprocess assembly files:
#myopcode(a,b) {...}
xor ax, ax
myopcode bx, ax
- Available as a single header library and can be used to preprocess
other languages, like GLSL.
- Escapable comas in arg list.
- A way to change `#` to another character, if you use the macroprocessor to
preprocess a language where `#` is used for, say, comments.
- Auto adding extension ".h" to files without one.
- And much more!
Hey!
That's a pretty impressive game project! I really like the Amiga/Atari aesthetics, and the flooding is impressive!
I am working on another pretty different XCOM inspired fantasy game, and I decided to go with hexes for the same reasons you recommended them, more or less.
What triggered me the most with squares was that formations don't work if both sides are not facing each other from the main directions, which should happen a lot in a game with large maps and fog of war (because you cannot have proper Zones of controls with squares).
However, it has been a huge pain to make walls and buildings, so I am still really torn about the issue. It really makes the wall tiles hard to read in term of blocking movement and LoS.The NW->SE walls don't follow the hexagonal lines which causes all sort of issues.Spoiler:
I should have gone with natural caves instead of constructed walls.
So I am not sure you really were wrong about picking squares.
sym_t *pg_declof2(cnode_t *n) {
if (!n) return 0;
if (n->id == N_BLOCK) { //for GCC block expressions
return 0;
} else if (n->id == (IDENTIFIER|N_TERM)) {
sym_t *s = lookup(n->text);
if (s) {
return s;
} else {
return 0;
}
} else if (n->id == N_EXPR) {
return 0;
} else if (n->id == N_BEXPR) {
for (; n && n->id==N_BEXPR ; n = n->tail) {
sym_t *decl = pg_declof2(n->head);
if (decl) return decl;
}
if (n) {
return pg_declof2(n);
}
return 0;
} else if (n->id == N_DECL) {
return 0;
} else if (n->id == N_UNARY) {
char c = n->head->text[0];
if (c == '*') pg_declof_ptr_lv--;
else if (c == '&') pg_declof_ptr_lv++;
return pg_declof2(n->tail);
} else if (n->id == N_INDEX) {
pg_declof_ptr_lv--;
return pg_declof2(n->head);
} else if (n->id & N_TERM) {
return 0;
} else if (n->id == N_SIZEOF) {
return lookup("_cext__int");
} else if (n->id == N_CAST) {
cnode_t *type = n->head->tail;
cnode_t *decl = n->head->head;
yyltype_t loc;
memset(&loc, 0, sizeof(loc));
cnode_t *ident = cnode(IDENTIFIER|N_TERM, 0, 0, &loc);
ident->text = strdup("_cext__tmp");
cnode_t *d = cnode(N_DECLARATOR ,ident, decl->tail, &loc);
return push_decl(type, d);
} else if (n->id == N_LIT) {
if (n->head->id == (I_CONSTANT|N_TERM)) {
return lookup("_cext__int");
} else if (n->head->id == (F_CONSTANT|N_TERM)) {
if (n->head->text[strlen(n->head->text)-1] == 'f') {
return lookup("_cext__float");
} else {
return lookup("_cext__double");
}
} else if (n->head->id == (STRING_LITERAL|N_TERM)) {
return lookup("_cext__char_ptr");
} else if (n->head->id == N_SIZEOF) {
return lookup("_cext__int");
}
return 0;
} else if (n->id == N_DOT || n->id == N_ARROW) {
sym_t *s = 0;
int sptr = pg_declof_ptr_lv;
pg_declof_ptr_lv = 0;
sym_t *l = pg_declof2(n->head);
int expr_plv = pg_declof_ptr_lv;
pg_declof_ptr_lv = sptr;
if (!l) goto dot_end;
char *name = n->tail->text;
char *tname = pg_typename(l->type);
if (!tname) goto dot_end;
char *mname;
int plv = ptr_level(l->decl) + expr_plv;
if ((n->id == N_DOT && plv != 1) || (n->id == N_ARROW && plv == 1)) {
mname = sjoin3(tname, "_mf_", name); //field accessor
s = lookup(mname);
free(mname);
goto dot_end;
}
mname = sjoin3(tname, "_m_", name);
s = lookup(mname);
free(mname);
dot_end:
return s;
} else if (n->id == N_CALL) {
if (n->head->id != N_DOT) return pg_declof2(n->head);
n = n->head;
sym_t *l = pg_declof2(n->head);
if (!l) return 0;
pg_declof_ptr_lv += ptr_level(l->decl);
char *name = n->tail->text;
char *tname = pg_typename(l->type);
if (!tname) return 0;
char *mname;
sym_t *s;
mname = sjoin3(tname, "_m_", name);
s = lookup(mname);
free(mname);
if (s) return s;
return 0;
}
return 0;
}