As a warm up, I made this little pong game.
Game play:
The left player uses wasd, and the right player uses the arrow keys to control.
Keep the ball in front of your paddle.
Download source code here
Run with the media folder at current working directory.
I apologise for occasional abuse of public variables instead of creating wrapping functions,
and a couple obscure variable names :p
As it is just a random thing I put together, I am not really interested in fixing bugs, but feel free to report bugs if you think it would be useful for the others.
Edit:
Some fixes
Simple 3d pong game
Simple 3d pong game
Last edited by Xaryl on Mon May 30, 2011 3:07 pm, edited 1 time in total.
You linked it hard to /home/schlaflos/irrKlang-1.3.0/bin/linux-gcc/libIrrKlang.so so can't start it here. Also sources are without makefile or similar, you should add those.
IRC: #irrlicht on irc.libera.chat
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
Some stupid noob (finger pointing at self) added that in the IDE even though the program has no sound at all :/CuteAlien wrote:You linked it hard to /home/schlaflos/irrKlang-1.3.0/bin/linux-gcc/libIrrKlang.so so can't start it here.
Makefile and code::blocks project file are added, but they are compiler dependent (gcc) because the irrlicht library files included.CuteAlien wrote:Also sources are without makefile or similar, you should add those.
For other compilers and IDEs, just add everything in src folder to the project and do the usual including path and linking with irrlicht if needed.
The Makefile should work under windows and unix like systems.
For tricky environment like cygwin, the target needs to be set specifically with
Code: Select all
make linux
Code: Select all
make windows
I can only wish that I have 36 hours in a day, but still then I will somehow not have enough ><omg_fail wrote:How many hours did you need ?
Re: Simple 3d pong game
Hi Xaryl,
Is this source code still available? I am drinking in any source code I can find to learn from.
I tried the link, but I believe it is dead. Well it leads me to a page with some German writing, and my language skills are nacht gut
Asimov
Is this source code still available? I am drinking in any source code I can find to learn from.
I tried the link, but I believe it is dead. Well it leads me to a page with some German writing, and my language skills are nacht gut
Asimov
Re: Simple 3d pong game
http://sourceforge.net/p/irrdemos/code/ ... mos/Games/ if its not in there i probably havnt gotten to putting it in in the last 2 years i collected alot of stuff over the years its getting more overwhelming as i keep making the folders i stick random things in with odd names. maybe an update sometime next year
Live long and phosphor!
-- https://github.com/netpipe/Luna Game Engine Status 95%
-- https://github.com/netpipe/Luna Game Engine Status 95%
Re: Simple 3d pong game
Hi Tecan,
Thanks I got it. Not compiled it yet. Will do it later. I learn better from looking through code than anything.
I know C++ but just getting to grips with this new engine.
Thanks I got it. Not compiled it yet. Will do it later. I learn better from looking through code than anything.
I know C++ but just getting to grips with this new engine.
Re: Simple 3d pong game
Hi Tecan,
So far haven't managed to compile your examples, mainly because I am having a problem with getting irrlicht to work with directx, but nevertheless your code is a learning experience.
For instance now I know you can send a pointer of the node into a function or class eg ISceneNode* ball
So looking at that if I made a class I could then send a pointer of the ball into my class and update it's location in the 3d world.
I have a lot to learn, before I can make my game I am planning but thanks anyway.
So far haven't managed to compile your examples, mainly because I am having a problem with getting irrlicht to work with directx, but nevertheless your code is a learning experience.
For instance now I know you can send a pointer of the node into a function or class eg ISceneNode* ball
So looking at that if I made a class I could then send a pointer of the ball into my class and update it's location in the 3d world.
I have a lot to learn, before I can make my game I am planning but thanks anyway.