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 - Axo-Tak

Pages: [1] 2 3 4
1
Drama / Hey guys I got something to show you
« on: September 04, 2015, 12:58:54 AM »
You need an up-to-date GNU binutils set. Get this through Homebrew.

Download the GitHub repo scen/osxinj. This is vital as it contains items for inserting dynamic libraries into the Blockland executable, and a template for creating a custom dynamic library. The template is "testdylib".

You have FULL C++14 SUPPORT. You can use reinterpret_cast on memory locations of function calls. Here is an example:
Code: [Select]
#include <cstdio>

using executeFn = const char*(*)(int argc , const char* argv[]);
static executeFn execute;

void install(void) __attribute__ ((constructor));

void install()
{
    execute = reinterpret_cast<executeFn>(0xDEADBEEF); //set this to the function address
    //do stuff, don't need to return anything
}

I have no idea how to do a function jump.

Okay to strip the addresses you do this on the terminal
Code: [Select]
$ gnm -C ~/Library/Application\ Support/Steam/steamapps/common/Blockland/Blockland.app/Contents/MacOS/Blockland
if you're using Steam blockland.

That is how you do dynamic library insertion on OS X. Windows is a whole different story and it is more complex as the function names are not in the binary.

You can use MachOView to view the assembly.

You can not set a value outside of function execution. It has to be set inside a function that is called!

Anyways that's all I got to show you. I can't think of anymore things.

2
Now that the AIConnection class is deprecated, I don't know how to add events to a brick. Using ScriptObjects as clients results in "unknown command getBLID()" errors, and I can't override that function.

3
There was a script for this somewhere but now I can't find it.

I'm getting the world positions relative to the player's transform.

5
Modification Help / PhailSurvival - Try to mine...and survive
« on: October 14, 2014, 12:42:41 AM »




Welcome to PhailSurvival!
This is a RPG that I'm working on. The terrain you see is generated automatically when the server starts.
Checklist
  • Combat system: Working on it
  • Balance out resource system: Making effort to do that
  • Inventory: Stable...?
  • Crafting: On hold until combat system is finished
  • Spell casting: Basics are done but I haven't got to really work on it
  • Less laggy terrain generator: Will work on it
Chain of materials
Bronze
Brass
Iron
Gold
Steel
Damascus
???

6
Modification Help / Line Island Generator v1.0.1
« on: October 11, 2014, 07:34:17 PM »
After staying up until 5:00 I have finished a really sloppy and efficient island generator.


Feel free to use and tweak. This just generates really basic stuff by itself.

Example usage
GenerateTerrain("-128 -128 12 16","128 128 18 32",0,3,4,16);

Parameters:
GenerateTerrain("MinX MinY MinWidth MinLength","same params as min but max",Z,DecreaseWidth,MaxHeight,IslandNum);
Code: [Select]
if(!isObject(BlobTGSO)){ new ScriptObject(BlobTGSO); }

function RoundedVectorRotate2D(%x, %y, %angle)
{
%cos = mCos(%angle);
%sin = mSin(%angle);
%nx = (%cos * %x) - (%sin * %y);
%ny = (%sin * %x) + (%cos * %y);
return mfloatlength(%nx,0) SPC mfloatlength(%ny,0);
}

function BlobTGSO::MakeBlob(%this, %x, %y, %z, %dx, %dy, %r)
{
//rasterize two circles
for(%cx=-%r;%cx<=%r;%cx++)
{
%ptr = mSqrt((%r*%r) - (%cx*%cx));
%pt = ~~%ptr;
for(%cy=-%pt;%cy<=%pt;%cy++)
{
%this.PlaceBrick(%x+%cx,%y+%cy,%z);
%this.PlaceBrick(%x+%cx+%dx,%y+%cy+%dy,%z+%dz);
}
}
//talk("made circles");
//rasterize a rotated rectangle
%rot = mAtan(%dx,%dy);
%len = VectorDist("0 0 0", %dx SPC %dy SPC 0);
//Get our points.
%p0 = RoundedVectorRotate2D(%r,0,%rot); //Point A
%p1 = RoundedVectorRotate2D(%r,%len,%rot); //Point B
%p2 = RoundedVectorRotate2D(-%r,%len,%rot); //Point C
%p3 = RoundedVectorRotate2D(-%r,0,%rot); //Point D
%highest = 4; //for portability. this algorithm can draw /any/ convex polygon

//Sort the Y-ordinates of these points in order to get the lowest.
%sorter = new GuiTextListCtrl(){};
for(%i=0;%i<%highest;%i++)
%sorter.addRow(%i,getword(%p[%i],1));

%sorter.sortNumerical(0,1);
for(%i = 0; %i < %highest; %i++)
{
%lyo[%i] = %sorter.getRowText(%i); //lyo[0] is the lowest Y ordinate
for(%j=0;%j<%highest;%j++)
{
if(getword(%p[%j],0) SPC %lyo[%i] $= %p[%j] && !%taken[%j] && %pnum[%i] $= "")
{
%taken[%j]=1;
%pnum[%i] = %j;
}
}
//talk("lyop:"@%p[%pnum[%i]] SPC "lyo:"@%lyo[%i] SPC "p:"@%p[%i] SPC "pnum:"@%pnum[%i]);
}
%sorter.delete();
for(%i=0;%i<%highest;%i++) //for easiness
{
%px[%i] = getword(%p[%i],0);
%py[%i] = getword(%p[%i],1);
}
//by doing run over rise, you exploit your dpy == 0 protection AND make calculations easier
//we'll call the reciprocated slope "n"
//n(y-y1) = x-x1
//n(y-y1)+x1 = x
//ny - ny1 + x1 = x
for(%j=0;%j<4;%j++)
{
if(%pnum[%j] == %highest-1) //special case
%nextp = 0;
else
%nextp = %pnum[%j]+1;
%thisp = %pnum[%j];

%dpy = %py[%nextp] - %py[%thisp]; //change of our y points, needed to choose which xbuf
%dpx = %px[%nextp] - %px[%thisp]; //just for slope

if(%dpy < 0) //dpy is less than 0, thus indicating a __decrease__ in Y
{
%n = %dpx / %dpy;
for(%i=%py[%thisp];%i>=%py[%nextp];%i--)
{
%ptx = (%n * %i) - (%n * %py[%thisp]) + %px[%thisp];
%xmax[%i] = %ptx;
}
}
else if(%dpy > 0) //dpy is greater than 0, thus indicating an __increase__ in y
{
%n = %dpx / %dpy;
for(%i=%py[%thisp];%i<=%py[%nextp];%i++)
{
%ptx = (%n * %i) - (%n * %py[%thisp]) + %px[%thisp];
%xmin[%i] = %ptx;
}
}
else //dpy == 0, or some other bizarre condition
{
for(%k=0;%k<%highest;%k++) //which point matches this one?
{
if(%py[%k] == %py[%thisp] && %k != %thisp)
%ppick = %k;
}
%xmin[%py[%thisp]] = (%px[%ppick] > %px[%thisp] ? %px[%thisp] : %px[%ppick]);
%xmax[%py[%thisp]] = (%px[%ppick] <= %px[%thisp] ? %px[%thisp] : %px[%ppick]); //idiot safety in case of doubles
}
}
for(%i=%lyo0;%i<=%lyo[%highest-1];%i++)
{
//for some reason i messed up and xmin and xmax are swapped...
for(%j=%xmax[%i];%j<=%xmin[%i];%j++)
{
%this.PlaceBrick(%x - %j, %i + %y,%z);
}
}
}

function BlobTGSO::PlaceBrick(%this, %xr, %yr, %zr)
{
//retain sanity
%x = mfloor(%xr);
%y = mfloor(%yr);
%z = mfloor(%zr);
//talk("placebrick @ " @ %x SPC %y SPC %z);
if(%br = %this.brick[%x,%y,%z])
return %br;

%brick = new fxDTSBrick()
{
datablock = brick4xCubeData;
position = %x*2 SPC %y*2 SPC %z*2+$BlobTGSO::Zoffset;
rotation = "0 0 0 0";
colorID = $BlobTGSO::Color;
scale = "1 1 1";
angleID = 0;
colorFXID = $BlobTGSO::ColorFX;
shapeFXID = $BlobTGSO::ShapeFX;
isPlanted = 1;
};
%brick.plant();
%brick.setTrusted(1);
%this.brick[%x,%y,%z] = %br;
BrickGroup_888888.add(%brick);
%brick.onPlant();

return %brick;
}

function GenerateTerrain(%min,%max,%z,%valslope,%maxheight,%islands)
{
for(%i=0;%i<%islands;%i++)
{
%x=getRandom(getword(%min,0),getword(%max,0));
%y=getRandom(getword(%min,1),getword(%max,1));
%r=getRandom(getword(%min,2),getword(%max,2)); //width of islands
%dx=getRandom(-1,1) * getRandom(getword(%min,3),getword(%max,3));
%dy=getRandom(-1,1) * getRandom(getword(%min,3),getword(%max,3));
$BlobTGSO::Color = 20;
BlobTGSO.MakeBlob(%x,%y,%z,%dx,%dy,%r);
for(%j=%z+1;%j<(%z+%maxheight);%j++)
{
if(%j == 2){$BlobTGSO::Color = 2;}
%r = %r - %valslope;
if(%r < 1){ break; }
BlobTGSO.MakeBlob(%x,%y,%z+%j,%dx,%dy,%r);
}
}
}

7
Modification Help / whoops
« on: October 11, 2014, 07:33:40 PM »
(wrong topic)

8
Music / Axo-Tak - origins
« on: October 04, 2014, 01:31:06 PM »
made this for a project I might be working on...

10
Modification Help / [RESOURCE] Blender Weapon Template
« on: August 09, 2014, 03:20:27 AM »
Probably been done before but I did a shot at an intuitive weapon template.

Blue: Right Hand
Red: Left Hand (only use if you're doing some 2-handed weapon that doesn't mount other images like Guns Akimbo)
Black Cube: Directional indicator (remove it, just displays what's the front and what's up)

Width of the cubes: 0.14
Width of seperation: 1.05

https://hostr.co/Jr9kb4cCJqPd The Blender File
https://hostr.co/2gbLXzu6ef7E The DTS File

EXPORTING: ALWAYS export as Legacy Mesh using Save As. If you Save on Blender rather than Save As, then it'll not export legacy.

If it appears wireframe in 2.49b and it is set to show solid faces, then you didn't export legacy or you simply used Save.

11
General Discussion / PhailMining has RETURNED (with better bomb speed)
« on: August 09, 2014, 12:11:54 AM »
yeah that's right

also I am implementing some good stuff like a buy menu and probably more stuff that rank discounts are good for

12
Game Modes / Grapple Knife DM without Slayer
« on: July 28, 2014, 06:03:31 PM »
https://hostr.co/KeguZybwylQZ

A small and simple grappleknife DM map.
The map can accommodate 6-8 players. I recommend making your own.

13
Off Topic / Functions to Raw Audio
« on: July 11, 2014, 06:28:04 AM »
http://wurstcaptures.untergrund.net/music/

Bitshift operators and AND/OR is on it, and other stuff. I think it's basically a Javascript expression thing.
If you don't know how to work the equations then you could just tweak the numbers. Whole numbers only.

Example

14
Off Topic / Old PCs
« on: July 08, 2014, 04:52:55 AM »
The new Intel Pentium 20th anniversary CPU is pretty loving badass. If you're willing to overclock it to just about the max it'll run games no problem. Unless you're playing a CPU heavy game then it's stuff but it keeps up with mid range gpu's pretty good. It also doesn't put off a ton of heat either so a cheapy aftermarket cooler should work. I think for it and a decent board you're pushing like $150-$200. You'll need a discrete GPU but you should be able to put together a decent computer for around 400-500ish
This gives me memories of an old Pentium 4 Dimension XPS gaming PC I used to have, except it'd have sort of loud fans. The PC had it stock clocked 3.6GHz and the old high-end Pentiums already put out too much heat, so that is why it came with loud fans.

Good times, except when the PSU would burn out and the fans would go full blast (motherboard/PSU design flaw, some other Dimension PC models had this flaw)

Pages: [1] 2 3 4