HGE Game Engine http://relishgames.com/forum/index.php?p=/categories/hge/feed.rss Sat, 18 May 13 02:00:54 -0400 HGE Game Engine en-CA Wrongly sized window http://relishgames.com/forum/index.php?p=/discussion/6427/wrongly-sized-window Sun, 05 May 2013 20:38:15 -0400 DeathRay2K 6427@/forum/index.php?p=/discussions image
That's with a windows specified as 640x360. In reality it ends up being 630x350. But in every way it continues to act as though it's 640x360 (Coordinates inside the window work out that way), except when it's output to the screen. Ignoring the text in the top left, you can see the bands where rows and columns of pixels are simply skipped to arrive at the 630x350 final resolution. This doesn't happen in fullscreen, only while windowed.

I'm in Windows 8, compiling with VS2012.
Any ideas?]]>
Copy target to new texture? http://relishgames.com/forum/index.php?p=/discussion/6425/copy-target-to-new-textures Mon, 29 Apr 2013 21:35:35 -0400 Rectangle 6425@/forum/index.php?p=/discussions Since HGE creates it's textures using D3DPOOL_MANAGED, I appear to be limited on how to achieve this.
Using the same IDirect3DDevice9 pointer which HGE uses, I have attempted to get this to work using GetRenderTargetData, UpdateSurface, UpdateTexture, etc... and all attempts have failed with either E_FAIL or D3DERR_INVALIDCALL.

So I have the following questions:

  • What was the reasoning behind using D3DPOOL_MANAGED for texture creation?
  • Is it safe to modify HGE to use D3DPOOL_SYSTEMMEM instead? Would there be any negative downsides?
  • Other than using a slow, manual texture lock/copy/unlock operation, how could I copy HTARGET data to a newly created D3DPOOL_MANAGED texture?
]]>
HGE now officially incompatible with MingW http://relishgames.com/forum/index.php?p=/discussion/6417/hge-now-officially-incompatible-with-mingw Mon, 01 Apr 2013 23:46:58 -0400 formerBGIuser 6417@/forum/index.php?p=/discussions no longer runs properly with the version of MingW that
comes with the latest version of the CodeBlocks IDE (12.11).]]>
error LNK2026: module unsafe for SAFESEH image. (hgehelp.lib) http://relishgames.com/forum/index.php?p=/discussion/6415/error-lnk2026-module-unsafe-for-safeseh-image.-hgehelp.lib Sat, 23 Mar 2013 16:14:49 -0400 DeathRay2K 6415@/forum/index.php?p=/discussions Thanks,
Garnet]]>
drawing Korean Alphabet http://relishgames.com/forum/index.php?p=/discussion/4290/drawing-korean-alphabet Mon, 06 Oct 2008 13:02:04 -0400 Neo 4290@/forum/index.php?p=/discussions Please understanding my bad english grammer.

Font tool makes only english alphabet.
How to drawing Korean Alphabet on HGE Engine?]]>
A China HGE Group http://relishgames.com/forum/index.php?p=/discussion/1641/a-china-hge-group Thu, 03 Aug 2006 18:09:14 -0400 Benwen 1641@/forum/index.php?p=/discussions ???“???«QQ????????14159676

We are welcome other friends ,if you jion us (China HGE Group),and you have a QQ num ,and you can join our QQ group:14159676,let's go !]]>
help help http://relishgames.com/forum/index.php?p=/discussion/6409/help-help Mon, 18 Feb 2013 04:51:08 -0500 Death_Ko 6409@/forum/index.php?p=/discussions Spam HGE games? http://relishgames.com/forum/index.php?p=/discussion/6406/spam-hge-gamess Sun, 03 Feb 2013 02:02:22 -0500 SantalLican 6406@/forum/index.php?p=/discussions http://hge.relishgames.com/games.php and I don't see any new HGE game. Just there are some spam items are popped up on the top of the page.
The most recent item :

bad piggies
Type: Game
Status: Released
Updated: 22 Nov, 2012
Author: xxzxzcxzczxczxc

Download : "youtube.com"
Homepage : "youtube.com"

hahaahriahriahrhhurururururiririirrr

I have a small game, but I've lost my login information. So I want to delete it, or try to recover my login information if possible.

Is "HGE projects area" dead? Since the last HGE project "Zombies Nibble, Bombs Be Quick" is published on 4 Feb, 2012...]]>
Is it safe/advisable to use a render target in a quad? http://relishgames.com/forum/index.php?p=/discussion/6405/is-it-safeadvisable-to-use-a-render-target-in-a-quads Wed, 30 Jan 2013 22:48:28 -0500 formerBGIuser 6405@/forum/index.php?p=/discussions both kind of similar, I'm wondering if it's advisable to use a render target in the quad instead
of a regular texture loaded from disk. Part of how I concluded this is from looking at
hgesprite.h, where I noticed that an hgeSprite has a quad inside of it, so I figured they must
be pretty similar. So far, I was able to do this:


hgeQuad tarQuad = 0;
tarQuad.tex = Hge -> Target_Create(2048, 2048, false);


and at the end:


if(tarQuad.tex)
{
Hge -> Target_Free(tarQuad.tex);
tarQuad.tex = 0;
}


And, if this is a good thing to do, how would a person handle Gfx_RestoreFunc()?
Thanx in advance for any and all info. -B

Edited twice for formatting.]]>
is it possible? disabling antialiasing for resize/scaling http://relishgames.com/forum/index.php?p=/discussion/6403/is-it-possibles-disabling-antialiasing-for-resizescaling Fri, 25 Jan 2013 18:03:32 -0500 formerBGIuser 6403@/forum/index.php?p=/discussions 640x480 graphics and blow them up in memory, onto a render target to about 2 or 3 times their
original size, then go ahead and fit them to the actual size of the native video mode. The HGE's
normal method causes blurring to occur in that case. Thanks for any info.]]>
hey, hey how to use music pause in hge? http://relishgames.com/forum/index.php?p=/discussion/6395/hey-hey-how-to-use-music-pause-in-hges Mon, 03 Dec 2012 09:03:49 -0500 6395@/forum/index.php?p=/discussions
please, how to use music pause in hge?

Thank's]]>
C & Go bindings to HGE http://relishgames.com/forum/index.php?p=/discussion/6392/c-go-bindings-to-hge Wed, 28 Nov 2012 15:44:03 -0500 losinggeneration 6392@/forum/index.php?p=/discussions
The C bindings might be useful to others not wanting to use SWIG and roll a custom binding. You can find those here: http://code.google.com/p/hge-unix/ (under the c_api branch in Git.)
The Go bindings are on github: https://github.com/losinggeneration/hge-go
I also talk more about this in a blog post I made here: http://losinggeneration.homelinux.org/2012/11/27/hge-go-work/
* Edit * I should mention, I used hge-unix, but both do build/link against at least the official 1.81 release for Windows with (I think, it's been awhile) MinGW32. * End Edit*

Here's a very short example of the C API (tutorial01):
#include "hge_c.h"

HGE_t *hge = 0;

BOOL FrameFunc() {
if (HGE_Input_GetKeyState(hge, HGE_K_ESCAPE)) return 1;
return 0;
}

#ifdef PLATFORM_UNIX
int main(int argc, char *argv[])
#else
int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow)
#endif
{
hge = HGE_Create(HGE_VERSION);

HGE_System_SetStateFunc(hge, HGE_C_FRAMEFUNC, FrameFunc);
HGE_System_SetStateString(hge, HGE_C_TITLE, "HGE Tutorial 01 - Minimal HGE application");
HGE_System_SetStateBool(hge, HGE_C_WINDOWED, 1);
HGE_System_SetStateBool(hge, HGE_C_USESOUND, 0);

if(HGE_System_Initiate(hge)) {
HGE_System_Start(hge);
} else {
#ifdef PLATFORM_UNIX
fprintf(stderr, "Error: %s\n", HGE_System_GetErrorMessage(hge));
#else
MessageBox(NULL, HGE_System_GetErrorMessage(hge), "Error", MB_OK | MB_ICONERROR | MB_APPLMODAL);
#endif
}

HGE_System_Shutdown(hge);
HGE_Release(hge);

return 0;
}


Here's the same in the Go binding:
package main

import (
"fmt"
"github.com/losinggeneration/hge-go/hge"
"github.com/losinggeneration/hge-go/hge/input"
"os"
)

func FrameFunc() int {
if input.NewKey(input.K_ESCAPE).State() {
return 1
}

return 0
}

func main() {
h := hge.New()

h.SetState(hge.LOGFILE, "tutorial01.log")
h.SetState(hge.FRAMEFUNC, FrameFunc)
h.SetState(hge.TITLE, "HGE Tutorial 01 - Minimal HGE application")
h.SetState(hge.WINDOWED, true)
h.SetState(hge.USESOUND, false)

if err := h.Initiate(); err != nil {
fmt.Fprintln(os.Stderr, "Error: ", err)
} else {
defer h.Shutdown()
h.Start()
}
}
]]>
Hge Unix http://relishgames.com/forum/index.php?p=/discussion/6336/hge-unix Thu, 23 Aug 2012 14:37:24 -0400 OldBlackCat 6336@/forum/index.php?p=/discussions do u know scanf in hge? http://relishgames.com/forum/index.php?p=/discussion/6373/do-u-know-scanf-in-hges Sun, 28 Oct 2012 11:58:27 -0400 6373@/forum/index.php?p=/discussions
where using this?]]>
Assembly trouble http://relishgames.com/forum/index.php?p=/discussion/6367/assembly-trouble Wed, 24 Oct 2012 19:02:30 -0400 SantalLican 6367@/forum/index.php?p=/discussions
Should continue to try the assembly or not ? Maybe It gives a great speed optimization, but does anyone know about this and how to use it for classes...]]>
DX8 - Help ! http://relishgames.com/forum/index.php?p=/discussion/6354/dx8-help- Sat, 06 Oct 2012 19:51:22 -0400 SantalLican 6354@/forum/index.php?p=/discussions I've reinstalled Windows and I lost DirectX 8 SDK. Oh no, it's really awful !
How to download DX8 ? Help me.......................................]]>
replacing HGE logo http://relishgames.com/forum/index.php?p=/discussion/4244/replacing-hge-logo Tue, 02 Sep 2008 13:13:19 -0400 Aldaris 4244@/forum/index.php?p=/discussions May I replace HGE splash logo with my own for commercial project.
And how I can do it. I think that must be a overloaded function for shown logo.
P.S. sorry for bad english.]]>
Memory leak in Gfx_Clear() http://relishgames.com/forum/index.php?p=/discussion/6340/memory-leak-in-gfx_clear Tue, 25 Sep 2012 06:20:32 -0400 suliman 6340@/forum/index.php?p=/discussions
I get strange memory leaks from Gfx_Clear which is not nice. This is my entire frameFunc:

hge->Gfx_BeginScene();
hge->Gfx_Clear(0);
hge->Gfx_EndScene();


If i comment out the Gfx_Clear line i get no memory leaks, and if i dont have focus on the hge application i get no leaks either. The leaks i get is that every couple of seconds the app demands 200-600kb extra RAM and keeps taking more and more ( i monitor it with the task manager). What can this be about?

Replacing the Gfx_Clear(0) with

rrr.symbol[0]->Render(200,200);


removes the memory leak (rrr.symbol is a gfxsprite). So it doesn't seem to be related to graphics functions in general.

Thanks a lot
Erik]]>
HGE 1.8 Unicode Edition (+font) http://relishgames.com/forum/index.php?p=/discussion/3071/hge-1.8-unicode-edition-font Fri, 30 Nov 2007 12:26:47 -0500 elmortem 3071@/forum/index.php?p=/discussions
HGE 1.7 Unicode Edition

This version is fully transferred to the engine Unicode. So instead of char now need to use wchar_t.

Just supports Unicode-fonts.
As they do:
1. Downloading the program Bitmap Font Generator (www.AngelCode.com).
2. Gen describing the desired font characters in a text format.
3. A text file *. fnt convert to bmfconv.exe through the program.
4. The resulting binary file *. bmf put in the directory with the texture, the same load from the program.

Performance tested on the standard tutorialah attached to the original HGE 1.7.
If you have problems or if you see any mistakes, write.

email: reijii@darthman.com
icq: 400088801

Download: http://elmortem.mirgames.ru/?link=34 [812 kb] - dead]]>
printfb bug http://relishgames.com/forum/index.php?p=/discussion/5317/printfb-bug Tue, 12 Jan 2010 22:46:12 -0500 Fuzzy 5317@/forum/index.php?p=/discussions
after going on with the porting of my code i have run into this weird bug...

i'll work around it for now, however i'm wondering if it could not cause memory corruption in the long run...

how to raise the bug:

load your font (i used the default font1.fnt).

print something to the screen

fnt->printfb(0,0,500,10,HGETEXT_LEFT, "qsdfjklqsdfjlkdfqsklmjdfqsjklm");


then print something that doesnt fit in the box margins of printfb

fnt->printfb(0,fnt->GetHeight(),10,10,HGETEXT_LEFT, "test");


you will notice how it prints:
the first line ("qsdfjklqsdfjlkdfqsklmjdfqsjklm")
the test line ("test"), which it should cut off since it doesnt fit in the box
and below that it prints an unwanted line ... ("klqsdfjlkdfqsklmjdfqsjklm")

i believe it's because the buffer isnt cleared when the printfb function is called but since i'm currently too unexperienced in c++ i cannot verify this (havent learned buffer stuff yet).

greetings Fuzzy]]>
Stereographic projection (planet surfaces) ideas? (solved) http://relishgames.com/forum/index.php?p=/discussion/6328/stereographic-projection-planet-surfaces-ideass-solved Thu, 17 May 2012 04:14:06 -0400 mrfireturkey 6328@/forum/index.php?p=/discussions
In my current HGE project, I'm making a space game. I'm using perlin noise (libnoise) to generate planet surfaces, like so: http://libnoise.sourceforge.net/tutorials/images/sphericalheightmap.jpg

In my game I've created this fine, and copied the generated texture into an HTEXTURE, 512px x 256px. My problem is to cull and project this texture as a 2D planet, like a flattened 3D representation http://libnoise.sourceforge.net/tutorials/images/thumbs/celestia.jpg

I've attempted to use a distortion mesh but that may not be the way to go because I'm going to use this texture with sprites.

Does anyone have a good idea about how to go with this? The idea is to simply skew the texture and clip it to visible side, then it'll be just like any other 2D texture.

UPDATE:

Just going to to use a non-spherical perlin noise texture, and blend it with a shader and atmosphere texture as presented at this link:http://slick.javaunlimited.net/viewtopic.php?t=873

Not perfect but good enough for me.]]>
Basic project : in dumb english http://relishgames.com/forum/index.php?p=/discussion/3809/basic-project-in-dumb-english Mon, 14 Jan 2008 21:59:52 -0500 Jackpot 3809@/forum/index.php?p=/discussions

1>e:\documents and settings\jackpot\my documents\excess overload\version0.1\version0.1\main.cpp(23) : error C2664: 'MessageBoxW' : cannot convert parameter 2 from 'char *' to 'LPCWSTR'
1> Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast

The code is this :

#include <hge>

HGE *hge = 0;
bool FrameFunc()
{
if (hge->Input_GetKeyState(HGEK_ESCAPE)) return true;
return false;
}
int WINAPI WinMain(HINSTANCE, HINSTANCE, LPSTR, int)
{
hge = hgeCreate(HGE_VERSION);
hge->System_SetState(HGE_FRAMEFUNC, FrameFunc);
hge->System_SetState(HGE_WINDOWED, true);
hge->System_SetState(HGE_USESOUND, false);
hge->System_SetState(HGE_TITLE,
"HGE Tutorial 01 - Minimal HGE application");
if(hge->System_Initiate())
{
hge->System_Start();
}
else
{
hge->System_GetErrorMessage()
MessageBox(NULL, hge->System_GetErrorMessage(), "Error",MB_OK | MB_ICONERROR | MB_APPLMODAL);
}
hge->System_Shutdown();
hge->Release();

return 0;
}]]>
How use the texasm.exe http://relishgames.com/forum/index.php?p=/discussion/6318/how-use-the-texasm.exe Tue, 20 Mar 2012 01:16:40 -0400 xzw 6318@/forum/index.php?p=/discussions
list.dat file content
Texture background
{
filename=images\bg.png
resgroup=1
}

bug: texasm of log say: no resources in task!]]>
Unable to play MP3 file http://relishgames.com/forum/index.php?p=/discussion/6299/unable-to-play-mp3-file Wed, 08 Feb 2012 01:01:47 -0500 Barling 6299@/forum/index.php?p=/discussions

HMUSIC mus = 0;
....
mus = hge->Music_Load("test.mp3");
hge->Music_Play(mus, true);


I don't even get a "Failed to load resource: test.mp3" in my log file...so what's up?
I can't hear anything.
No errors, nothing.
By the way, I'm loading the mp3 file in my:
" if(hge->System_Initiate())
{
"

code block.
It gets declared outside the WINAPI function.]]>
Continuous movement http://relishgames.com/forum/index.php?p=/discussion/6301/continuous-movement Thu, 09 Feb 2012 16:10:04 -0500 dr84 6301@/forum/index.php?p=/discussions -------------------
Hi! I'm new here.
I just started using HGE. I've got a question for you:
I want to move my model continuously, but I don't know how.
This is what I've got:
-loaded the model (image)
-rendered it
-only way I can move it so far is, for example:


int charX=100, charY=100;
...
switch(hge->Input_GetKey())
{
case HGEK_LEFT:
charX -= 30;
break;

case HGEK_RIGHT:
charX += 30;
break;
}
...


Then, it instantly renders the character 30 pixels far from original.
How can I see the movement between the two points?
Thanks for your help in advance, greetings :)]]>
Can't draw my background http://relishgames.com/forum/index.php?p=/discussion/6298/cant-draw-my-background Tue, 07 Feb 2012 01:58:27 -0500 Barling 6298@/forum/index.php?p=/discussions All I see on my window is a black background.

I used pretty much the same code from tutorial 7 in the tutorials section of HGE.

#include
#include

#define SCREEN_WIDTH 480
#define SCREEN_HEIGHT 320

HGE *hge = 0;

HTEXTURE bgtex;
hgeSprite *bgspr;

bool FrameFunc()
{
if (hge->Input_GetKeyState(HGEK_ESCAPE)) return true;
return false;
}

bool RenderFunc()
{
hge->Gfx_BeginScene();
bgspr->Render(0,0);
hge->Gfx_EndScene();
return false;
}

int WINAPI WinMain(HINSTANCE, HINSTANCE, LPSTR, int)
{
hge = hgeCreate(HGE_VERSION);

hge->System_SetState(HGE_FRAMEFUNC, FrameFunc);
hge->System_SetState(HGE_RENDERFUNC, RenderFunc);
hge->System_SetState(HGE_WINDOWED, true);
hge->System_SetState(HGE_USESOUND, false);
hge->System_SetState(HGE_TITLE, "WINDOW");
hge->System_SetState(HGE_SHOWSPLASH, false );
hge->System_SetState(HGE_SCREENWIDTH, SCREEN_WIDTH);
hge->System_SetState(HGE_SCREENHEIGHT, SCREEN_HEIGHT);
hge->System_SetState(HGE_SCREENBPP, 32);

if(hge->System_Initiate())
{
hge->System_Start();
bgtex=hge->Texture_Load("bg2.png");
bgspr=new hgeSprite(bgtex,0,0,800,600);
bgspr->SetBlendMode(BLEND_COLORADD | BLEND_ALPHABLEND | BLEND_NOZWRITE);
bgspr->SetColor(0xFF000000,0);
bgspr->SetColor(0xFF000000,1);
bgspr->SetColor(0xFF000040,2);
bgspr->SetColor(0xFF000040,3);
}
else
{
MessageBoxA(NULL, hge->System_GetErrorMessage(), "Error",
MB_OK | MB_ICONERROR | MB_APPLMODAL);
}

hge->System_Shutdown();
hge->Release();

return 0;
}


PS: bg2.png is inside my Debug folder of my project (where my .exe and hge.dll files are).]]>
linker error building HGE_tut03 http://relishgames.com/forum/index.php?p=/discussion/6296/linker-error-building-hge_tut03 Wed, 01 Feb 2012 23:08:01 -0500 formerBGIuser 6296@/forum/index.php?p=/discussions
1>LINK : fatal error LNK1104: cannot open file 'LIBC.lib'

I pretty much followed the instructions for 'setting up a .NET project'.
I also loaded up the Visual C++ 6 project directly and let VC++2008
convert it with the same results. Previously I also set the project up
using my budding general knowledge of VS2008 and with the same results.
I have checked around on these forums and haven't come up with a
duplicate issue *that i noticed*. So, what gives?
]]>