Probably. But I'm a slow learner; it'll probably take somebody else less than 10minutes to make a ball appear with GDI
Probably. But I'm a slow learner; it'll probably take somebody else less than 10minutes to make a ball appear with GDI
Just Google It. √
(\ /)
( . .)
c(")(") This is bunny. Copy and paste bunny into your signature to help him gain world domination.
now see, this is why i like stuff like Java and Flash. with java its basicaly
public void paint (Graphics g) {
g.setColor(Color.red);
g.fillOval(0,0,200,200);
}
and that makes a red 200x200 circle with the xy coords 0,0.
in flash its take the circle tool and draw it!
http://www.vipervision.org/arena.html
thats a game i made in flash. its birds eye view. you need flash 6 player to run it. spacebar is attack
~DJ DarkViper signing out
----------------------------------------
My Site:
Black Jaguar Studios
Languages:
Fluent English, Starter German, HTML, Javascript, Actionscript, Intermediate PHP
Verteran Despiser of: ASP, Java, BASIC, Pascal, Cobalt
Yes, I agree Java is fun and easy to learn. But the thing is, with C++ it's not as easy as public void paint(Graphics g). However, as long as you have your shell set up (i.e. your message loop, etc. etc. etc.) you can call anywhere in the program (that has access to a handle to the window):
This will draw a circle from (0,0) to (200,200), filled with red and outlined with dotted blue. As you can see, it takes 5X the code, but it's the startup and cleanup that takes forever. But if you live through that, it's blue skies from there on Of course, that doesn't mean that I'm not envious of Java/Flash people, but that's not the point... ok, what was I talking about? lol I think I'll just shut up nowCode:HDC hdc = GetDC(hWnd); HBRUSH redBrush = CreateSolidBrush(RGB(255,0,0)); HBRUSH oldBrush = (HBRUSH)SelectObject(hdc, redBrush); HPEN pen = CreatePen(PS_DOT, 1, RGB(0,0,255)); HPEN oldPen = (HPEN)SelectObject(hdc, pen); Ellipse(hdc, 0, 0, 200, 200); SelectObject(hdc, oldBrush); SelectObject(hdc, oldPen); DeleteObject(redBrush); DeleteObject(pen);
Last edited by Hunter2; 11-04-2002 at 05:01 PM.
Just Google It. √
(\ /)
( . .)
c(")(") This is bunny. Copy and paste bunny into your signature to help him gain world domination.
flash rules over anything cuz its so easy to animate using it. yet, C++ made the program
~DJ DarkViper signing out
----------------------------------------
My Site:
Black Jaguar Studios
Languages:
Fluent English, Starter German, HTML, Javascript, Actionscript, Intermediate PHP
Verteran Despiser of: ASP, Java, BASIC, Pascal, Cobalt
Yes, flash is good for the beginner.
still, actionscript can get really advanced. like doing math functions and animating using pure actionscript, (which is tough, beleive me) heres a basic movement of an object script with anbimation.
and thats the basics.Code:onClipEvent(load) { move = 5; } onClipEvent(enterFrame) { if(Key.isDown(Key.UP)) { this._y -= move; telltarget(_root.object) { play(); } } else if (Key.isDown(Key.DOWN)) { this._y += move; telltarget(_root.object) { play(); } } else if (Key.isDown(Key.LEFT)) { this._x -= move; telltarget(_root.object) { play(); } } else if (Key.isDown(Key.RIGHT)) { this._x += move; telltarget(_root.object) { play(); } } else { tellTarget(_root.object) { gotoAndStop(1); } }
~DJ DarkViper signing out
----------------------------------------
My Site:
Black Jaguar Studios
Languages:
Fluent English, Starter German, HTML, Javascript, Actionscript, Intermediate PHP
Verteran Despiser of: ASP, Java, BASIC, Pascal, Cobalt
Where can i get dev C++?
bloodshed.net
Willgell, I would like to give you some instructions too. First of all, about the GDI matter, do not use it for making games. I dont recommend it, as it is slow, and there are easier and more powerful solutions!
When you refer to DirectX, you refer to the 'DirectX' as a whole. I believe this guy needs a rendering API, so you'd better mention DirectXGraphics (D3D8 + DD). Personally, I do not like D3D much, all this COM thing makes it ugly. Anyone with decent knowledge on both OpenGL and D3D, would choose OpenGL. I suggest you try these two and leave alone Allegro and SDL, but that is my opinion.
Making a game like Half-life should not be mentioned, except if you put it as an example. Willgell needs to start low, not high! Anyway, I do not have much time, I got to go now, but try to find a reply to a thread several posts before. It will help you a lot.
I do 3d programming for many years so take my word.
Cya
Y3K Network http://www.y3knetwork.com
Bringing the software of the future on the net.
Why ever not?First of all, about the GDI matter, do not use it for making games.Not with the average cpu speed today being around 1.3 ghz!I dont recommend it, as it is slow,Like DirectX and OpenGL, which could take months to learn, especially for people new to concepts such as double-buffering.and there are easier and more powerful solutions!
Besides, GDI can be used very easily to make simple applications that don't take too much graphics-processing power (i.e. an application that keeps drawing a black rectangle). DirectX/OpenGL will take a lot more code to do simple tasks, even though they are by far more powerful. Thus, GDI is a very useful API to learn to use, regardless of its slowness, since it is so simple and quick to use.
Last edited by Hunter2; 11-12-2002 at 05:10 PM.
Just Google It. √
(\ /)
( . .)
c(")(") This is bunny. Copy and paste bunny into your signature to help him gain world domination.
No way is that right. The avg cpu speed is probably around 500 mhz. Think of all the people who still have computers from 1999 and earlier. The cpu speed didn't start getting up to the ghz until the past two years. Cheap ghz cpus didn't come around just until this past year. I would really like to a see the real number on this.Not with the average cpu speed today being around 1.3 ghz!
hehehe. well i guess it'd be slow on my comp. as ive only got 200MGz!! and 2gigs of space. hehehe.
~DJ DarkViper signing out
----------------------------------------
My Site:
Black Jaguar Studios
Languages:
Fluent English, Starter German, HTML, Javascript, Actionscript, Intermediate PHP
Verteran Despiser of: ASP, Java, BASIC, Pascal, Cobalt
Hmm, let's see: 60% 550 mhz, 30% 1.3ghz, 5% 1.6ghz, 3% 2 ghz, 2% 2.4 ghz.The avg cpu speed is probably around 500 mhz
Thus, the average by my reckoning is about 908 mhz, which is still plenty fast to run GDI games that aren't too strenuous on the cpu (i.e. ones that don't involve StretchBlt()).Code:(.6 X 550) + (.3 X 1300) + (.05 X 1600) + (.03 X 2000) + (0.2 X 2400) = 908
True, my numbers failed to take DarkViper in ( Sorry, no offence intended), but I'm sure that most hardcore wanna-play-games people will at least have 550 mhz cpu's, which will run GDI games slow but hopefully not unbearably so. And the number is only 60% because there's been 700-800 mhz cpu's out for a long time now. Besides, people often upgrade/buy new computers every 3 or 4 years; so those with 1998/99 comps will likely be upgrading very soon now, jumping up the 1.3/1.6 ghz's some (from my thinking).
But in any case, my numbers are decent enough. If you want, you can knock off 50 mhz off the average, or 100 or something, but the 808 mhz is still pretty decent for running GDI. So there
**EDIT**
Go search on google for '"average cpu speed" today', and go to the second page; from the first item on the list:
The average CPU speed has increased from about 16 MHz in the year 1990 to over one GHz (1000 MHz) in 2000
Last edited by Hunter2; 11-12-2002 at 10:10 PM.
Just Google It. √
(\ /)
( . .)
c(")(") This is bunny. Copy and paste bunny into your signature to help him gain world domination.
... That means you dont use gdi in the actual game code butBesides, GDI can be used very easily to make simple applications that don't take too much graphics-processing power (i.e. an application that keeps drawing a black rectangle).
maybe for the map editor or bitmap loading.
Considering that people use SDL and opengl together to
do different stuft, it will be kind of hard to compare them.
I will support my reply, only to help the guy, and not to argue with you. If you want to do something cool, trust me and learn D3D or GL.
About your comment on GL is difficult, I can proove you wrong. From my experience in both APIs, D3D and GL, I will give you an example: I have started an engine in both APIs. The first one, was in D3D7, which then moved to D3D8. I spent 1 year programming the engine itself, finding bugs, etc, but it was never really "high quality". The problem was that I had to care a lot about COM, memory leaks, and all such. Then, I switched to GL. After 4 months of development (it still is under development), I have created a powerful engine, nothing compaired to the old one. So, what my point is? If you use SDL for window and input management and opegl for graphics, you could do miracles in short time, even in a week.
Plus, GDI, which you seem to support well, doesn't get in depth with the 3D, or even the 2D programming basics. As you said, no double buffering, slow "rendering" of shapes, etc. However, I really suggest that you use GDI for making tools for your engine/game. If you have any argues about this matter (GDI vs D3D/GL/SDL/Allegro), please go to GameDev.Net, and ask in those forums, it is their job to ask these kind of questions.
Y3K Network http://www.y3knetwork.com
Bringing the software of the future on the net.