On Suday the 11th of February, 2007 -after 3 and a half years on InvisionFree, we have moved! This old board remains as a read only archive of years past, and registration has been disabled here. All new and current members should register at http://www.cpplc.net/forum .


Please help out
Google

  Reply to this topicStart new topicStart Poll

> Zelda Fangame: The Spirit World, OpenGl:2d:source included
aab
Posted: Aug 21 2005, 04:15 PM
Quote Post


I bet your reading this


Group: Members
Posts: 169
Member No.: 1,075
Joined: 9-November 04



This is a Legend of Zelda Fangame made in the style of {The legend of Zelda: a link to the past}


It was made for a competition on the forum Zelda Fan Game Central,
in which the code is produced within the two week corridor of the competition.

They extended the competition to three weeks but i had planned to go on holiday
the day i entered my game so i couldnt take advantage of the extra.


The enemies AI isnt any good and there are no bosses (i practically made all the enemies in the last day).



Coded using OpenGL's Orthographic projection mode.
This is the second program ive made in C++, first using OpenGL.

Also remmember that it was only made in two weeks.



Screens{

user posted imageuser posted image
http://img.photobucket.com/albums/v335/aabants/Screen28.png
http://img.photobucket.com/albums/v335/aabants/Screen29.png
http://img.photobucket.com/albums/v335/aabants/Screen30.png
http://img.photobucket.com/albums/v335/aabants/Screen31.png
http://img.photobucket.com/albums/v335/aabants/Screen24.png
http://img.photobucket.com/albums/v335/aabants/Screen25.png
http://img.photobucket.com/albums/v335/aabants/screen20.png
http://img.photobucket.com/albums/v335/aabants/screen21.png
http://img.photobucket.com/albums/v335/aabants/screen22.png
http://img.photobucket.com/albums/v335/aabants/screen24.png
http://img.photobucket.com/albums/v335/aabants/screen23.png

}





So, Yet another adventure in which Link must adventure through darkness, fire and ice for the salvation of Hyrule. Enjoy...if you will.


DOWNLOAD around 14 Megszipped{

.............CLICK_HERE_TO_DOWNLOAD


.............Currently being Held by zfgc.com for competition/member playing purposes
.............Topics{
..........................http://www.zfgc.com/forum/index.php?topic=21276.0 :General FAQ: Quite important
..........................http://www.zfgc.com/forum/index.php?topic=17875.0 :While it was WIP Topic:
.............}
}


The Game also includes the Full C++ Source, and Read the README file for the key controls and Details of what can be done with the free software and code.
The .exe Two_Week_Project is the game.



Game Tips for when you play it:

Try and get the Red Tunic, Master Sword and Silver Arrows even though you dont need them:
user posted image
and you can get up to six hearts (8 containers to be found). Gotta catch 'em all.

Also, using + and - on the NumberPad will quickly change your equipped item.




Voting for the competition begins on Wednesday the 24th, i believe. ( 50% of score = Zelda Fan Game Central members votes; )

..Wish me luck!


--------------------
-------------------------------------------------------------------
PMEmail Poster
Top
Viper
Posted: Aug 21 2005, 04:47 PM
Quote Post


Vx


Group: Members
Posts: 1,174
Member No.: 1,199
Joined: 6-February 05



The screens looks really nice!
Too bad I can't play it (I have overheating problems).
The graphics are very zelda-gameboyish, and I am a pretty big fan of those games.

I wish you the biggest of luck in the competition smile.gif
I will download it to have a look at the source.


--------------------
█░█ █▀▀ █░█
█▀█ █▀▀ ▀█▀
▀░▀ ▀▀▀ ░▀░

█▀▀ ███ █▀█ █▀▀ █▀█ █▀▀
█░░ █░█ █░█ █▀▀ ██▀ ▀▀█
▀▀▀ ▀▀▀ ▀▀▀ ▀▀▀ ▀░▀ ▀▀▀
PMEmail PosterMSN
Top
aab
Posted: Aug 21 2005, 04:58 PM
Quote Post


I bet your reading this


Group: Members
Posts: 169
Member No.: 1,075
Joined: 9-November 04



Thanks.
ouch Overheating problems are the scariest sad.gif


--------------------
-------------------------------------------------------------------
PMEmail Poster
Top
ANGel`as
Posted: Aug 21 2005, 06:17 PM
Quote Post


semi-N00b


Group: Members
Posts: 24
Member No.: 1,436
Joined: 13-August 05



the link "CLICK HERE TO DOWNLOAD" doesn't work for me sad.gif
PMEmail PosterICQYahooMSN
Top
Dante Shamest
Posted: Aug 21 2005, 07:34 PM
Quote Post


nerd


Group: Members
Posts: 138
Member No.: 404
Joined: 22-December 03



The link seems to work for me.

The game's is pretty impressive. Good job aab. smile.gif


--------------------
PMEmail PosterUsers Website
Top
ih8censorship
Posted: Aug 21 2005, 08:38 PM
Quote Post


Megalomaniac


Group: Admin
Posts: 2,469
Member No.: 1
Joined: 20-June 03



Thats pretty nice work ! Did you make the graphics too? you should write a tutorial or something on graphics if ya did. Especialy since you only spent two weeks on it. I'll have to find some time to play it a little more in depth.


--------------------
user posted image

The Windows Operating system is so buggy. most of my c++ programs wont run on it. i do not write programs with bugs. my programs just do random things.

Join Marapets
PMEmail PosterUsers Website AOLMSN
Top
Nintendofreak88
Posted: Aug 21 2005, 08:58 PM
Quote Post


Programming Addict


Group: Super Moderator
Posts: 757
Member No.: 374
Joined: 13-December 03



All I can say is wow, great job on this. I'll have to look over the source, it seems like quite an impressive piece of work you have here. One suggestion, don't use JPG for the opening cinema images, it looks pretty bad with the compression. Try to use a lossless format like PNG. When you hit a rat in teh opening dungeon, it doesn't take away any hearts on the heart meter for some reason. Also, when you get a game over, why not have it return to the main menu instead of exiting the game. Overall, great job! smile.gif

EDIT: I noticed your way of changing fullscreen and windowed mode doesn't move my windows like Open GL normally does. What did you do differently for this?


--------------------
Formerly known as Nintendofreak88. My Web Site

user posted image
user posted image
user posted image
PMEmail PosterUsers Website
Top
Neken
Posted: Aug 21 2005, 10:07 PM
Quote Post


DirectX Guru


Group: Members
Posts: 338
Member No.: 1,305
Joined: 29-April 05



Too bad i'm stuck on a 56k, i'll have to wait next week to try it tongue.gif


--------------------
user posted image
PMEmail Poster
Top
aab
Posted: Aug 21 2005, 11:22 PM
Quote Post


I bet your reading this


Group: Members
Posts: 169
Member No.: 1,075
Joined: 9-November 04



QUOTE (Nintendofreak88 @ Aug 21 2005, 08:58 PM)
All I can say is wow, great job on this. I'll have to look over the source, it seems like quite an impressive piece of work you have here. One suggestion, don't use JPG for the opening cinema images, it looks pretty bad with the compression. Try to use a lossless format like PNG. When you hit a rat in teh opening dungeon, it doesn't take away any hearts on the heart meter for some reason. Also, when you get a game over, why not have it return to the main menu instead of exiting the game. Overall, great job! smile.gif

EDIT: I noticed your way of changing fullscreen and windowed mode doesn't move my windows like Open GL normally does. What did you do differently for this?

I understand all about what images i should use, but ive no libraries for loading png's and ive no idea how to do it myself.
I just used jpg's as i didnt want to have to mipmap and so lose distinctive quality (or work around it by padding the dib before i built a gl texture from it), and so the minimum size for the file was quite large in order to be size^2: Too large for using a bmp or tga (i didnt want poeple downloading to have all that extra....although i suppose so much is blank the .zip would have alot of compressing on it but its fine now.., and the only other image type i (currently) can load is a jpeg. (The jpeg loading function i mades buggy though, as i discovered yesterday: Only loads dword alignd width-jpg's, but its too late to change it).
In the original plan there was alot more story, and so alot more screens to put in the game, hence why i initially planned jpeg's as there were initially so many.

I dont know what you mean by the moving window "like Open GL normally does"...


It was just laziniess on the death and not returning to the game menu: I sacraficed the few minutes it would have taken to do that for the competition lol.
The rat probobly does remove health, just not very much. ..and...er...there werent any rats blink.gif ..Serpents..they remove a little health thers no question on that (the harm and hp removal being carried out in a abclass for enemies => they all harm you under the same code)

QUOTE (ih8censorship @ Aug 21 2005, 08:38 PM)

Thats pretty nice work ! Did you make the graphics too? you should write a tutorial or something on graphics if ya did

No not really: most of them are from the legend of zelda a link to the past, just recoloured. I did produce the title screens/back drops with the text before them and most of the npc's though. I do have alot of my own graphics though in that style (ie i could make such graphics as ive made alot of similar things).


ANGel`as : http://www.zfgc.com/zfgccontest/exes/Release.zip


--------------------
-------------------------------------------------------------------
PMEmail Poster
Top
Nintendofreak88
Posted: Aug 22 2005, 01:36 PM
Quote Post


Programming Addict


Group: Super Moderator
Posts: 757
Member No.: 374
Joined: 13-December 03



QUOTE
I understand all about what images i should use, but ive no libraries for loading png's and ive no idea how to do it myself.

Why not download libpng?

QUOTE
I dont know what you mean by the moving window "like Open GL normally does"...

Well this doesn't happen with a lot of people, but normally when I run an open gl app in fullscreen it moves all my windows to the lower right corner of the screen. Yours, however, left them as-is. In your game, do you leave the screen resolution the native, or do you use a different screen mode than usual?


--------------------
Formerly known as Nintendofreak88. My Web Site

user posted image
user posted image
user posted image
PMEmail PosterUsers Website
Top
aab
Posted: Aug 22 2005, 02:47 PM
Quote Post


I bet your reading this


Group: Members
Posts: 169
Member No.: 1,075
Joined: 9-November 04



QUOTE

Why not download libpng?

K ill look it up : thanks.


As for the windows moving, at first i thought you meant my window, not all others lol.
I only ever change the display settings during the WM_ACTIVATE message (ie handle screen change in my WindowsProcedure)..that might have something to do with it, as changing it while another window is active might alter that window..hmm...

The Windows style is WS_POPUPWINDOW|WS_CLIPSIBLINGS|WS_CLIPCHILDREN.
I found that my game would slow down if i used a WS_POPUP style,
so using WS_POPUPWINDOW, it would run properly but have a 1-pixel black border around the edges (take a screenprint and paste into paint to see it).

This is the function that changes the display...
g2er is just an enum, so all the g2er_..etc's are just possible errors.
CODE

g2er GL2D::SetFullScreen(UINT sw,UINT sh,UCHAR bpp,UINT Hz){

           if(!sw){if(this->w<1)return(g2er_INVALID_MEMBER);            sw=this->w;}
           if(!sh){if(this->h<1)return(g2er_INVALID_MEMBER);            sh=this->h;}
           if(bpp<0||Hz<0||sw<0||sh<0)return(g2er_INVALID_PARAMETER);

           
           DEVMODE DevMode={0};

           if(!EnumDisplaySettings(NULL,ENUM_CURRENT_SETTINGS,&DevMode))return(g2er_FAILED_RELATE);

           DevMode.dmPelsWidth=sw;
           DevMode.dmPelsHeight=sh;
           if(bpp)DevMode.dmBitsPerPel=bpp;
           if(Hz)DevMode.dmDisplayFrequency=Hz;

           if(bpp&&Hz){
                                   DevMode.dmFields=DM_PELSWIDTH|DM_PELSHEIGHT|DM_DISPLAYFREQUENCY|DM_BITSPERPEL;
           }else if(bpp){
                                   DevMode.dmFields=DM_PELSWIDTH|DM_PELSHEIGHT|DM_BITSPERPEL;
           }else if(Hz){
                                   DevMode.dmFields=DM_PELSWIDTH|DM_PELSHEIGHT|DM_DISPLAYFREQUENCY;
           }else{
                                   DevMode.dmFields=DM_PELSWIDTH|DM_PELSHEIGHT;
           }

           switch(ChangeDisplaySettings(&DevMode,CDS_FULLSCREEN)){
           case DISP_CHANGE_SUCCESSFUL            :break;
           //case DISP_CHANGE_BADDUALVIEW       :return(g2er_DISP_CHANGE_BADDUALVIEW);
           case DISP_CHANGE_BADFLAGS                :return(g2er_DISP_CHANGE_BADFLAGS);
           case DISP_CHANGE_BADMODE                 :return(g2er_DISP_CHANGE_BADMODE);
           case DISP_CHANGE_BADPARAM                :return(g2er_DISP_CHANGE_BADPARAM);
           case DISP_CHANGE_FAILED                      :return(g2er_DISP_CHANGE_FAILED);
           case DISP_CHANGE_NOTUPDATED            :return(g2er_DISP_CHANGE_NOTUPDATED);
           case DISP_CHANGE_RESTART                  :return(g2er_DISP_CHANGE_RESTART);
           }
           this->ScreenSet=true;

           return(g2er_NO_ERROR);

}


--------------------
-------------------------------------------------------------------
PMEmail Poster
Top
Nintendofreak88
Posted: Aug 23 2005, 10:23 PM
Quote Post


Programming Addict


Group: Super Moderator
Posts: 757
Member No.: 374
Joined: 13-December 03



Ah, i'll try that in my own project.

QUOTE
I found that my game would slow down if i used a WS_POPUP style,
so using WS_POPUPWINDOW, it would run properly but have a 1-pixel black border around the edges (take a screenprint and paste into paint to see it).

Why not ~WS_BORDER in teh window styles to remove the thin line border that appears? Or you could just use WS_POPUP | WS_SYSMENU. This is what MSDN says about the WS_POPUPWINDOW style:
QUOTE
Creates a pop-up window with the WS_BORDER, WS_POPUP, and WS_SYSMENU styles.

Also, one question regarding your code. What is the difference between g2WS_BFULLSCREEN and g2WS_NFULLSCREEN?


--------------------
Formerly known as Nintendofreak88. My Web Site

user posted image
user posted image
user posted image
PMEmail PosterUsers Website
Top
aab
Posted: Aug 23 2005, 11:25 PM
Quote Post


I bet your reading this


Group: Members
Posts: 169
Member No.: 1,075
Joined: 9-November 04



They are defined 0 and 1 (respectively)

The Function g2CreateWindow() has an input DWORD g2dwStyle.
If it is 0 or 1 it will apply the appropriate styles, otherwise it will use g2dwStyle as the windows style:
CODE

           //Get Correct Style and dimensions based on g2dwStyle
           
           if(g2dwStyle==g2WS_BFULLSCREEN){

                       dwStyle=WS_POPUPWINDOW|WS_CLIPSIBLINGS|WS_CLIPCHILDREN;

           }else if(g2dwStyle==g2WS_NFULLSCREEN){

                       dwStyle=WS_POPUP|WS_CLIPSIBLINGS|WS_CLIPCHILDREN;

           }else{
                       dwStyle=g2dwStyle;
                       r.left=x;       //Apply the rectangle used for the window
                       r.top=y;       //To be at the desired location, as fullscreen (=>x,y made 0) likely isnt being used
           }


--------------------
-------------------------------------------------------------------
PMEmail Poster
Top
« Next Oldest | C++ Creations | Next Newest »

Topic Options Reply to this topicStart new topicStart Poll


Skin selector developed by XJONX. Skins created by various members of the IF Skin Zone and InvisionFree Skinning

Please help out
Hosted for free by InvisionFree (Terms of Use: Updated 7/7/05) | Powered by Invision Power Board v1.3 Final © 2003 IPS, Inc.
Page creation time: 0.1251 seconds | Archive