Game Development http://relishgames.com/forum/index.php?p=/categories/game-development/feed.rss Sat, 18 May 13 20:37:16 -0400 Game Development en-CA grids http://relishgames.com/forum/index.php?p=/discussion/6424/grids Mon, 29 Apr 2013 10:09:20 -0400 khizer 6424@/forum/index.php?p=/discussions I have a questions regarding making grids in HGE , do we have a default statement that creates a window with grid or should i load a texture image with grids on it .
i hope you understand the question

regards]]>
Programmatic tile transitioning? http://relishgames.com/forum/index.php?p=/discussion/6423/programmatic-tile-transitionings Tue, 23 Apr 2013 02:37:33 -0400 Rectangle 6423@/forum/index.php?p=/discussions Instead of honing my incredibly bad artistic drawing skills, and making several tiles which transition between grass and dirt in all directions, is there a way I could simply blend these two tiles together?

For example, please note the following image:
image
The areas in the image where black becomes white should be the point in the new tile where the image "crosses over" from one tile image to the next, in a gradient-like fashion, based entirely on adjacent tiles.
I could make several grayscale gradient images to represent these transitions, and somehow use those to "bleed" between tile images.
Once all tiles are loaded into the game, I would create these transitions and add them to the array of tiles used by the map.

I know this would require some sort of alpha-blending trick, but how could this be done in HGE?
AFAIK, I would need to create texture objects for each generated tile, but does anyone know what the correct steps would be in order to properly render these tiles?

EDIT: I believe something LIKE THIS is what I'm going for

(but how can it be done in HGE?)]]>
2D Tile engine rendering optimizations http://relishgames.com/forum/index.php?p=/discussion/6421/2d-tile-engine-rendering-optimizations Tue, 16 Apr 2013 20:33:04 -0400 Rectangle 6421@/forum/index.php?p=/discussions This tile layer can easily render without any drop in FPS.
Now lets scale that up to 100 columns and 100 rows.
This will obviously create a HUGE drop in the application's frame rate, since the render operation is doing 10 times the work.

So, in a scenario such as this, what kind of optimizations could be made to ensure a constant frame rate?
I suppose the first obvious thing to do would be to switch my engine's logic to using batch operations.
But another thing I thought of was somehow determining if a given tile was within the limits of the screen, and only drawing it if it is.
But how could something like that be achieved? And would it be possible to combine these ideas?
Also, any other advice on optimizations are welcomed. I'm curious to hear what anyone has in mind!]]>
Does HGE support PNG tranparency/opacity? http://relishgames.com/forum/index.php?p=/discussion/6420/does-hge-support-png-tranparencyopacitys Tue, 16 Apr 2013 18:44:26 -0400 Rectangle 6420@/forum/index.php?p=/discussions I also know that HGE uses libPNG to handle the png file format...

But how does HGE handle any transparent/semi-transparent regions embedded within a PNG image?
Are they dealt with automatically during Texture_Load and GFX_* rendering operations?
Is there a certain rendering algorithm to follow in order to get it to display properly?
Or perhaps only specific PNG file format(s) are supported?

I'm asking because I used photoshop to create a tile outline (just a simple red border with a transparent background, and a semi-transparent 'glow' surrounding the inner edges of the border) and I couldn't get it to show up in my tile engine application.
I stepped through my code, and can verify that the texture does in fact load properly.
And if I replace the Texture_Load operation to use 'texture.jpg' from Tutorial 05, it also renders properly.]]>
Code help [building own interpreter] http://relishgames.com/forum/index.php?p=/discussion/6400/code-help-building-own-interpreter Sat, 12 Jan 2013 03:49:57 -0500 SantalLican 6400@/forum/index.php?p=/discussions I got a very big idea that's how to run and enjoy a program directly and instantly without using modern compilers to compile and link your code.

About programming languages : Modern compilers have to compile, check, link and build up an executable file with the code that users specified. The executable files are presented in a way that everyone called "Assembly". But that's unique. My idea is building up a portable interpreter that may be a great plugin for HGE. It also knows C++ standard syntax, reads, compiles, generates, and runs code at a time. Also it's portable, so also you can freely switch to an another program at any time you want. In short now each source file is really a program that you can instantly enjoy it... :)

About my idea : I thought up some important steps : I'll develop almost of standard C++ syntax, build up variable-structure definition, variable array, variable construction, variable attributes, container variable, operators, layered expressions, bracket [] expression, perform variable operations, function definition, function returning value, call a function with parameters, add all standard functions, add my own core functions, then finally, HGE... :)
- About variable definition : int; short; long; char; bool; float; double
- About array : one dimensional, multiple dimensional
- About variable attributes : const, signed, unsigned
- About operators : (+); (-); (*); (/); (%); (^); (>); (<); (>=); (<=); (==); (!=); (!); (>>); (<<); (&); (|) (&&); (||); (,);</b>


Also I think maybe C++ does not support power operator (^); so I'll try to include it. Is this possible?

Before implementing, I'd like to hear some advice, opinions or suggestions. :)
- What do you think about this idea?
- What is requirement? Am I able to implement this great idea? Is this possible?
- About my draft : what is missing, what is wrong, or any suggestion? Thank you. :)]]>
Using Resource Packs http://relishgames.com/forum/index.php?p=/discussion/6412/using-resource-packs Sun, 10 Mar 2013 10:28:18 -0400 blackdynamite 6412@/forum/index.php?p=/discussions
after you compile a resource pack e.g data.paq, how do you go about using whatever is in the resource pack? for example, let's say you have saved a .png image for a texture in the pack file, how do you load the pack file and access the image to load it in the texture? am sure the resource functions only work with a resource script so i was wondering how you go about using these.]]>
HGE : What missing features ? http://relishgames.com/forum/index.php?p=/discussion/6371/hge-what-missing-features-s Sun, 28 Oct 2012 04:43:47 -0400 SantalLican 6371@/forum/index.php?p=/discussions How do you feel about HGE? And HGE programming?
What the suggested features that HGE should have in future?]]>
Gamedev tools http://relishgames.com/forum/index.php?p=/discussion/6393/gamedev-tools Wed, 28 Nov 2012 21:05:50 -0500 NWP 6393@/forum/index.php?p=/discussions
I would like to present you a tool that may have would be very useful for indie developers. This is a tool to create sprite animation by setting keyframes. The tool interpolate the any sprite property between keyframes. Interpolation is fully controlled.
Animation is created by defining and setting animation curves that can be attached to any property of the sprite. As it makes the 3d max or others. This proved to be very convenient. The result can be export to c++ classes. It simple to use in own's projects. And just perfect integrated in HGE engine.
Tool name is Gamedev Animation Studio.
The link to the page http://patagames.com/astudio
a link to the video review http://gamedev-animation-studio.findmysoft.com/]]>
A new and peculiar problem http://relishgames.com/forum/index.php?p=/discussion/6387/a-new-and-peculiar-problem Fri, 09 Nov 2012 07:00:04 -0500 jwladi 6387@/forum/index.php?p=/discussions
I have a large image (3572 x 2471 px) i want to show in a 900x600 (aprox) sprite.

The code looks like this:

hge->Gfx_BeginScene();
hge->Gfx_Clear(0);
spmsj->SetTextureRect(0,0,3572, 2471);
spmsj->Render4V(0 ,0, 900, 0, 900, 600, 0, 600);
hge->Gfx_EndScene();

In winXP pc, the texture is crop to aprox 2500x2000px, and show it tiled four times, I don't know wy.

]]>
blink problem http://relishgames.com/forum/index.php?p=/discussion/6386/blink-problem Thu, 08 Nov 2012 12:10:47 -0500 jwladi 6386@/forum/index.php?p=/discussions
I'm trying to render in a render target. I've modified tuto 04 and it works fine. Then I tried to apply it to my proyect, but it fails, i have a big blinking due to the target sprite remainds black, and the sprite that should be rendered into sprite targe renders in normal target.

Mi code is like this:


Map::Init()
{
....

spMap = new hgeSprite(texMap, 0, 0, BMAP_WIDTH, BMAP_HEIGHT);

....

target = 0;
spTarget = 0;
target = hge->Target_Create(BMAP_WIDTH, BMAP_HEIGHT, false);
spTarget = new hgeSprite(hge->Target_GetTexture(target), 0, 0, BMAP_WIDTH, BMAP_HEIGHT);
}

Map:Update()
{

spMap->SetTextureRect(texX, texY, texW, texH);

}

Map::Render()
{
hge->Gfx_BeginScene(target);
spMap->Render4V(0, 0, BMAP_WIDTH, 0, BMAP_WIDTH, BMAP_HEIGHT, 0, BMAP_HEIGHT);
hge->Gfx_EndScene();

hge->Gfx_BeginScene();
spTarget->Render(BMAP_POSX, BMAP_POSY);
hge->Gfx_EndScene();
}


spMap reders to normal target at "global" 0,0. spTarget renders in black.

I use Render4V because I need to show a texture much bigger than the sprite (6 o 7 times) and it's the only way I've seen to do that, even using SetTextureRect. Anyway, i've tried with Render, RenderStretch, Render4V and it continue blinking.

The only differece with the tuto 04 i've seen is that I define target and spTarget after System_Start(), instead before it.

What am I doing wrong?
]]>
hgeRect improvement http://relishgames.com/forum/index.php?p=/discussion/6383/hgerect-improvement Sun, 04 Nov 2012 02:13:39 -0500 SantalLican 6383@/forum/index.php?p=/discussions
Original :

bool hgeRect::TestPoint(float x, float y) const
{
if( x >= x1 && x< x2 && y >= y1 && y < y2) return true;

return false;
}


And solutions :

bool hgeRect::TestPoint(float x, float y) const
{
if(x < x1 || x >= x2 || y < y1 || y >= y2) return false;

return true;
}


Or :


inline bool hgeRect::TestPoint(float x, float y) const
{
return (x < x1 || x >= x2 || y < y1 || y >= y2) ? false : true;
}


I tested the improved code and I see that in some cases it can speedup by more than 50 % !!!
]]>
New idea : Video ? (but :( ?!?!) http://relishgames.com/forum/index.php?p=/discussion/6377/new-idea-video-s-but-ss Wed, 31 Oct 2012 02:07:03 -0400 SantalLican 6377@/forum/index.php?p=/discussions And, is there any code which can capture game play ? Perhaps it's very slow and maybe involved.]]> Optimizing C++ code http://relishgames.com/forum/index.php?p=/discussion/6376/optimizing-c-code Wed, 31 Oct 2012 02:06:18 -0400 SantalLican 6376@/forum/index.php?p=/discussions

A = A + 5; ///-) A += 5;

/*(+= | -= | *= | /= | %=)*/

A += 1; //A++;
//////////////////
A -= 1; //A--;

if(((A == B) && (A != C)) || B != C) {[...]}
/////////////////////////////////////////////
if(A == B && A != C || B != C) {[...]}

Txt = new guiObj(100,100);gui->AddCtrl(Txt);
//////////////////////////////////////////////
gui->AddCtrl(Txt = new guiObj(100, 100));


A = function(5); if(A == B){[...]}
/////////////////////////////////////////////
if((A = function(5)) == B){[...]}

if(A != C && B != C) {[...]} else {[...]}
/////////////////////////////////////////////
if(A == C || B == C) {[...]} else {[...]}

if(A > B) A = C; else A = B;
/////////////////////////////////////////////
A = (A > B) ? C : B;

for (int i = 0; i < 4;i ++)
spr->SetColor(col[i].GetHWColor(),i);
/////////////////////////////////////////////
spr->SetColor(col[0].GetHWColor(),0);
spr->SetColor(col[1].GetHWColor(),1);
spr->SetColor(col[2].GetHWColor(),2);
spr->SetColor(col[3].GetHWColor(),3);

for (int i = 0; i < 100000;i ++){[...]}
/////////////////////////////////////////////
for (register int i = 100000; --i; ){[...]} // My popular trick !

for (int i = 0; i < getLen(); ++i){[...]}
/////////////////////////////////////////////
int len = getLen();
for (register int i = 0; i < len; ++i){[...]}


Case condition :

switch(case){
case 2 : break;case 3 : break;case 1 : break;}
/////////////////////////////////////////////
switch(case){
case 1 : break;case 2 : break;case 3 : break;}
/////////////////////////////////////////////

switch(case){
case 5 : break;case 7 : break;case 10 : break;}
/////////////////////////////////////////////
if(case == 5) {[...]} else
if(case == 7) {[...]} else
if(case == 10) {[...]}



Structures :
Two conditions :

(Value) = size of all elements (bytes);
(Result) = sizeof(structure);

(Result) = (Value) + ((Value) % 4 == 0) ? 16 : 0)
(Result) % 4 == 0; //(Otherwise, (Result)++, recalculate this step
(Result) /= 4;



struct S
{
float A;
int nVal, B; //96 / 4 + (!(96 % 4)) ? 4 : 0 - Not a 12-byte-structure ! It's a 16-byte-structure !
};

/////////////////////////////////////////////
struct S
{
float A;
int nVal; unsigned B : 31; //32 + 32 + 31 == 95 (% 4 > 0) Wow ! Now it's a 12-byte-structure. (Super optimization !)
};


Functions :

int sum(int a, int b){return a + b;}
/////////////////////////////////////////////
inline int sum(int a, int b){return a + b;}


]]>
Ultra fast float/double -> int conversions - Follow up http://relishgames.com/forum/index.php?p=/discussion/2883/ultra-fast-floatdouble-int-conversions-follow-up Thu, 01 Nov 2007 16:41:59 -0400 ninseineon 2883@/forum/index.php?p=/discussions
I came across this post here in the forum http://www.relishgames.com/forum/viewtopic.php?t=280, but couldn't reply there - don't know why.

Basically the author of the post raised the issue of the lack of optimization in doing float to int conversions and posted a solution for that, that involved using some assembly. This is original solution:


inline int double2int(double flt)
{
int intgr;

_asm fld flt
_asm fistp intgr

return intgr ;
}

inline int float2int(float flt)
{
int intgr;

_asm fld flt
_asm fistp intgr

return intgr;

}


Since I'm using Code::Blocks and gcc, _asm doesn't work. The following code is used in my game framework and compiles ok in my environment, but when I'm linking a small test program with the game framework's lib, the compiler spits out a complain about not knowing flt and intgr... Following is the code that I got to compile ok with the game framework, and after that the compiler's complaints in the test application. What I'm doing in my test application is just call float2int() from it's namespace (you can't see that here).


/*
** http://relishgames.com/forum/viewtopic.php?t=280
** http://mega-nerd.com/FPcast/
*/
inline int double2int(double flt)
{
int intgr;
asm("fld flt");
asm("fistp intgr");
return intgr ;
}


/*
** http://relishgames.com/forum/viewtopic.php?t=280
** http://mega-nerd.com/FPcast/
*/
inline int float2int(float flt)
{
int intgr;
asm("fld flt");
asm("fistp intgr");
return intgr;
}



C:\Dev\hge17\include\hgeresource.h:30: warning: `struct ResDesc' has virtual functions but non-virtual destructor
obj\Debug\main.o:: In function `ZSt9make_pairISsP12hgeAnimationESt4pairIT_T0_ES3_S4_':
C:\Dev\MinGW\bin\..\lib\gcc\mingw32\3.4.5\..\..\..\..\include\c++\3.4.5\bits\stl_pair.h:(.text$_ZN8AE_Tools9float2intEf[AE_Tools::float2int(float)]+0x8):: undefined reference to `flt'
C:\Dev\MinGW\bin\..\lib\gcc\mingw32\3.4.5\..\..\..\..\include\c++\3.4.5\bits\stl_pair.h:(.text$_ZN8AE_Tools9float2intEf[AE_Tools::float2int(float)]+0xe):: undefined reference to `intgr'
:: === Build finished: 2 errors, 1 warnings ===


Can anyone see what's wrong please?
Thank you.]]>
Resizeable HGE Window game http://relishgames.com/forum/index.php?p=/discussion/6374/resizeable-hge-window-game Mon, 29 Oct 2012 08:14:11 -0400 SantalLican 6374@/forum/index.php?p=/discussions I want to apply these changes for my changed HGE project. :):)

(Remark : This may be a great idea.)]]>
Render with batch crashed http://relishgames.com/forum/index.php?p=/discussion/6368/render-with-batch-crashed Sat, 27 Oct 2012 07:19:24 -0400 SantalLican 6368@/forum/index.php?p=/discussions
When I render a sprite object with batch, it's crashed.
I don't know how to render with batch properly.
(... I'm trying rendering a title map with a single texture)

If anyone knows, post some example code please. For example rendering a sprite 500 times (with batch);
]]>
Frame Function http://relishgames.com/forum/index.php?p=/discussion/6366/frame-function Wed, 24 Oct 2012 14:22:59 -0400 jwladi 6366@/forum/index.php?p=/discussions error: no matching function for call to 'HGE::System_SetState(hgeFuncState, )'

It is possible to do that?

thanks]]>
Pixel shader http://relishgames.com/forum/index.php?p=/discussion/4859/pixel-shader Mon, 04 May 2009 14:16:02 -0400 franticfreddy 4859@/forum/index.php?p=/discussions
I would like to use some blur on some of my different layer scene.
for exemple render background , then apply some blur and then render front.

Any one have a simple example of using Pixel shader within HGE ?
( i have absoltly no programming knowledge of pixel shader ;) only theorical knowledge )

So some kind of tutorial , or code would be very usefull.

Thanks]]>
FontEffManager v 1.0 http://relishgames.com/forum/index.php?p=/discussion/6333/fonteffmanager-v-1.0 Wed, 18 Jul 2012 05:48:11 -0400 SantalLican 6333@/forum/index.php?p=/discussions This is FontEffManager, useful for creating complex font effects and "hgeTextBox" object.
Thank to Windy.
Download (header/lib + some fonts) :
http://www.fileden.com/files/2012/4/13/3291462/FontEffManager%20v%201.0.zip

Features :
-UNICODE support (WCHAR /wchar_t)
-Uses CharEx structure for drawing. (Defines all character's parameters)
-Extremely fast.
-Lots of stuff.

Usage :

Add the include/lib files to your project :
- Include : FontEff.h & hgefont.h (Replace)
- Lib: TextEx.lib

Beginners :
You'll need to:
1 - Init (FontEff /TextEx) class.
2 - Set TextEx::info animation by use TextEx::Math function.
3 - Draw your custom string by TextEx::TextOut (Look like Render function (hgeFont)).

infoData : Creates effects in "TextOut" function . (Multiply original result (info))
Usage : infoData::m::... //Type can be : Rot,Scale,Prop,...
Data member :
fVal : Current mul value (Default : 1.0 (Do nothing))
fAdd : Adds fVal (fAdd) value per character.
fMultiply : Multiplies fVal (fMultiply) value per character.
fEnd : If this value greater than 0, then divides itself by total character then set this value to fAdd. (Default : 0)

Example :

#include "FontEff.h"
TextEx *Txt;
//Update...
gui->Update(dt);
//Render...
Txt->TextOut(100, 150, HGETEXT_LEFT, "Sample Text");//or
//Txt->TextOut(100, 150, HGETEXT_LEFT, "123456789\n123456789123456789\n123456789\n...");
//Init...
Txt = new TextEx(1, fnt, 100, 150); //Id = 1; x = 100 ; y = 150
//Do something
Txt->Math(Scale,0.2f,5.0f); //Increase scale value by 0.2f per second. (Time : 5.0f = 5 second)
Txt->infoData.mTrack.fEnd = 100; //You can try with Scale,Prop,... See z_TypeInfo for more details.
gui->AddCtrl (Txt);


Now,let's start !
You'll need to:
1 - Use TextEx::SetText function.
2 - Try to discover TextEx::strTextEx (Array of character data) and view your changes immediately.
3 - Remember TextEx::SetTextMode & TextEx::GetTextMode.
4 - SetMath is the same as Math function,but it's target is strTextEx[nIndex].

You can write :
Txt->Math(...)->SetText(...)->SetTextMode(...)->...


Tip :
1 - strTextEx has "sprSymbol" member that allow user set custom sprite instead of default character sprite.
2 - If you want to edit text directly on the screen, disable "ReadOnly" attribute.
3 - Don't directly change strTextEx[...].chr member ! Use edit functions instead. (TextEx::Text_... (Delete,Insert,...))
4 - If it's buffer is full, you can use TextEx::Size_Add or TextEx::New function to allocate more space. To get size of buffer,use TextEx::GetMaxCharactersSize.
5 - If you wanna create smooth animation effect , please change your code :
Ex :
Txt->Math(Y, -10, 3.0f);

To :
Txt->Math(Y, Null, Null, -10, 3.0f);


Example : (EditBox with Tracking Effect)

#include "FontEff.h"
TextEx *Txt;
//Update...
gui->Update(dt);
//Render...
gui->Render();
//Init...
FontLoader *fntLoader = new FontLoader("Verdana");
Txt = new TextEx(1,new hgeFont(fntLoader->vChars,fntLoader->GetTexture()),100,150,700,50); //w = 700, h = 50
//Do something
// Method 1 Example (Tracking)
/*
Txt->Math(Tracking,5.0f,4.0f); //Increase tracking value by 5.0f per second. (Time : 4.0f = 4 second)
//Todo : Add more init code here

//Copy (info) member to all character member (strTextEx).
Txt->SetText("Sample Text")->SetTextMode(ReadOnly, false); //Allow Edit
*/

// Method 2 Example (Tracking)
/*
Txt->SetText("Sample Text")->SetTextMode(ReadOnly, false); //Allow Edit
for(int i = 0;i < Txt->GetTextLen();i++)
Txt->SetMath(i,Tracking,5.0f,4.0f);
*/
//Todo : Add more init code here

//Let's rock now !
Txt->Start();
gui->AddCtrl (Txt);
delete fntLoader;

Download tutorials & samples here :
Tutorial [0] (3)
Sample [0] (2)

That's just basic,I will post my documentation later.
Any question ?
]]>
Linker error [Solved] http://relishgames.com/forum/index.php?p=/discussion/6355/linker-error-solved Mon, 08 Oct 2012 11:53:26 -0400 jwladi 6355@/forum/index.php?p=/discussions
obj\Debug\source\main.o||In function `WinMain@16':|
D:\sdl\TrivialHGE\source\main.cpp|72|undefined reference to `hgeAnimation::hgeAnimation(unsigned long, int, float, float, float, float, float)'|
||=== Build finished: 1 errors, 0 warnings ===|

I've declared a global as:

hgeAnimation *anim;

and after that I've created my animation after hge->SystemInitiate():

anim = new hgeAnimation(tex, 18, 1, 0, 0, 34,34);

until now all works fine, I've used all classes without problems, sprites, textures, GUI and GUIControls, etc.

I've included sprite and animation.h

¿Can you help me?

PD. Sorry by my poor english
]]>
Hey, i want to know font size http://relishgames.com/forum/index.php?p=/discussion/6345/hey-i-want-to-know-font-size Tue, 02 Oct 2012 03:01:02 -0400 laguz 6345@/forum/index.php?p=/discussions t_text->printf(125, 100, HGETEXT_LEFT, "Hey ");
t_text->SetColor(0xFFFFFFFF); // text color

I trying to font Location & Color, but i can't changed the font size
where is it?
What should i do? ]]>
Tut 2 [SOLVED] http://relishgames.com/forum/index.php?p=/discussion/6343/tut-2-solved Mon, 01 Oct 2012 11:14:07 -0400 jwladi 6343@/forum/index.php?p=/discussions
some idea? Thanks]]>
hey all, i want changed the icon do u know? http://relishgames.com/forum/index.php?p=/discussion/6342/hey-all-i-want-changed-the-icon-do-u-knows Sun, 30 Sep 2012 10:41:06 -0400 laguz 6342@/forum/index.php?p=/discussions i want to change the Icon in HGE Engine

the icon is normal application
ex) ㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡ
|ㅁ <-(Normal application Icon) |<br /> | ㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡ |
| |
| |
| |
ㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡ
How change the icon?]]>
Help me! I don't know Total Game Save in HGE http://relishgames.com/forum/index.php?p=/discussion/6341/help-me-i-dont-know-total-game-save-in-hge Wed, 26 Sep 2012 21:36:08 -0400 laguz 6341@/forum/index.php?p=/discussions i don't know Game Save in HGE Engine

how can Save all Game of Data]]>
Changing resolution at runtime? http://relishgames.com/forum/index.php?p=/discussion/3810/changing-resolution-at-runtimes Mon, 14 Jan 2008 22:24:12 -0500 Phoenix 3810@/forum/index.php?p=/discussions
I'm having a bit of a trouble; I've managed to make my game resolution independent, and it works like a charm.
However, I'd like to allow the user to change the resolution of the HGE window in an options menu whilst the game is running, but I've yet to find a way to change the screen size after System_Initiate() has been called. I've also found out that calling System_Initiate() twice gives me an error.

Any ideas on how to allow resolution changing?

Thanks,
Martin]]>
Weird Linker Error [SOLVED] http://relishgames.com/forum/index.php?p=/discussion/6329/weird-linker-error-solved Wed, 23 May 2012 21:26:04 -0400 Jeffrey 6329@/forum/index.php?p=/discussions #include path
include_directories(
${PROJECT_SOURCE_DIR}/include
${HGE_INCLUDE_DIR}
${IKL_INCLUDE_DIR}
${BOOST_DIRECTORY}
)

#include all files
FILE(GLOB CORE_SRCS source/core/*.cpp)
FILE(GLOB TOOL_SRCS source/tools/*.cpp)
FILE(GLOB GAME_SRCS source/game/*.cpp)

#Making a compiled library
add_library(GAMECORE_LIBRARY ${CORE_SRCS} ${HGE_LIBRARY} ${HGE_HELPER_LIBRARY})

#add executable
add_executable(DemoGame ${GAME_SRCS})

##link executable to HGE lib
TARGET_LINK_LIBRARIES(DemoGame ${HGE_LIBRARY} ${HGE_HELPER_LIBRARY} ${IKL_LIBRARY} GAMECORE_LIBRARY)

if(BUILD_TOOLS)
add_executable(EntityTool ${TOOL_SRCS})
TARGET_LINK_LIBRARIES(EntityTool ${HGE_LIBRARY} ${HGE_HELPER_LIBRARY} ${IKL_LIBRARY} GAMECORE_LIBRARY)
endif(BUILD_TOOLS)

this is my current cmake ..

I get a weird linker error for hgeGUI class
eg : DemoGame/source/core/GameMainMenu.cpp:74: undefined reference to `hgeGUI::hgeGUI()'

This only happens when I try to compile the core files into a static library.
When I add the executable with the CORE_SRCS and remove the dependencies on my current compiled library .. it will work fine..

Any Solutions ?

Also I tried copy pasting the hgegui.cpp file into my core sources directory .. and change the #include "..\..\include\hgegui.h" to #include "hge.h"

After that my linker code resolves the issue but I get segmentation faults but I m guessing linking the file in the previous step was not right ..

Please help me... T_T
]]>
Sounds & Music for your Game http://relishgames.com/forum/index.php?p=/discussion/6240/sounds-music-for-your-game Thu, 22 Sep 2011 19:15:20 -0400 bryan226 6240@/forum/index.php?p=/discussions
For anyone searching Music & Sound effects for their Games i've got a little list up here:

Pages:

Freesound.org - Large sound/effects library
Soundbible.com - Good one for effects
Jamendo.com - Large library for music, paid and free (Creative Commons)

Greetings,
bryan226]]>
2D tile map editors http://relishgames.com/forum/index.php?p=/discussion/3944/2d-tile-map-editors Fri, 04 Apr 2008 06:05:15 -0400 Uhfgood 3944@/forum/index.php?p=/discussions
http://mapeditor.org/
http://tilestudio.sourceforge.net/
http://members.aol.com/opentume/ (might be dos based)
http://www.arrakis.es/~esanchez/
http://devlinslab.blogspot.com/2007/11/simple-tile-map-editor.html
http://kotisivu.dnainternet.net/ttilli/tilemapeditor/main.htm
http://helixsoft.nl/project_page.php?file_name=tegel.proj (for allegro)
http://saqscrap.com/saqmap.aspx
http://home20.inet.tele.dk/progs/maximapper.htm (blitz basic)

Added December 7th, 2010 -
http://tide.codeplex.com

There are probably more, but I'm too lazy to look them all up.

Added on April 07, 2008
http://www.mercior.com/files/hge_map_tut.zip (zip format, no webpage as of yet).]]>
[beginner] NEED HELP! http://relishgames.com/forum/index.php?p=/discussion/6315/beginner-need-help- Wed, 14 Mar 2012 18:00:53 -0400 PoVka 6315@/forum/index.php?p=/discussions
problem #1.
i created class for my objects everything went smooth untill i wanted to save class to other file becouse i dont want to keep all of my classes in main .cpp files later on. But i cant do this, i get errors saying hge not found, but if i define hge like this : "HGE *hge = 0;" in class file it says hge has already been defined. (can someone explain me how this works?)

this is my WORKING code(class in .cpp file); ////WARNING: DRAGONS BE THERE
http://pastebin.com/uAUgFp0q

this is how i tried to get it working (and awcourse failed):
main .cpp file: http://pastebin.com/iUwjpJH8
class .h file: http://pastebin.com/zEF2RJBs
(i didint put class functions to other .cpp file jsut untill ill get it working):

i dont really get how HGE* hge; pointer works, hope i can get some explanation here. I would be very thankfull if someone could make me working,simple example how to get classes into separate files.


problem #2
I can only create static arrays of objects:
CPlayer obj[10];

i need dynamic arrays so i can create, destroy and do other things with my objects later in game, i tried this:
CPlayer *obj;
obj = new CPlayer[10];

wont work, wheres the problem?
----------------------------------------
Ill be thankfull for critics, suggestions on my ugly code so i can learn ;)


-----------------------------------------
note: English is not my primary language, sorry if i made terrible grammar mistakes.



]]>
Did somebody developed a game with a word/number tiles? http://relishgames.com/forum/index.php?p=/discussion/6306/did-somebody-developed-a-game-with-a-wordnumber-tiless Fri, 24 Feb 2012 00:36:02 -0500 sgfrd07 6306@/forum/index.php?p=/discussions
i hope somebody could help.]]>