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 - hansiec

1
RPG Maker Scripts / Re: XP Irrlicht
November 06, 2012, 09:32:44 am
Quote from: gameus on November 06, 2012, 08:38:42 am
Try this one. I built it under "Release" instead.
https://www.box.com/s/7j0nukeqec8r291pd1ha (It's just the DLL file)


thanks, I forgot that I am using debug...
2
RPG Maker Scripts / Re: XP Irrlicht
November 06, 2012, 01:12:23 am
Quote from: gameus on November 05, 2012, 07:39:22 pm
The Graphics.frame_rate = xx only works up to 60 FPS (If I'm correct. I believe Blizzard was the one who discovered this), but that's most games nowadays. Anyways, nice job on this. I say if you can figure out how to either A) render directly to the RGSS Window or B) get rid of the window, you'll be good to go. Looking forward to the source, I always love peaking at code in hopes to learn something.

EDIT: Also, you can still keep RMXP as the editor and the engine as a separate ruby script. RMXP saves data using Ruby's serialization method. So all you'd need to do is have your engine load up the default classes (which can be found in the help manual) and you can load/save RMXP data.


Alright, I think I found out how to hide the RGSS window. But I decided to go into pure ruby, as I already did convert this completely.

Also, here is the source (it's more updated than the dll found in my zip)

https://rapidshare.com/files/1184194783/XPIrrlicht.zip

If you can find out how to fix the error when loading a block, could you tell me so?
3
RPG Maker Scripts / Re: XP Irrlicht
November 05, 2012, 06:45:12 pm
Quote from: gameus on November 05, 2012, 06:02:01 pm
All it's really doing is calling upon Win32API calls. You'd be better off using you're code in pure Ruby 1.9 rather than using the RGSS engine. I looked through your code, the only RGSS calls you're making deal with the Graphics module and the Input module. Running this in plain Ruby would get rid of the second screen problem and run much faster than the RGSS engine. Even if the rendering is running at 100 FPS, the input you'd be getting from the RGSS engine is still limited to 40 FPS just for the fact that Enterbrain programmed it that way.

Also, might I suggest you leaving the DLL as open source? All it is is just a wrapper to communicate between Ruby and the Irrlicht library. Leaving it open source can bring a lot of good things. Such as improvements from the community. Giving an understanding of how Irrlicht works to other people. Plus, if you ever decide to stop working on the project, it wouldn't be completely dead as there is still opportunity for someone to pick it up.


I am using the RGSS engine as it's more easier to use than pure Ruby (In sense of maps and events not in programming) people also use XP more than they would with a new engine, and if I decide to make my own I'd write it in c++ as it would be faster.

There is a setting to set the frame rate (Graphics.frame_rate = x) so again no problems there. I'll add the source in the next release as you are right (I was intending it but I forgot to add the source in the end)

Anyways, I might consider making this out of pure Ruby 1.9 instead just depending on if I feel like creating an editor for managing everything.
4
RPG Maker Scripts / Re: XP Irrlicht
November 05, 2012, 05:29:38 pm
Quote from: Blizzard on November 05, 2012, 05:19:30 pm
So basically this allows you to run custom Irrlicht stuff within RMXP?


Yep, but it's very very limited in features as of now, but I'll add some more customization soon. (Maybe in a month or so I'll release another version) but for now there is only basic 3D model rendering, Also the fps is greater than 100 (usually) so there shouldn't be any real lag.
5
RPG Maker Scripts / XP Irrlicht
November 05, 2012, 01:10:10 pm
XP Irrlicht


Version: 1.0

Description:

This is a port from Irrlicht to Rpg Maker XP, just like what DemonFire did except mine is open source (not the dll though)

Features As of Now:
3D models (.md2, .obj, ect.) Any models that Irrlicht can support by default
Model Textures (.png, .bmp, ect.) Any Texture that Irrlicht can support by default
Custom BG color (No explanation needed really)
Model Transformation (scaling,rotation,transformation)


Notes:
For now the only help you get is that of which is exampled in the Scene_Irrlicht
I shall in the next release add camera viewing and 2D GUIs
Do not use unless you have some scripting knowledge, otherwise you'll get lost easily
Yes, I know a second screen pops-up (The one is the old game window and the other renders Irrlicht, I'll try to fix this so only 1 window pops up)

Finally:
You can vouch that this is mine for 2 reasons 1 the build of mine is very much different than DemonFire's and secondly I added a dll function which the sole purpose is to return my username (Hansiec)

Downloads:
#1.0#

Credits:
Hansiec -- Creator of the DLL/Ruby Scripts
Irrlicht -- Creator of Irrlicht and the model (with the texture) used for the example
DemonFire -- Of course for giving me the idea for using Irrlicht with RMXP
6
Quote from: Blizzard on October 13, 2012, 06:41:49 pm
Just curious, was it the commented line "//p_Device = InitializeDevice(hWnd);"? xD


nope, I was mixing up some dimensions, I tried someone else's triangle vertices and it worked...
7
Never mind I got it working

8)
8
Programming / Scripting / Web / Need help with Direct3D
October 13, 2012, 04:42:15 pm
Alright, so I'm working on a dll that renders Direct3D for rmxp, but my problem is when I try rendering it doesn't render anything.

This is written in c++

/*
*  XP 3D dll main
*  By: Hansiec
*  YOU ARE NOT ALLOWED TO MODIFY THIS EXCEPT FOR SELF-PURPOSES OR BUG FIXING!
*  ~~~ You have been warned... (Self purposes meaning no re-distributions at all unless it's for a fix of a bug/improvements)
*/

#pragma comment (lib, "d3dx9.lib")

// Exclude rarely-used stuff from Windows headers
#define WIN32_LEAN_AND_MEAN       

// Windows Header Files:
#include <windows.h>
#include <windowsx.h>

// C++ RunTime Header Files
#include <stdio.h>
#include <stdlib.h>
#include <malloc.h>
#include <memory.h>
#include <tchar.h>

// DirectX Header Files
#include <d3d9.h>
#include <d3dx9.h>
#include "dll.h"

#define export extern "C" __declspec(dllexport)

// Variables
HWND hWnd;
int dll_version = 0;
LPDIRECT3DDEVICE9 p_dx_Device;
LPDIRECT3D9 p_dx_Object;
LPDIRECT3DDEVICE9 p_Device;
// Some usefull functions for setup.
export void init(int i){
  // Sets the Window handle that you must get from XP.
  hWnd = (HWND) i;

// Initialize some Direct 3D variables
p_dx_Object = Direct3DCreate9(D3D_SDK_VERSION);
if (p_dx_Object == NULL)
{
     // Only display if we do not have DirectX
     MessageBox(hWnd,"DirectX Runtime library not installed!","3DXP Error in: init()",MB_OK);
}

// initialize more variables
D3DPRESENT_PARAMETERS dx_PresParams;

// Device creation
ZeroMemory( &dx_PresParams, sizeof(dx_PresParams) );
dx_PresParams.Windowed = TRUE;
dx_PresParams.SwapEffect = D3DSWAPEFFECT_DISCARD;
dx_PresParams.BackBufferFormat = D3DFMT_UNKNOWN;

p_dx_Object->CreateDevice(D3DADAPTER_DEFAULT, D3DDEVTYPE_HAL, hWnd, D3DCREATE_HARDWARE_VERTEXPROCESSING, &dx_PresParams, &p_dx_Device);

if (FAILED(p_dx_Object->CreateDevice(D3DADAPTER_DEFAULT, D3DDEVTYPE_HAL, hWnd, D3DCREATE_HARDWARE_VERTEXPROCESSING, &dx_PresParams, &p_dx_Device)))
{
     if (FAILED(p_dx_Object->CreateDevice(D3DADAPTER_DEFAULT, D3DDEVTYPE_REF, hWnd, D3DCREATE_SOFTWARE_VERTEXPROCESSING, &dx_PresParams, &p_dx_Device)))
     {
         MessageBox(hWnd,"Failed to create even the reference device!","3DXP Error in: init()",MB_OK);
     }
}
// finally we set our device.
//p_Device = InitializeDevice(hWnd);
//p_Device = p_dx_Object->AddRef(hWnd);
}

// Returns the owner of the DLL (Just for checks of theft)
export char* get_owner(){
  return "Hansiec";
}

// Returns the Direct 3D SDK version
export int get_version(){
  return D3D_SDK_VERSION;
}

// Checks the XP3D dll version
export int check_version(int version){
  return (int) version >= dll_version;
}

// Renders a frame
export int render(){
   HRESULT hr;
   struct D3DVERTEX {float x, y, z, rhw; DWORD color;} vertices[3];
  vertices[0].x = 50;
  vertices[0].y = 50;
  vertices[0].z = 0;
  vertices[0].rhw = 1.0f;
  vertices[0].color = 0x00ff00;



  vertices[1].x = 250;
  vertices[1].y = 50;
  vertices[1].z = 0;
  vertices[1].rhw = 1.0f;
  vertices[1].color = 0x0000ff;



  vertices[2].x = 50;
  vertices[2].y = 250;
  vertices[2].z = 0;
  vertices[2].rhw = 1.0f;
  vertices[2].color = 0xff0000;
  LPDIRECT3DVERTEXBUFFER9 pVertexObject = NULL;
  void *pVertexBuffer = NULL;
  if(FAILED(p_dx_Device->CreateVertexBuffer(3*sizeof(D3DVERTEX), 0,
          D3DFVF_XYZRHW|D3DFVF_DIFFUSE, D3DPOOL_DEFAULT, &pVertexObject, NULL)))
   return(0);
   if(FAILED(pVertexObject->Lock(0, 3*sizeof(D3DVERTEX), &pVertexBuffer, 0)))
   return(0);
   memcpy(pVertexBuffer, vertices, 3*sizeof(D3DVERTEX));
   pVertexObject->Unlock();
   
  p_dx_Device->Clear(0, NULL, D3DCLEAR_TARGET, D3DCOLOR_XRGB(0, 0, 0), 1.0f, 0);
  p_dx_Device->BeginScene();
  p_dx_Device->SetStreamSource(0, pVertexObject, 0, sizeof(D3DVERTEX));
  p_dx_Device->SetFVF(D3DFVF_XYZRHW|D3DFVF_DIFFUSE);
  p_dx_Device->DrawPrimitive(D3DPT_TRIANGLELIST, 0, 1);
  p_dx_Device->EndScene();
}



also, dll.h contains nothing of importance so this is not needed to post. (actually I think I can remove it since it serves no purpose at all.)
9
Quote from: Wizered67 on October 07, 2012, 04:33:48 pm
The current plan is that its going to be a hosted server, but I would consider looking into the alternative of host-your-own-server.


Alright, either one if fine by me, also you should at the very least include offline play for people who aren't online always.
10
Quote from: Wizered67 on October 07, 2012, 02:48:41 am
I finally got around to adding crafting! Big thanks to Ryex for making his Mouse Window API so easy to adapt. I'm using it for pretty much every window imaginable xD

Spoiler: ShowHide


Spoiler: ShowHide


Spoiler: ShowHide


I'm open to suggestions and feedback if anyone has any.



looks like progress is going good here, also is this going to be a hosted server or like minecraft's host-your-own game?
11
Nice progress going on here
12
Nice progress on this, I still think you need a perlin map generator (if you need one I have already made one but not released properly yet.)
13
New Projects / [Game Maker 8 Pro] Castle Forge 3D
May 27, 2012, 04:35:54 pm
CASTLE FORGE



Intro:
Castle Forge is a minecraft classic (Yes another one....) like game I have decided to make with Game Maker Pro 8. It's graphics are not amazing yet but it's free and has got a few good things.

Gameplay:
The gameplay is mostly sandbox but I will be adding things such as sidequests you can do for the more rare items, each block has a custom 'rarity','mine time',and height it can appear on, grass only apears on the top 3 layers of the map while stone is anywhere under that.

Features:
-- 3D (yes I include this as 3D because not many games are)
-- Amazing "Random" maps (maps are made through a seed)
-- Shows current status of various things (current block/amount of that block/current block mining progress)
-- Pretty good (won't say amazing) random dungeons (again relies on the seed)
-- Custom Random seed
-- Custom Map size (currently small/medium/large but this will change to completely custom by choosing the x/y/z size from scratch)
Features which will be added:
-- Day/Night system
-- Zombies! (you just gotta love them)
-- Allies (Cpu's that goes killing enemies/giving you items)
-- better dungeon structures
-- water/lava blocks (yes these will be slightly difficult)
-- Health system (will be added before or with zombies)
-- Better saving/loading
-- Better menus (instead of the popups giving you 3 options.)

Screenshots/Videos:

Spoiler: ShowHide





















Credits:
Hansiec -- Most of work
Laruens (and whoever else worked on the block engine) -- Block Engine

HELP WANTED:
Show me proof of work if you wish to help.
Main things I need:
Sprites for living things (best way I can put this really)
Sprites for "objects" (trees/houses/structures) (these are made very weirdly so if you want to do this PM me and I'll give you a layout of how this works A.K.A image)
New Block Textures (self explanitory) (these must be 16x16 sized you can put them all in one image I don't mind seperating them myself.)
I otherwise need:
Scripting with the programming language GML (Game Maker Language)


Release:
Current release: Version 1.1 Beta
Note: The current version doesn't have all the current features they will be included in the next release!
Download here: http://sandbox.yoyogames.com/games/198969-castle-forge
14
New Projects / Re: Castle forge
May 18, 2012, 01:30:32 pm
Quote from: Wizered67 on May 17, 2012, 10:51:47 pm
I think it looks really good, but I'm worried that now it's going to be too much like Minecraft with no reason to play this instead. Just a thought.


lol, I guess but it will be free for those who can't buy it + it will also have some different features to it.
15
New Projects / Re: Castle forge
May 17, 2012, 09:07:52 pm
Right this should be as good as closed I am working on a Game Maker 8.0 pro version of this:

I will open a different thread for the game maker version.

















16
Quote from: Wizered67 on May 10, 2012, 08:10:51 pm
Actually, the lag was/is caused by the server sending so much data over to the client every time the map changed, and then reloading the entire map. Looking back, this was a really stupid way of doing it. Now I'm trying to get it to work where it only modifies the changed parts of the map, not the entire thing.


Do something like so: Send object info/time edited (Time.now.to_i is a good method) now when the player saves the map remember to save the last update the player had on the map and load every change between current time and last update (unless the update is X amount and it has no longer a value to the server) also delete any "overlaying" data so we don't load even more data than we should (if the player was last online a year ago it would be best to load a scratch map instead) but in any case I'm not that good with networking (except a very small portion of mysql/php) hope you understand what I mean.
17
RMXP Script Database / Re: [XP] Blizz-ABS
May 11, 2012, 05:44:35 pm
Yeah thanks I'll try this, I didn't really lookup the methods for long (and I am not used to work with Blizz-Abs)
18
RMXP Script Database / Re: [XP] Blizz-ABS
May 10, 2012, 08:06:32 pm
any idea what the problem to mine is:

When setting the map using the $game_map.data[x,y,layer] I can still pass unpassable tiles (water as an example) and I can walk over them even when they are not set passable, it does not happen when editing with main RMXP though. (I think it may be because of the intelligent movement or something I got no clue.)
19
Both, I am currently trying to build up my networking experience and since I'm working on something similar I can also help with this better, also I have a few ideas to reduce the lag if you would be kind enough to let me look at the source.

(taking the events and loading em with "game_map" is one way to reduce lag or you can use an event spawner and use it's saved events method to properly load/destroy unneeded events if you are using something similar to my map system where it overwrites one map only then I have already got a small lag reducing fix which might not even work since I'm not sure how much your game lags...)
20
INTRO

This script is used to generate random maps like minecraft's maps (not as good + it's 2d (of course))


CALL WITH: kfRandomMap(landscape,seed)
Features
Easy to use (in my opinion)
Customize-able landscapes (tiles/ratio)
Customize-able structures (tile,x/y)
Generation Progress Bar
Place events alongside of structures

Demo: http://www.mediafire.com/?36mwbvhh3skoczp

Credits
Hansiec - Maker of the script
Poe - Wraptile (THIS IS NEEDED OR YOU CAN'T USE THIS!)
SephirothSpawn - Event Spawner

Warnings
This script was ONLY TESTED WITH BLIZZ ABS! (should work with other systems as well but this is a warning)
When using Blizz Abs the movement permissions don't update (this isn't my fault....)