zombe on 25/6/2013 at 21:01
Quote Posted by icemann
In an old school kind of way I like coding for the sake of coding / learning things the hard way.
This.
Pretty much all my own little projects and such go in the "tinkering" category. Just doing some stuff that interests at the moment - but still trying to ensure that what i do is in a state to be usable later on.
Case in point, the end result of this day:
Code:
void test() {
byte arr[1024], *at = arr;
int3(at);
add(at, AL , 0x5 );
add(at, RAX, 0x777 ); // if the immediate is in -128..127 range then perhaps i should use the machine code for non AX/EAX/RAX case? ... don't care atm.
add(at, BL , 0x9 );
add(at, SIL, 0x6 );
add(at, R8 , 0x7F );
add(at, R9 , 0x12345);
add(at, EBX, ECX);
add(at, RAX, RBP); // RBP is one of the special flags and can only be used through ... black magic!
add(at, RAX, RBX);
add(at, AL , BL );
add(at, BH , AL ); // limited instruction: BH exists only without REX => cannot use any extended registers. bah, can not think of any situation i would ever want to actually use the *H registers anyway.
add(at, RAX, RBX, 0x1000, RDI, 8);
add(at, AL , RBX, 0x1000, RDI, 8);
add(at, RBX, 0, na , 0, RAX);
add(at, RBX, 0, RDI, 4, AL);
add(at, RBX, 0x12 , na, 0, 0xFF , fB);
add(at, RBX, 0 , RSI, 2, 0x16 , fQ);
add(at, R10, 0x12345, RDI, 8, 0x67890, fQ);
add(at, na , 0x20 , RDI, 2, 0xFF , fW);
((void(*)())&arr[0])();
}
Code:
000000000012F941 add al,5
000000000012F943 add rax,777h
000000000012F949 add bl,9
000000000012F94C add sil,6
000000000012F950 add r8,7Fh
000000000012F954 add r9,12345h
000000000012F95B add ebx,ecx
000000000012F95D add rax,rbp
000000000012F960 add rax,rbx
000000000012F963 add al,bl
000000000012F965 add bh,al
000000000012F967 add rax,qword ptr [rbx+rdi*8+1000h]
000000000012F96F add al,byte ptr [rbx+rdi*8+1000h]
000000000012F976 add qword ptr [rbx],rax
000000000012F979 add byte ptr [rbx+rdi*4],al
000000000012F97C add byte ptr [rbx+12h],0FFh
000000000012F980 add qword ptr [rbx+rsi*2],16h
000000000012F985 add qword ptr [r10+rdi*8+12345h],67890h
000000000012F991 add word ptr [rdi*2+20h],0FFh
:D
So, what the hell is this crap?
Well, my old homebrew scripting thing (*) is ... old. Very old actually. It is fairly crap to be honest - its only good traits are:
* superb hot-swap capabilities (add/delete/modify functions/globals at runtime).
* impossible to break - ex: calling a function that does not exist is fine and does not break the program flow. If it compiles then it will work - if it does not then it still "works" (the parts that failed to re/compile will just cease to exist).
... and that is about it.
So, thinking of making a new scripting language (**) and though about emitting actual machine code - i mean, how hard can it be? Right? :) ... :/ ... Ok, perhaps i should investigate that ...
I used to code quite a bit in assembler ~15 years ago and vaguely am still competent on the intel/amd land, but i have never done anything directly in machine code. And, oh boy, the long history of the machine code shows - holy shit, it's fucking atrocious! Still, at the end of the day i managed to get several easy instructions implemented ... and the worst family, which ADD is part of, is now in working order too. Given that all of this took just one day i would say machine code itself is totally doable ... in a week (less if i actually have time to do it).
Oh, and high-five to other tinkerers :D
---------------------
*) Generic recursive descent parser (one function operating on language syntax description directly) for LL1 context free grammar. Stack based virtual machine. No real optimizations. Dynamic types. Annoying binding system.
**) Parsing will be pretty similar (recursive descent parser, LL1 context free grammar). Internally similar to c/c++ for sweet binding. Register based - hopefully in machine code and not virtual machine. Static types. + lots of cool stuff while still supporting hot-swap.
edit: oh, btw, found to my delight that i do not have to make 2 assemblers for x86 and x64, which i initially feared - the default machine state for them makes the same machine code do the sensible thing for both (obviously, limited to the registers that actually exist on the target).
Yakoob on 2/7/2013 at 16:25
Big milestone reached with new
Official Trailer and
Closed Beta Signups! (http://postmortemgame.com/?page_id=33) Hurry Up and Register! Don't miss your chance to Preview the game and Influence it's development!
[video=youtube;C6brExY7Xgs]http://www.youtube.com/watch?v=C6brExY7Xgs[/video]
Quote Posted by zombe
Yakoob, just something i noticed a moment ago - there is no link back from dev-blog to postmortem homepage (just some sparse in-text links here and there). Unless i am blind, i suggest you add a prominent one (would have been a great help to my derpy brain a few moments ago ;) ).
I was wondering how many souls you have on board - i assume the info at (
http://postmortemgame.com/) is up to date?
7, sure helps to explain the sweet steady progress :D. Remind me again, when did the project start?
I always try to link from the posts, but good, point, should add that. And you mean in-game characters? Yup, 7 is where we're at right now. And the project started, well, ever since my masters degree in ethnic conflict in North ireland, some 2-3 years back, an excerpt from my PressKit:
Quote:
After college, I spent a year pursuing my masters in North Ireland, studying about ethnic and ideological conflicts such as the Troubles, Rwanda, Palestine and Isreal or the Bosnia-Herzegovina genocide. While it had nothing to do with game development, it really influenced me personally and inspired many themes and motifs I wanted to explore via games. That is when I first started writing design docs and coding what would eventually evolve into Postmortem. The idea of playing as Death came a year later, after I read Death with Interruptions by Jose Saramago. All this further fueled by the advent of narrative / experimental games such as Stanley's Parable or Dear Esther.
I actually have a more detailed "creative origins of postmortem" devblog post written up but... that's coming later ;)
Bakerman on 2/7/2013 at 17:01
Just started a project that I think I might actually make some progress on. I've been meaning to post here about it, since it was kind of inspired by discussions on here, as well, of course, as my own views on the matter. Playing DHXR, I got unreasonably angry at the way the Icarus landing system jumped to third-person and wouldn't let me rotate while I was using it. What I'd give to just float down in first-person, able to assess the situation as I descended, and maybe even have a little bit of air control.
But no, the developer gurus had decided that was less cool. So I basically wondered, could I build an FPS that demonstrates game mechanics from games that people feel have been dumbed-down or consolised. Part of the challenge will be to integrate these mechanics with gamepad controls as well as mouse/keyboard.
So basically, since I can't be bothered adding a story or stuff like that, and because I love gameplay programming and have little to no artistic ability, I decided to go the full experimental route. At the moment, my plan is to basically make an FPS gameplay sandbox, where you can include (or not) a bunch of different FPS mechanics from different games, but implemented in a way that people here would find palatable :p.
For example, I'll be including a landing system that
doesn't drag you into third-person. Melee takedowns likewise. The point of all this is to see how
fun these things can be, as well as proving they can work on a controller. I know stuff like the rope arrows in Thief 4 have been explained away in terms of allowing the player freedom enough to break level optimisations, but let's just ignore that for now :P. But pretty much everything will be configurable - down to the amount of health you and enemies have, jump strength (and whether you can jump everywhere), whether health regenerates, etc. Beyond showcasing FPS gameplay, I want people to be able to
experiment with it, take inspiration from it, etc. Maybe even distribute challenging config settings.
It'll probably look a little bit like this:
Inline Image:
http://i.imgur.com/JkWJ9Nl.pngBut with more actual things in the level. This is just my first test level, using some stock content from Torque 3D with all the materials removed and an edge-rendering shader. The idea is to provide three levels to start with - linear corridor crawl, nonlinear corridor crawl, and nonlinear building-infiltration sort of deal.
If it has a bit of a Receiver-ish vibe at the moment... that was unintended but entirely welcomed. I really enjoyed Receiver... for about thirty seconds. It's a great model of what I want to do, though I'll be focusing on more common game mechanics. Though at some point I'd love to stick in an optional super-detailed gun system like theirs...
I'm thinking I'll start a blog for this thing if I actually manage to get it off the ground. And I will of course be soliciting a lot of opinions here ;).