FB HGEWrapper 2D Game Engine

User contributed sources that have become inactive, deprecated, or generally unusable. But ... we don't really want to throw them away either.
D.J.Peters
Posts: 8586
Joined: May 28, 2005 3:28
Contact:

Post by D.J.Peters »

last example are realy nice
Ryan
Posts: 695
Joined: Jun 10, 2005 2:13
Location: Louisville, KY
Contact:

Post by Ryan »

I've been working through the demos trying to think how I might work on games w/ HGE... and for the life of me I can't figure out sprite masking. :-/

Maybe I'm going about it all wrong... but I've got a .bmp spriteset from a previous project where I used RGB(255, 0, 255) as a masking color. Now with HGE I see I have SetColor, SetBlendMode, etc. but I just don't know what to use and when to use it for that color to show up transparent.

Could I maybe get a little help here and/or get clued in on some better methods of doing this? Thank you!
Dalex
Posts: 46
Joined: Dec 09, 2006 9:46
Contact:

Post by Dalex »

Ryan
in HGE of no ColorKey...
use TGA or PNG ... transparent channel
http://relishgames.com/forum/

or...

Code: Select all

Sub ColorKey(ByVal tex As Long,ByVal clr As dword)
Dim As dword Ptr pixels 
Dim ix As Integer
Dim iy As Integer
Dim  As Integer w = hge_Texture_GetWidth(tex)
Dim  As Integer h = hge_Texture_GetHeight(tex)
	 
For ix = 0 To w
   For iy = 0 To h
   pixels = hge_Texture_Lock(tex,0,ix,iy,w,h)
   If (*pixels=clr)then
   (*pixels)=ARGB(0,0,0,0)
   End If
   hge_Texture_Unlock(tex)
   Next 
Next 
End Sub
ColorKey(myTexture,ARGB(255,255,0,255))
notthecheatr
Posts: 1759
Joined: May 23, 2007 21:52
Location: Cut Bank, MT
Contact:

Post by notthecheatr »

I'm having trouble downloading...

I don't like those quickie hosts like file-pasta... when you re-post the link, is it OK if I host it on my server (and give you the link so you can post it)? Then there won't be any problems like that...
ciw1973
Posts: 157
Joined: Jun 12, 2007 15:03
Location: Isle of Man (United Kingdom)

Post by ciw1973 »

Yeah, I couldn't download the latest version, so I'm glad to hear it wasn't just me.
Dalex
Posts: 46
Joined: Dec 09, 2006 9:46
Contact:

Post by Dalex »

ciw1973
Yeah, I couldn't download the latest version, so I'm glad to hear it wasn't just me.
host has changed ...
ciw1973
Posts: 157
Joined: Jun 12, 2007 15:03
Location: Isle of Man (United Kingdom)

Post by ciw1973 »

Cool. I've got it now.
livewire
Posts: 78
Joined: Dec 07, 2006 3:43
Location: Orlando, FL

Post by livewire »

I get this error when I compile the following code:

GUI.o:fake:(.text+0x1d6): undefined reference to `hge_GUIListbox_AddItem'

I think this function is missing in the .dll or something.

Code: Select all

#Include  "inc/HgeType.bi"
#Include  "inc/HgeWrapper.bi"

Declare Function FrameFunc() As Integer
Declare Function RenderFunc() As Integer
Declare Sub Main()

Dim Shared As Long myFont
Dim Shared As Long myGUI
Dim Shared As Long myGUIText
Dim Shared As Long myGUIListbox

Main()

Function FrameFunc() As Integer
	If (hge_Input_GetKeyState(HGEK_ESCAPE)) Then Return 1
	Return 0
End Function

Function RenderFunc() As Integer
	hge_Gfx_BeginScene()
    hge_Gfx_Clear()
	hge_GUI_Render(myGUI)
	hge_Gfx_EndScene()
	Return 0
End Function

Sub Main()
	hge_Create(hge_VERSION)
	hge_System_SetStateFunc(HGE_FRAMEFUNC, @FrameFunc)
	hge_System_SetStateFunc(HGE_RENDERFUNC, @RenderFunc)
	hge_System_SetStateString(HGE_TITLE, "GUI")
	hge_System_SetStateBool(HGE_WINDOWED, 1)
	hge_System_SetStateInt(HGE_FPS, 200)
	hge_System_SetStateInt(HGE_USESOUND,0)
	hge_System_SetStateBool(HGE_SHOWSPLASH,0)
    hge_System_SetStateBool(HGE_HIDEMOUSE,0)
	If (hge_System_Initiate()) Then
		myFont = hge_Font("Res/font1.fnt",0)
		myGUI = hge_GUI()
        
		myGUIText = hge_GUIText(12345,100,100,80,20,myFont)
		hge_GUIText_SetText(myGUIText,"Hello")
		hge_GUI_AddCtrl(myGUI,myGUIText)
        
        myGUIListbox = hge_GUIListbox(54321,100,200,150,500,myFont,RGB(255,0,0),RGB(0,255,0),RGB(0,0,255))
        hge_GUIListbox_AddItem(myGUIListbox,"Testing")
        hge_GUI_AddCtrl(myGUI,myGUIListbox)
		hge_System_Start()
	Else
		MessageBox(NULL, "hge_System_GetErrorMessage", "Error", MB_OK Or MB_ICONERROR Or MB_APPLMODAL)
	End If  
	hge_System_Shutdown()
	hge_Release()
End Sub
Dalex
Posts: 46
Joined: Dec 09, 2006 9:46
Contact:

Post by Dalex »

livewire
GUI.o:fake:(.text+0x1d6): undefined reference to `hge_GUIListbox_AddItem'
Ok..thanks...correct in new version 0.1.7...
Dalex
Posts: 46
Joined: Dec 09, 2006 9:46
Contact:

Post by Dalex »

Update Version 0.1.7b first post ...(+8 function)
Update hge_GUI
New hge_Vector

Thanks... good luck...
KristopherWindsor
Posts: 2428
Joined: Jul 19, 2006 19:17
Location: Sunnyvale, CA
Contact:

Post by KristopherWindsor »

My car is broken, can I have a new one please? :-P

http://fusionware.ourproject.org/itech/ ... ge_car.png

I am very impressed with the quality and speed of this engine, and the actual EXE files are only 10-15K!!

That is why I am surprised, that the Internet does not have too much information about the library. (Not even a Wikipedia article.)

I have some questions, because I would like to know about this library.

Is it popular for game programmers, or do they mostly use DirectX instead?

If it uses the Box2D Physics Engine library for physics, does that mean licensing HGE (so I can use it commercially) would be extra complicated?

I probably have some more questions I forgot... :-)
vdecampo
Posts: 2992
Joined: Aug 07, 2007 23:20
Location: Maryland, USA
Contact:

Post by vdecampo »

Image

License
The zlib/libpng License

Copyright (c) 2003-2006 Relish Games

This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages arising from the use of this software.

Permission is granted to anyone to use this software for any purpose, including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions:

The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
This notice may not be removed or altered from any source distribution.
KristopherWindsor
Posts: 2428
Joined: Jul 19, 2006 19:17
Location: Sunnyvale, CA
Contact:

Post by KristopherWindsor »

Yes, but I'm not sure if the version posted here is a combination of HGE and Box2D.
Dalex
Posts: 46
Joined: Dec 09, 2006 9:46
Contact:

Post by Dalex »

Box2D
Copyright (c) 2006-2007 Erin Catto http://www.gphysics.com

This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
arising from the use of this software.

Permission is granted to anyone to use this software for any purpose,
including commercial applications, and to alter it and redistribute it
freely, subject to the following restrictions:

1. The origin of this software must not be misrepresented; you must not
claim that you wrote the original software. If you use this software
in a product, an acknowledgment in the product documentation would be
appreciated but is not required.
2. Altered source versions must be plainly marked as such, and must not be
misrepresented as being the original software.
3. This notice may not be removed or altered from any source distribution.
FbHGEWrapper-Permission is granted to anyone to use this software for any purpose...This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages arising from the use of this software...
Dalex
Posts: 46
Joined: Dec 09, 2006 9:46
Contact:

Post by Dalex »

KristopherWindsor
My car is broken, can I have a new one please? :-P

http://fusionware.ourproject.org/itech/ ... ge_car.png
Hmm...
phObj <= 512
Post Reply