|
|
|
|
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Warp wrote:
> stbenge <THI### [at] hotmailcom> wrote:
>> hgeSprite *tile[8*8]
>
>> and filled it like this:
>
>> v=0;
>> for(y=0;y<8;y++){
>> for(x=0;x<8;x++){
>> tile[int(v)]=new hgeSprite(tiles,x*132+1,y*132+1,128,128);
>> v++;
>> }
>> }
>
> Does the HGE library force you to write code like that? If so, then it
> really sucks.
Don't use HGE to insult me... if that's what you are doing. I could have
written my loop a different way and used less code, but I feel
comfortable typing it out that way. I come from a
QBASIC/Euphoria/POV-Ray background, so I code the l_o_n_g way. Or do you
mean the way each sprite has to be made new? There might be better ways
to do it, for all I know.
I think a good programmer would be able make a large, clean program
using libraries that may have problems. I would like to be that
programmer, and I'm humble enough to admit that I'm not there. When it
comes down to it, all libraries and all languages are going to have
problems.
Sam
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
stbenge wrote:
> There is no goal to the game. You just fly around in a near-infinite
> landscape.
That's very Zen. With the fading trails, that's sort of like one of those
rice-paper pads you write on with water.
> If you are running Windows, have DirextX 8.0 or above, and have some
> free time, could you download it and tell me what you think? With the
> default settings it should run at 60 FPS regardless on your monitor's
> refresh rate.
I think mine is saying 75FPS or so. I'm on Vista x64, and it runs flawlessly.
> I would like some feedback on a few things. What is your operating
> system? Does it work on Vista? What FPS are you getting? Do the default
> settings of 1280x960 fullscreen mode give you ultra-smooth scrolling?
Yes.
--
Darren New, San Diego CA, USA (PST)
The NFL should go international. I'd pay to
see the Detroit Lions vs the Roman Catholics.
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
stbenge <^@hotmail.com> wrote:
> Warp wrote:
> > stbenge <THI### [at] hotmailcom> wrote:
> >> hgeSprite *tile[8*8]
> >
> >> and filled it like this:
> >
> >> v=0;
> >> for(y=0;y<8;y++){
> >> for(x=0;x<8;x++){
> >> tile[int(v)]=new hgeSprite(tiles,x*132+1,y*132+1,128,128);
> >> v++;
> >> }
> >> }
> >
> > Does the HGE library force you to write code like that? If so, then it
> > really sucks.
> Don't use HGE to insult me...
I was not insulting you. I was asking if that's the only way of using
HGE (because if it is, then HGE really sucks as a C++ library).
> I could have
> written my loop a different way and used less code, but I feel
> comfortable typing it out that way.
The problem is not the loop. The problem is the 'news' and 'deletes'.
While there are situations where their use is completely ok and in fact
the best thing to do, those situations are usually rare.
Usually the "correct" way of, for example, creating a certain amount
of objects like that is:
std::vector<hgeSprite> tile;
tile.reserve(8*8);
for(...)
for(...)
tile.push_back(hgeSprite(...));
(The word "correct" is deliberately in quotation marks because it's,
quite naturally, not *always* the best way to do it. However, in most
cases this - or something similar - is.)
However, depending on how hgeSprite has been designed, that might not
be possible. For example, if it doesn't have a properly working copy
constructor (or it has been disabled), then that method cannot be used.
If that's the case, then you indeed have to either allocate things with
'new', or use other dirty tricks to get it working. And it would also be
a sign of sloppy design in the HGE library.
The problem with using 'new' and 'delete' like that is that it's very
error-prone. C++ has its quirks with memory allocation, and you just have
to learn to live with them if you want to use it. Encapsulation is the key.
--
- Warp
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Warp wrote:
> stbenge <^@hotmail.com> wrote:
>> Don't use HGE to insult me...
>
> I was not insulting you. I was asking if that's the only way of using
> HGE (because if it is, then HGE really sucks as a C++ library).
Then please accept my apology :)
>> I could have
>> written my loop a different way and used less code, but I feel
>> comfortable typing it out that way.
>
> The problem is not the loop. The problem is the 'news' and 'deletes'.
> While there are situations where their use is completely ok and in fact
> the best thing to do, those situations are usually rare.
In the HGE tutorials, sprites are created in this manner, so I adapted
the method to work with arrays.
> Usually the "correct" way of, for example, creating a certain amount
> of objects like that is:
>
> std::vector<hgeSprite> tile;
>
> tile.reserve(8*8);
> for(...)
> for(...)
> tile.push_back(hgeSprite(...));
>
> (The word "correct" is deliberately in quotation marks because it's,
> quite naturally, not *always* the best way to do it. However, in most
> cases this - or something similar - is.)
>
> However, depending on how hgeSprite has been designed, that might not
> be possible. For example, if it doesn't have a properly working copy
> constructor (or it has been disabled), then that method cannot be used.
> If that's the case, then you indeed have to either allocate things with
> 'new', or use other dirty tricks to get it working. And it would also be
> a sign of sloppy design in the HGE library.
Thank you very much for this tip. I seem to remember that hgeSprite does
have a functioning copy constructor, so I should give the vector method
a go. Before I get there, I have to gain a better understanding of OOP
programming so I don't find myself hacking and experimenting with the
std::vector functions. Too much of my time is spent doing this, I'm
ashamed to admit :(
> The problem with using 'new' and 'delete' like that is that it's very
> error-prone. C++ has its quirks with memory allocation, and you just have
> to learn to live with them if you want to use it. Encapsulation is the key.
Another reason to get myself familiarized with all that C++ has to
offer. Thank you for your feedback!
Sam
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Darren New wrote:
> stbenge wrote:
>> There is no goal to the game. You just fly around in a near-infinite
>> landscape.
>
> That's very Zen. With the fading trails, that's sort of like one of
> those rice-paper pads you write on with water.
I have no idea what you're talking about :)
>> If you are running Windows, have DirextX 8.0 or above, and have some
>> free time, could you download it and tell me what you think? With the
>> default settings it should run at 60 FPS regardless on your monitor's
>> refresh rate.
>
> I think mine is saying 75FPS or so. I'm on Vista x64, and it runs
> flawlessly.
>
>> I would like some feedback on a few things. What is your operating
>> system? Does it work on Vista? What FPS are you getting? Do the
>> default settings of 1280x960 fullscreen mode give you ultra-smooth
>> scrolling?
>
> Yes.
Thank you for trying it! You're input is valuable, considering my
girlfriend could not get it working on her Vista x64 laptop. It may be a
screen/video driver problem though. One of these days I'll have to make
a new MetroidVania :) (and finish it)
Sam
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
stbenge wrote:
>> That's very Zen. With the fading trails, that's sort of like one of
>> those rice-paper pads you write on with water.
>
> I have no idea what you're talking about :)
http://www.amazon.com/Buddha-Board/dp/B0010TEFFQ/ref=pd_bbs_sr_1
It's a dark board with rice paper over it. When you paint with water, it
leaves marks, but only till the water dries.
One I did as a java VADz a long time ago:
http://home.san.rr.com/dnew/ZenMaster.html
> Thank you for trying it! You're input is valuable, considering my
> girlfriend could not get it working on her Vista x64 laptop. It may be a
> screen/video driver problem though.
Possibly. This has one of those high-end 5.0 Vista cards, a Radeon HD 4850.
--
Darren New, San Diego CA, USA (PST)
The NFL should go international. I'd pay to
see the Detroit Lions vs the Roman Catholics.
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
stbenge <THI### [at] hotmailcom> wrote:
> Hi everyone,
>
> Months ago I updated my NearInfinity demo, but never got around to
> posting it. It can be found here:
> http://www.caltel.com/~abenge/NearInfinity.zip
>
> It should look like this:
> http://www.caltel.com/~abenge/NIscreen.jpg
>
> There is no goal to the game. You just fly around in a near-infinite
> landscape. I would call it infinite, but even the best random number
> generators don't go on forever. The landscape is not different every
> time you start the program up. You can change the landscape's seed
> within an .ini file. To make it a little more interesting, there are six
> Easter eggs to find. They occur very rarely, and you get no reward for
> finding them; they are simply there. Look at ee.png for spoilers :) Keys
> are left, right, up and/or z. It has bouncy and smooth, but solid
> collision-detection.
>
> If you are running Windows, have DirextX 8.0 or above, and have some
> free time, could you download it and tell me what you think? With the
> default settings it should run at 60 FPS regardless on your monitor's
> refresh rate. I kept the logic separate from the frame rate, so it
> should work on your computer exactly as it does mine, as long as your
> computer isn't really old. It will skip frames to compensate if your
> computer is slow.
>
> I would like some feedback on a few things. What is your operating
> system? Does it work on Vista? What FPS are you getting? Do the default
> settings of 1280x960 fullscreen mode give you ultra-smooth scrolling?
> What about lower resolutions? You can change these and other settings
> within the NI.ini text file. If you decide to run in windowed mode,
> change dynamicFrameRate to method 2. You won't get the benefits of
> VSYNC, and it really shows.
>
> If for some reason I didn't upload the program with the default 1280x960
> resolution and VSYNC settings, change the values found in NI.ini to these:
> windowed=0
> screenMode=2
> dynamicFrameRate=3
>
>
> Thanks in advance!
>
> Sam
It works on Vista x64 on quad core, very smooth scrolling.
It fails on XP home x32 dual core amd. Here is th elog file:
HGE Started..
HGE version: 1.70
Date: 14.12.2008, 16:32:00
Application: NearInfinity 2008 Sam Benge
OS: Windows 5.1.2600
Memory: 981480K total, 214936K free
D3D Driver: ati2dvag.dll
Description: ATI RADEON XPRESS 200 Series
Version: 6.14.10.6571
Can't find appropriate full screen video mode
Finishing..
The End.
Finishing..
The End.
It will work in 640x480 mode.
Interesting game, very good.
Isaac.
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Darren New wrote:
> stbenge wrote:
>>> That's very Zen. With the fading trails, that's sort of like one of
>>> those rice-paper pads you write on with water.
>>
>> I have no idea what you're talking about :)
>
> http://www.amazon.com/Buddha-Board/dp/B0010TEFFQ/ref=pd_bbs_sr_1
>
> It's a dark board with rice paper over it. When you paint with water, it
> leaves marks, but only till the water dries.
Sounds like a neat idea. I'm guessing this works because water tension
causes the rice paper to stick to a black backing? Simple, effective,
but possibly fragile for young ones :(
> One I did as a java VADz a long time ago:
> http://home.san.rr.com/dnew/ZenMaster.html
Pretty cool. There's a gap at the end of a drawing run if the mouse is
moving too fast. I assume you used an array to hold the positions/states
of each circle? It must be a big array because I never found the end.
>> Thank you for trying it! You're input is valuable, considering my
>> girlfriend could not get it working on her Vista x64 laptop. It may be
>> a screen/video driver problem though.
>
> Possibly. This has one of those high-end 5.0 Vista cards, a Radeon HD 4850.
Ack, HGE's hit-and-miss functionality is somewhat discouraging :(
Sam
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Clarence1898 wrote:
> stbenge <THI### [at] hotmailcom> wrote:
>> I would like some feedback on a few things.
>
> It works on Vista x64 on quad core, very smooth scrolling.
> It fails on XP home x32 dual core amd. Here is th elog file:
> ...
> Can't find appropriate full screen video mode
>
> It will work in 640x480 mode.
Sounds like a simple video card shortcoming to me. I'll keep this in
mind if I make another game. Low-resolution video modes should always
work, so I'll have to keep new games at 640x480 or 320x240. A lot of
people hate these lower resolutions, but for 2D games they seem to work
well. Cave story, for instance, has a large fan base. It used a low
resolution and the scrolling wasn't smooth at all. People still loved it
because the game play more than made up for the lack of graphics quality.
> Interesting game, very good.
Thank you, Isaac. I would like to make enemies that you could kill, but
using this method to do it is looking impossible. The stars and motes
will always be the same if you go back to them, just like the landscape.
It would be hard to do this with enemies, because the method I used
doesn't allow me to change elements. They are all always static, though
in the case of the motes it doesn't seem that way.
Sam
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
stbenge wrote:
> Sounds like a neat idea. I'm guessing this works because water tension
> causes the rice paper to stick to a black backing?
Plus, the paper is thin enough that wetting it makes it more transparent.
> Simple, effective, but possibly fragile for young ones :(
Depends how young, I guess.
> Pretty cool. There's a gap at the end of a drawing run if the mouse is
> moving too fast. I assume you used an array to hold the positions/states
> of each circle? It must be a big array because I never found the end.
It is, of course, dynamically allocated. The fun thing is to compare the
size of the .class file with what you could build by hand. VADz is an old
technology to compress all kinds of interactive graphics down to a
relatively tiny size - we could put online order forms in a banner ad
smaller than most people could fit an advertisement in an animated GIF.
> Ack, HGE's hit-and-miss functionality is somewhat discouraging :(
It is strange. You'd think it would work or not. Maybe you're using some
feature which has to be supported by the card to work?
--
Darren New, San Diego CA, USA (PST)
The NFL should go international. I'd pay to
see the Detroit Lions vs the Roman Catholics.
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
|
|