View Full Version : Original Development Thread
steve_d555
June 16th, 2005, 10:04 PM
How about a huge forum-wide project just for the hell of it because I have nothing to do for the next month between LAN parties with friends. :D
Ideas?
bluetechnx
June 17th, 2005, 12:56 AM
yaknow, i've always wanted to begin writing a subspace (aka. Continuum) like clone/game. This game is really fun...but hasn't had active development in like 6 years at least. Some simple implementation (proof of concept) would be great.
Ruby should do fine for 2D stuff anyways. But, like usual it'll probably never get done..haha. But, that's my suggestion.
subspace site to see/play the game: www.subspacedownloads.com
But, since it's a full on game with networking and stuff it's probably too big a project. But a simple 2d game with a physics engine and a simple client/server...might be fun.
steve_d555
June 17th, 2005, 01:07 AM
I'm not sure, cause I'm on Linux but is this game kind of like Galaxian with different ships and networking?
I'll try it out later when I feel like booting into Windows :p
rob
June 17th, 2005, 02:13 AM
Could be an intersting project. Let me know how how I can help :)
Robert
bluetechnx
June 17th, 2005, 03:22 AM
more akin to asteroids [nt]
aquila
June 17th, 2005, 07:49 AM
Try something new, that's always more fun and interesting. No one will ever use Pacman clone number 25635. Good games can help Ruby promotion too...
(Only one requirement: a brilliant idea)
bluetechnx
June 17th, 2005, 11:52 PM
I see your point. I was don't know if I was thinking a 100% clone, or "like" that game. Because there are features I like and dont like.
The only problem with saying "do something new" is that being inventive is a very hard thing to do (and get it right), and I don't know if you mean 100% original concept. There was a bazillion attempts at making the first light bulb...I suppose that I see alot in the game that is good and would like to see an "open" and "active" version of it...or something similar to it...worked on.
mserms
June 18th, 2005, 10:33 AM
How about a huge forum-wide project just for the hell of it because I have nothing to do for the next month between LAN parties with friends. :D
Ideas?
Working on a game sounds like it could be a lot of fun - I'll definitely keep on checking this thread!
steve_d555
June 20th, 2005, 11:03 AM
Heres a really simple game with controls and shooting. No AI or anything.
bluetechnx
June 20th, 2005, 09:35 PM
lol, that's cool. I'm gonna fool with it a bit later tonight...
rob
June 21st, 2005, 06:58 PM
I'm getting:
./game.rb:7: private method `load` called for SDL::Surface::Class (NoMethodError)
Perhaps I goofed while installing rubysdl?
steve_d555
June 21st, 2005, 07:15 PM
Are you on Gentoo? If so, for some reason the ebuild doesn't install SGE and it isn't in portage, so you have to manually compile it. If you don't there are some errors with drawing and such.
bluetechnx
June 21st, 2005, 08:02 PM
Running under winXP by:
Downloading Ruby-SDL from here: http://www.kmc.gr.jp/~ohai/rubysdl_download.en.html
then, following these specific directions to put the SDL library components into a Ruby one click installer which are explained at the above site:
"...Third, you should copy sdl.rb, rubysdl_aliases.rb to C:\usr\local\lib\ruby\1.8, sdl.so to C:\usr\local\lib\ruby\1.8\i386-mingw32\ and SDL.dll to C:\usr\local\bin."
Lastly I believe icon.bmp is a compressed bitmap which SDL_image cannot load. I got an error at line 10 telling me so. Opening up Photoshop and saving icon.bmp as (RGB,8bit) fixed that....
It appears to be working just fine...see where we can go from here :)
rob
June 21st, 2005, 08:08 PM
I was running under Gentoo, but I will try it on XP.
Robert
rob
June 21st, 2005, 08:48 PM
On XP, the LZH archive found here:
http://www.kmc.gr.jp/~ohai/rubysdl_download.en.html
seems to be corrupted. Is this just me? WinRAR says its corrupt, no matter how many times I try. I will see if LZH on Linux says the same..
steve_d555
June 21st, 2005, 09:07 PM
Ya, it seems WinRAR can't handle it. LHA under linux works fine for me though.
EDIT: Got it working under Windows :D
rob
June 21st, 2005, 09:17 PM
I found this nice little utility:
http://gnuwin32.sourceforge.net/packages/lha.htm
Ran it under WinXP, and it worked fine. I'm going to install it now and check out your game :)
rob
June 21st, 2005, 09:28 PM
I made a guide on installing Ruby-SDL for Windows here:
http://rubyforums.com/showthread.php?t=59
Unfortunately, even with it installed successfully, I get:
game.rb:10:in `load': Couldn't load icon.bmp: Compressed BMP files not supported (SDL::Error) from game.rb:10
So, not wanting to fool with that :) I made a version using JPG's, which is attached.
I think using JPG would be safer, or PNG's, as they're sure to be in most distros, vs. BMP support.
Rob
steve_d555
June 22nd, 2005, 01:59 AM
Made really simple networking. For now the client sends the x,y info of the ships movement and the bullets movement to the server which then prints it. Later I'll have to make it send out the data to other connected clients which will sort it out and display it. But thats for another night ;) . It uses UDP for now.
steve_d555
June 22nd, 2005, 05:27 AM
Okay, I have figured using Sockets is impracticle so I am going to try and learn something about DRb. If someone knows anything or can help me please contact me (either PM or email steviedizzle_at_gmail.com)
aquila
June 22nd, 2005, 05:36 AM
Okay, I have figured using Sockets is impracticle so I am going to try and learn something about DRb. If someone knows anything or can help me please contact me (either PM or email steviedizzle_at_gmail.com)
Could you just keep those messages here? It might be useful for others too. (I want to know how it works, I've done Java RMI and I'm looking forward to a comparison...)
steve_d555
June 22nd, 2005, 06:42 AM
Um... It's late and I need sleep. Heh. Just kind of frusrated after a couple hours of coding :D
I'll try again to understand DBr (not that it seems that hard) later after some much needed sleep.
mserms
June 22nd, 2005, 08:42 AM
Are you on Gentoo? If so, for some reason the ebuild doesn't install SGE and it isn't in portage, so you have to manually compile it. If you don't there are some errors with drawing and such.
Have you got a URL for SGE? I'll file a Gentoo bug report.
steve_d555
June 22nd, 2005, 09:03 AM
Have you got a URL for SGE? I'll file a Gentoo bug report.
http://www.etek.chalmers.se/~e8cal1/sge/
It's pretty much required to use drawRect and other related functions.
EDIT: There are already bug reports filed just search 'sge' but none of them seem to be commited to portage yet. Strange.
mserms
June 22nd, 2005, 11:08 AM
I installed SGE using one of the overlay ebuilds, but am still getting:
./game.rb:7: private method `load' called for SDL::Surface:Class (NoMethodError)
Any thoughts?
steve_d555
June 22nd, 2005, 11:59 AM
I am guessing Linux, so did you try rob's pack? That seemed to work for me. Also if you didn't re-compile ruby/sdl after installing sge it wont work.
mserms
June 22nd, 2005, 12:31 PM
Sorted it - needed sdl-image too (duh!)
Pretty neat, might have a mess about if I get 5 minutes.
rob
June 22nd, 2005, 04:58 PM
The game is neat. Nice movement. I'll see if i can make some enhancements and patch them back..
CVS anyone? ;)
Seriously.. this patching is gonna get weird..
Rob
steve_d555
June 22nd, 2005, 05:58 PM
Haha, sure why not.
Still trying to find a good way to implement networking without slowing the game to a crawl.
On another note, we should probably think about collision detection between objects (Missiles and ships).
mserms
June 22nd, 2005, 06:20 PM
CVS anyone? ;)
Cool. Agree, it will quickly become mayhem!
Typo though, it's spelt "SVN" ;)
Want me to set up a repos, or would you like to OCS (probably better, but I don't mind) this Rob?
rob
June 22nd, 2005, 06:27 PM
I can setup a repository. We do both CVS and SVN.
I guess SVN it is :) I still have to get used to it personally tho, I've only used CVS in development.
Rob
steve_d555
June 22nd, 2005, 06:33 PM
Basic collision detection. Trying to figure out a way to make it so it doesnt detect the ship firing as a collision, also how to, after a collision, keep the explosion image on the screen and delete the ship.
mserms
June 22nd, 2005, 07:00 PM
I've refactored it to make it more object-oriented. Removed the globals, made fires more associated to the ship, stuff like that. Also added things like only X fires allowed on a screen at once.
I have removed the network stuff until we work out what's going on there.
mserms
June 22nd, 2005, 07:01 PM
Oops, haven't seen the collision detection code - will have a look the now. Definitely need version control...
mserms
June 22nd, 2005, 07:39 PM
Have added collision detection to 'my' version (don't mean that to sound as crap as it does!). I have turned down the fire speed so you can actually make sure it's working.
The collision detection stuff is a few pixels out (had to do that so that the ship didn't explode immediately), but I need to go to work tomorrow!
I'm also not too sure whether collision detection should take place on a per ship basis on on a per fire basis as it is just now (or both).
Hey, we're writing a computer game! :D
steve_d555
June 22nd, 2005, 08:03 PM
Not much to add to mserms' version just added fonts and made it so that you can't fire after you die.
We probably will need CVS (or SVN) soon considering how fast stuff is going.
Maybe an IRC channel to talk for now?
rob
June 22nd, 2005, 09:15 PM
I'm setting up webspace and SVN now.. I think IRC would not be a good idea as the content would be lost. How about keeping this thread going (or starting a new one), but using SVN and webspace for builds and code checkin/out ?
Rob
steve_d555
June 22nd, 2005, 09:27 PM
I just meant to use IRC as a place to chat about trivial things instead of posting a reply everytime.
bluetechnx
June 22nd, 2005, 11:09 PM
OMG!!!
what can I say, wow!, I blink after a day of working on school stuff and the game as a whole has seen alot of production and has collision detection and stuff.
It's impressive to see the enthuiseasm(spelling?).
Keep it up guys!
[edit] ...heh, my senior project is sooo boring/annoying compared to this.
steve_d555
June 23rd, 2005, 04:23 AM
Moving right along. Integrated a test of DRb. Seems slightly slow, but since I'm all coded out for right now I thought maybe you guys could check it out. Init-test.rb just binds to a different address. Remember to start server.rb first.
Otherwise have fun :D
mserms
June 23rd, 2005, 05:09 AM
Cool - starting to look like a game! :)
Are we planning to make the game asteroids style where the ships can rotate and stuff?
Is it just a multiplayer game only? Or are we wanting computer controlled bad guys too?
Currently it 'plays' like a scrolling shooter, but are we going to make the game limited to the visible screen?
steve_d555
June 23rd, 2005, 05:37 AM
Cool - starting to look like a game! :)
Are we planning to make the game asteroids style where the ships can rotate and stuff?
Is it just a multiplayer game only? Or are we wanting computer controlled bad guys too?
Currently it 'plays' like a scrolling shooter, but are we going to make the game limited to the visible screen?
I think it would be pretty cool if we could have both you know. A local version and then an online version. Rotating is also something I would like to do. But after we make all the basics, we can add things like rotating and such.
mserms
June 23rd, 2005, 09:35 AM
DRb is doing my head in! It's very nearly nice and elegant, but I got stuck at displaying the remote ships and put a hack in.
Running multiple clients now works (not done shooting/collisions yet and explosions are untouched), although it is buggy and slow. I can't tell if this is because it's fundamentally flawed or because I'm running the server and both clients on one machine. Thoughts?
To run multiple clients I need to create a copy of init-test.rb called init-test2.rb and change the IP address from 1270.0.0.1 to my ethernet IP.
In fact, I can't even tell how much progress has been made from the last version (if any), although I think a reasonable structure is now in place (assuming DRb turns out to be fast enough). Maybe I'm just pissed off with the last few hours!
Does ruby share the interpreter between scripts?
Right, really must do some work if I want to stay in a job.
bluetechnx
June 23rd, 2005, 05:48 PM
yea a game with an online (multiplayer mode) and offline (prac mode with scripted bot AI) would be neat and that way the game could be played (to a degree) without the need of an internet connection.
mserms
June 23rd, 2005, 05:51 PM
Here's most likely the world's shortest ever computer game! Got bored and annoyed with the networking stuff, this is single player against the computer.
Still needs *loads* of work and is far from bug free, but there's stuff to mess about with now. Have fun.
Will be interesting to see how it handles more screen space and a bunch of bad guys on the screen at the same time.
rob
June 23rd, 2005, 08:05 PM
Very cool. We'll have the SVN up tonight, so it won't be long :)
Rob
steve_d555
June 23rd, 2005, 10:20 PM
One thing we do have to do is adjust the collision detection with missiles because right now when you fire we check the collision 32 pixels (?) ahead of the missile to compensate for the ships location.
Also found out a bug. Seems that when a drone dies it doesnt remove its fires so if you collide with one that was there when the drone died you still die.
mserms
June 24th, 2005, 06:38 AM
One thing we do have to do is adjust the collision detection with missiles because right now when you fire we check the collision 32 pixels (?) ahead of the missile to compensate for the ships location.
Hmm - I actually turned that off for the recent version and added a check to make sure that fires couldn't kill the firing ship. Might be worth turning down the speed to see if we can spot what's happening because it is a bit wonky sometimes.
Also found out a bug. Seems that when a drone dies it doesnt remove its fires so if you collide with one that was there when the drone died you still die.
That's exactly what's happening, although tracking down why is pretty tough. It would be fairly easy to hack a fix in place (maybe just add a check on the fire alive status or something), but I think it's worth trying to fix it properly.
Anyone good at graphics (or Google images ;) ) fancy coming up with a missile and a drone image?
Apart from the bugfixing, what does everyone think we should tackle next?
steve_d555
June 24th, 2005, 07:10 AM
Networking ;)
Take alot of work but when the subversion server comes up (very, very soon :D I just have to set up users and a couple other things) we can coordinate better.
mserms
June 24th, 2005, 07:26 AM
Also found out a bug. Seems that when a drone dies it doesnt remove its fires so if you collide with one that was there when the drone died you still die.
Fixed (although I may have to eat those words since I've not done much testing!) - I am unbelievably dumb. Have made it so that Fires exist (and are visible!) after the ship dies. This makes much more sense than them just vanishing when a ship dies and has suddenly made the game much better.
I won't bother uploading here - I'll just wait for SVN.
Networking ;)
Take alot of work but when the subversion server comes up (very, very soon I just have to set up users and a couple other things) we can coordinate better.
Cool.
I'm still not too sure what sort of game we're trying to create - is it like space invaders/R-type (I used to love R-Type when I was a kid and have wanted to write a clone for ages) or asteroids? I guess we could do both.
How are the other (human) players going to interact - kill each other? Team up?
I think you're right, ICQ/IM or something would be useful for general chat about this stuff. We should probably (as Rob said) keep using something like this thread for stuff we want a record of though.
steve_d555
June 24th, 2005, 08:25 AM
I made a really basic image to show what I mean about the online version of the game.
http://img142.echo.cx/img142/4525/gamepro9rw.png
note: the red/green/blue dots are a map :p
steve_d555
June 24th, 2005, 08:29 AM
Also about subversion.
Please everyone working on the project please pm me or rob to get instructions on how to create a svn account.
I am trying to get WebSVN to work but there seems to be a bug or something. When I get it working it will be at spacegame.rubyforums.com
Right now the subversion is at spacegame.rubyforums.com/svn/spacegame
There are folders ai (which is the offline version) and online (which is, yes you guessed it, the offline version)
mserms
June 24th, 2005, 08:52 AM
Right now the subversion is at spacegame.rubyforums.com/svn/spacegame
There are folders ai (which is the offline version) and online (which is, yes you guessed it, the offline version)
Nice one :)
Can we set up e-mail commit messages?
steve_d555
June 24th, 2005, 08:56 AM
You mean like email you when someone commits to the repository? I'll check it out I'm pretty sure it can be done.
EDIT: It can be, quite easily too. If you want emails after a commit just post your email here.
mserms
June 24th, 2005, 09:32 AM
You mean like email you when someone commits to the repository? I'll check it out I'm pretty sure it can be done.
EDIT: It can be, quite easily too. If you want emails after a commit just post your email here.
Cool - have PM'd you (spam paranoid).
Would anyone mind if we/I changed the repos structure to
trunk/ai
tags/ai
trunk/offline
tags/offline
etc
rather than
ai/trunk
ai/tags
offline/trunk
offline/tags
I use SVK and having it structured that way would make things a wee bit easier (yeah, I'm lazy like that :))
steve_d555
June 24th, 2005, 09:51 AM
Sure lemme do some things and I will do that. Will you do the first commits?
EDIT: Done changed file layout. Go ahead. Also added you to email commits.
mserms
June 24th, 2005, 10:29 AM
Go ahead. Also added you to email commits.
Commited and I received the e-mail :)
steve_d555
June 25th, 2005, 08:03 AM
Got WebSVN working last night. You can now check it out at spacegame.rubyforums.com
You can subscribe to XML feeds and also get tarballs of all folders.
mserms
June 25th, 2005, 01:04 PM
Got WebSVN working last night. You can now check it out at spacegame.rubyforums.com
You can subscribe to XML feeds and also get tarballs of all folders.
Good work Steve!
I think I worked out why our old collision checking was a bit wonky. Check out the output that comes from the fire instantiation. It is trying to report the width and height of the collisionmap... Pretty out there sometimes!
steve_d555
June 25th, 2005, 08:31 PM
Okay, as we are going to be going for more asteroid-ish controls I was wondering. For rotation would we use the Ruby/SDL implementation or some outside image manipulation library because if you use SDL transform it blits the image at the same time as rotating so we may have to rethink that part of movement. We could use something like rmagick but that might be slow with multiple turns. Just some thoughts before we begin on the huge undertaking that will be networking :p
rob
June 25th, 2005, 09:02 PM
Using pre-rendered bits for the rotation of the spacecraft seems the lightest CPU wise thing to do. I realize it means alot of images, but networking, more AI, and possibly some other cool effects (particle perhaps?) will eat up CPU speed under the interpreted environment. Btw.. time to drag in threads.
Just my 0.02 :)
Rob
rob
June 25th, 2005, 10:06 PM
You know after thinking about this post later, why not have a 8-10 position static image for the rotation of the ship, then have an rmagic or rendered in real time spaceship for the higher end cpu's.. and have a command line switch or something to switch between the two. That way it would be playable on both simple and better machines.
Thoughts?
Rob
steve_d555
June 25th, 2005, 10:18 PM
That might be a good idea except for window users who can't really use command line arguments. Maybe if we make a menu we can have the user choose between real-time or pre-generate (and other things like Online/Offline and other options) and if they choose pre-generate we can use rmagick to rotate and write them. Also a configuration file which should be fairly easy to implement given ruby's built in I/O. Of course using rmagick would add more dependencies which aren't good.
rob
June 25th, 2005, 11:21 PM
I know cmdline is difficult under Windows, but a switcher/menu app like run.rb or something would be nice, to show the splash screen and menu perhaps.. and saving / loading options from a config file.
I haven't had much time to work on it, but I promise I'll get some coding in :)
Rob
bluetechnx
June 25th, 2005, 11:54 PM
yea, switcher/menu app would be nice. Maybe in wx/fox?
steve_d555
June 26th, 2005, 12:28 AM
I'm sure we can implement it in SDL. If anyone has ever played Supertux they have a great menu and it is made entirely with SDL. I made a very, very simple example and put it in the repository under menu.rb It allows you to switch between options with the keyboard.
rob
June 26th, 2005, 12:52 AM
FYI: I've renamed the thread and made it sticky.
steve_d555
June 26th, 2005, 12:59 AM
Heh, very cool. Updated the repository to include my version of a very, very simple menu. Press escape and you can see it. Then press enter while in the menu and you go right back to the game.
BTW bluetechnx you should probably get an svn account if you want to commit and stuff.
steve_d555
June 26th, 2005, 01:22 AM
Very simple startup menu, and pause menu. We can definitely build off of here (maybe images instead of text, who knows?). I'm sure someone can clean up my version to make it easier to edit as my code is not the most developer friendly :p
rob
June 26th, 2005, 02:55 AM
I organized the project folder a bit (if anyone doesn't like it please let me know, just doing some housekeeping) .. and also added hull and sheild levels to ships.rb.
Rob
steve_d555
June 26th, 2005, 11:12 PM
Powerups :p
rob
June 27th, 2005, 02:09 AM
One issue we'll have to deal with sometime soon.. The mouse support I added takes no account of which direction the ship is facing. How will we figure such thing?
If right mouse button fires, how about left button fires engines? Then we move towards an asteroids thing, but with that we could change directions of the ship.
Thoughts on this issue anyone?
Rob
steve_d555
June 27th, 2005, 08:50 AM
Personally I think we should stick to keyboard control though I do think mouse control is cool it really isn't practical If we are going to do asteroids style.
On that note, I introduce the first branch. I made a spinning one and all them images (they are pretty horrible). For now it only happens when you press the left arrow key. Could someone clean up my code, it is pretty messu?
We should probably think about designing new ship icons and stuff.
rob
June 27th, 2005, 01:23 PM
In single player mode mouse control would be OK, but in multiplayer mode, especially if the other player was using keyboard, the mouse player would have a big advantage.
Maybe a command line switch for the menu? I dunno..
Rob
mserms
June 27th, 2005, 06:44 PM
I head off for a couple of days and there's loads of new stuff when I come back - smart :)
I've spent the last few hours trying to get SDL transformations (rotation) working. Although I could get it to rotate 180 degrees fine, I couldn't get any other rotation working correctly. At one stage I had a very cool wormhole animation effect (that may actually be useful at a later stage!), but I can't get my head round what was happening. I have been using code a bit like this (and trying all sorts of combinations!):
@rotationAmount = 180
#46 x 46 is the max size of a rotating 32 x 32 square - no idea if this is the best idea or not 64 x 64 seems to work better sometimes!
@newSurface = SDL::Surface.new(SDL::SWSURFACE,32,32, @format)
#it would make more sense to use @format.w/2 and @format.h/2 to make the image rotate on the centre point, but that doesn't seem to do as well. No doubt I'm just being rubbish.
SDL.transform(@format, @newSurface, @rotationAmount, 1.0, 1.0, @format.w, @format.h, 0, 0, 0) if direction == "right"
@format = @newSurface.displayFormat
Shame the SDL libs haven't got better docs. Does anyone know of a C++ SDL rotation tut? Fancy another lightning SDL fix Steve? ;)
From the messing about that I have done though, I would say that SDL rotation will be fine CPU wise. FWIW, I am running a 2ghz Centrino (Sonoma) with a gig of ram and it seemed fine. As Rob said, there will be other stuff taking up the CPU too though, so it's hard to tell. I do think that it'll need to be some sort of on the fly transformation though - I think that the game will need as much flexibility as possible with aiming and the like.
What does everyone else think?
bluetechnx
June 27th, 2005, 08:11 PM
try these C++ and SDL tutorials...
general SDL - lesson 6 is a "space shooter" :)
http://cone3d.gamedev.net/cgi-bin/index.pl?page=tutorials/gfxsdl/index
http://cone3d.gamedev.net/lesson7/
rob
June 27th, 2005, 08:49 PM
Two wonderful resources, and lesson 7 gives a very nice and slightly addictive game :)
Rob
steve_d555
June 28th, 2005, 05:05 AM
Okay, I uploaded a rotation.rb file which seems to work on my computer. Press space and it rotates 15 degrees.
Hows that for a quick fix :D
Just kidding.
EDIT: Whats up with smilies? They don't seem to be showing up.
steve_d555
June 28th, 2005, 12:12 PM
Woo! Rotation and firing working now. Committed to branch, so check it out.
rob
June 28th, 2005, 12:36 PM
The smiles are showing up to me :)
Rob
EDIT: Oh wait.. only some are showing up.. I'll fix.
rob
June 28th, 2005, 12:41 PM
Now they are :)
Rob
steve_d555
June 28th, 2005, 01:33 PM
Woo! :p
Steve
steve_d555
June 28th, 2005, 04:47 PM
Up next!
Scrolling backgrounds :D
I think this should be fairly easy to implement as we can have a huge background image and then just choose which parts to blit with blitSurface.
rob
June 28th, 2005, 06:02 PM
I would recommend writing a map editor (simplistic) before implimenting this. This way, you can think about the design of a level more and not code yourself into a corner during the graphic implimentation.
Rob
mserms
June 29th, 2005, 06:23 AM
I would recommend writing a map editor (simplistic) before implimenting this. This way, you can think about the design of a level more and not code yourself into a corner during the graphic implimentation.
Ah, woops! Just committed scrolling background code before reading this post - sorry! I daresay it's buggy too... (I haven't even tried the collision detection and stuff).
steve_d555
June 29th, 2005, 08:53 AM
Okay since the branch code is now screwed up (Sorry Mark it is :p ) I am going to try and take out the working branch code (w/o background scrolling) and move it to trunk, if thats all right with you guys.
steve_d555
June 29th, 2005, 09:07 AM
Okay I have moved the working code to trunk and kept the background scrolling in branch. I have also deleted all the icon rotation files as we wont be needing them anymore.
mserms
June 29th, 2005, 09:50 AM
Okay since the branch code is now screwed up (Sorry Mark it is :p )
*nods*
But we've only got to re-code all the object movement, firing and collision detection stuff. Oh, wait - that's the whole game! ;)
Good idea moving the working game to trunk. I have kind of broken everything in branch! :)
steve_d555
June 29th, 2005, 10:05 AM
As long as we're re-coding the whole project, we should probably think about how to incorporate networking i.e. server browser (gtk or wxWindows?) and other networking-related things. Maybe even thinking about menus using not SDL but something else (again something like gtk or wxWindows).
steve_d555
July 1st, 2005, 08:22 PM
Sorry about the lack of development, I had some stuff to do the past couple days and didn't have time to code. I've sorted out the collision detection and firing (without recoding :D ), so all we have to do is get object movement/placement working. That should be fairly easy to resolve, and then we can get on with the next step.
steve_d555
July 3rd, 2005, 11:36 AM
Mark, Mark wherever you are (Hopefully in Edinburgh, but you never know), could you please integrate the view code (i.e. putting powerups in a fixed place so that they don't move with the ship (enemies too)), because I don't really know how :o , and then we can begin on networking and multiplayer. Thanks man :D
Kinda sucks that we live 5 hours apart. When I'm just starting to get into coding you're going to sleep :rolleyes:
EDIT: I'm also thinking that maybe we should find a way to integrate "gravity" so to speak. Where if you start moving in one direction you keep moving until you stop or turn (or a certain amount of time has passed).
rob
July 3rd, 2005, 01:23 PM
EDIT: I'm also thinking that maybe we should find a way to integrate "gravity" so to speak. Where if you start moving in one direction you keep moving until you stop or turn (or a certain amount of time has passed).
You mean inertia. Yes, this would be defined by a constant and can be emulated with a tad bit of math. If I get a chance to add it over the holiday weekend I will give it a shot.
Rob
steve_d555
July 3rd, 2005, 01:28 PM
You mean inertia. Yes, this would be defined by a constant and can be emulated with a tad bit of math. If I get a chance to add it over the holiday weekend I will give it a shot.
Rob
Ya, thats the word. And I even took physics this year :rolleyes: . Amazing what a month of Summer Vacation can do to your memory.
steve_d555
July 4th, 2005, 03:36 PM
Maybe you guys can help. I'm trying to Powerups to work in an absolute place but it seems that it works sometimes but other times when you move to a certain place (usually beneath the powerups) they vanish. I'm sure there is something wrong with my math. If you guys could check it over and help that'd be great.
def draw
if @x < (@game.ship.x + 320) && @x > (@game.ship.x - 320) && @y < (@game.ship.y + 240) && @y > (@game.ship.y - 240)
SDL.blitSurface(@format, 0, 0, @width, @height, @screen, (@x - (@game.ship.x - @x)), (@y - (@game.ship.y - @y)))
puts "Powerup at " + (@x - (@game.ship.x - @x)).to_s + ", " + (@y - (@game.ship.y - @y)).to_s # This was for debugging
end
end
steve_d555
July 6th, 2005, 01:35 PM
Haha! Got it. I think I found an equation for both Powerups and other ships. It works for powerups but I'll try Drones too.
@displayx = @x - (@game.ship.x - @game.ship.displayx)
@displayy = @y - (@game.ship.y - @game.ship.displayy)
mserms
July 7th, 2005, 06:33 AM
Hey guys.
I've been pretty ill all week with some dodgy stomach bug (sounds lame, but it's true). Feeling much better now, but I'm off on holiday to Berlin tomorrow until Tuesday (woohoo)! I wouldn't get away with taking a computer - I'm meeting a friend who works in Afghanistan and who I only see once a year. Sorry I've not been able to do anything for the last week and haven't been in touch - I'll get back on the case when I get back.
Inertia sounds cool.
Steve, that formula looks correct to me - a neat, elegant solution! Does it work?
When I get back into it, I would like to add obstacles and some sort of level style system (as well as getting stuck into the networking with you guys :)). I see in SVN there is basic network structuring in place - what's the progress?
mserms
July 7th, 2005, 11:22 AM
Does anyone have any experience of packaging Ruby apps?
It occurred to me that it would be useful to be able to package releases of Spacegame for non developers to test/play with. Read this as "my mates are going to want to have a go and there's no way I'll get away with saying just d/l this lib, install this dependency and this lib, then do an SVN checkout...."
I don't have a Windows box for testing this sort of stuff. *nix users are well used to dependencies and so on anyway (plus you can get ebuilds etc).
rob
July 7th, 2005, 11:35 AM
The biggest thing in installing this game under Windows is the SDL lib. If we could get that submitted to the gem repo then it would be alot easier.
steve_d555
July 7th, 2005, 02:16 PM
Glad you got better.
You can just go to spacegame.rubyforums.com and download a tarball of the directory, no Subversion required. There is also the one-click Ruby installer for windows so, like Rob said, the only problem would be the SDL lib.
The formula does work with powerups but it didn't seem to work with the Drones. I'm not sure why not. I'll try some other tests later.
Have fun in Berlin.
bluetechnx
July 8th, 2005, 12:47 AM
Since my senior project is done with as of Monday (crosses fingers, chants a prayer and sprinkles salt over shoulder :P)...I'll give a look into this.
My understanding is that Script2Exe can bundle a ruby program (collection of .rb files) and any needed 3rd party libs (SDL) and execute the contents as an exe.
I have used AllInOneRuby which is made by the same author (if I recall correctly) so I think RubyScript2Exe will probably handle this nicely...
my 2 cents.
rob
July 8th, 2005, 02:08 AM
Since my senior project is done with as of Monday (crosses fingers, chants a prayer and sprinkles salt over shoulder :P)...I'll give a look into this.
With all those good luck charms I'm sure you'll do fine :)
As for the Script2Exe.. that's really neat. I have to check into that.
Rob
steve_d555
July 9th, 2005, 05:24 PM
RubyScript2Exe is very cool. I checked it out and with the combination of tar2rubyscript I was able to make an exe (I'm on Windows, I'll try on Gentoo later) that seems to work. It's about 3mbs in size, so it's not very large.
mserms
July 11th, 2005, 01:10 PM
Cool, 3megs is pretty decent. Does that bundle everything, including the SDL libs?
Grrr, German keyboards have a funny layout. Good luck with the project bluetechnx.
steve_d555
July 12th, 2005, 03:09 PM
Rob, not sure if you already thought of it, but we'll probably need a master server also so that the clients can get a full server list (ip/users) and maybe later, stats for individual users.
rob
July 12th, 2005, 03:24 PM
Not a prob. Got those around ;)
Rob
steve_d555
July 12th, 2005, 04:03 PM
Got firing with displayx/y working .... with bugs. If you start moving up when DroneVert is near the bottom and there are fires you can see them move up, but only then. Also, the second DroneVert fire (only one it seems) disappears everytime about halfway to the edge of the screen. It is quite odd.
steve_d555
July 14th, 2005, 03:47 PM
Setup a Wiki at spacegame.rubyforums.com (websvn is still there at spacegame.rubyforums.com/websvn/). I'll probably put some basic info and our progress on it so that other people can check our progress without having to wade through 11 pages in the forum.
steve_d555
July 19th, 2005, 04:34 PM
Hi Guys,
Haven't been able to do much lately but I was able to commit a version with basic YAML config support and a working radar. I'll try and get some work done with a GUI in the next couple days.
Also, I was wondering how networking was going.
-Steve
EDIT: Two more things. One is the game's name. Spacegame is descriptive and all, but I mean it's kind of generic. Maybe we should wait until we get a release out. Also, I am probably going to try and get some sounds in (UT again, I just love them "M-M-M-M-Monter Killl" :D).
steve_d555
July 22nd, 2005, 11:05 PM
An answer to our level editor problems :D
http://flexlay.berlios.de/
mserms
July 26th, 2005, 07:40 AM
An answer to our level editor problems :D
http://flexlay.berlios.de/
Looks pretty interesting man.
Here's a bug/problem: I was faffing about with the game last night and realised some major limitations with our engine (you probably all know this already). We basically need a way for fires that are not to be displayed to die as they are constantly getting drawn which ultra slows down the game. Stay in one place and fire off 1000 bullets and then try to move...
steve_d555
July 26th, 2005, 07:43 PM
Okay, I solved the bullet problem, before we just had a side to side ship and shooting upwards but after implementing turning and such we forgot to change fire removal rules. Also I will probably be adding a firetimer like before with a progress bar to show recharging (the only reason I took it out in the first place was because I thought there was something up with the game or my keyboard and needed to test it out, problem is I never changed it back)
My test with flexlay failed as it doesn't compile with clanlib 0.7.8 so I will be trying to compile the svn version of clanlib in hopes of flexlay working.
EDIT: Also, we need a good way to deal with tile collisions. Although my version works somewhat it is not complete, and in no way perfect. If someone could find a better way, that would be great.
steve_d555
July 29th, 2005, 07:56 PM
Have yet to test Flexlay, planning to get to it this weekend. Otherwise, I am going to implement turrets (stationary guns of sorts).
Also I was flipping through Pickaxe and came across GServer (Simple Framework for writing TCP Servers). Rob, do you think that maybe we could use that as a basis and maybe it will be easier to write. I don't know, I've not really had experience with networking.
rob
July 30th, 2005, 08:18 PM
I'm not familiar with GServer, but I will check it out. Once our new site rollout is done I will have some more time on this project :)
Rob
bluetechnx
July 31st, 2005, 04:27 AM
its been a little while since I worked on distributed stuff....
Some things come to mind for those interested. To my knowledge Ruby threads are not native. I believe a Ruby thread just timeslices between threads internally in the VM (eg. no new thread is made in the underlying OS).
In a previous Java tetris game I wrote using Client/Server paradigm. The server recieved incoming messages and sqawned a new worker thread to handle each incoming request. The worker thread then did the job of say anaylsing the packet sent (welcome, update game state, leave game...ect). The main.java class if you will was just an open socket listening for incoming packets and always spawned a new thread....
Given normal Ruby threading...wouldn't this cause problems of thread starvation in cases where you wanted to handle some IO quickly.
What I'm trying to say is that since you don't get native threading the whole server WILL halt if some action is blocked for an excessive amount of time.
So say we are trying to send the updated game state to all users, and someone is also trying to connect to Spacegame. One of the two will have to win out (given not true threading) and if one process blocks/halts indefinetly....goodbye server.
Just my rambling thoughts...if anyone has any ideas or corrections. Pleae enlighten me.
steve_d555
July 31st, 2005, 03:33 PM
Okay I tried out Flexlay, but although it built properly with the latest SVN version of Clanlib, after trying out supertux-editor and netpanzer-editor it seems to be still very buggy. This is to be expected as it is at only 0.1.0, so maybe we should wait until it matures slightly or build our own solution.
steve_d555
August 9th, 2005, 01:33 PM
Well..... Ive been entirely too busy and gotten absolutely nothing done. Still have problems with Tile collision. Im also adding a delay in the game loop because the faster the fps the faster the game, meaning unfair advantages.
steve_d555
August 10th, 2005, 02:52 PM
Is anyone still around.....? :(
rob
August 10th, 2005, 04:19 PM
I'm still here.. Just waiting on a few projects to finish up so I'll have some free time. You know how the summer is, everyone is out of pocket...
steve_d555
August 12th, 2005, 10:48 AM
Okay, because SVN seems to be down/wierd I am going to post the branch/online for you guys to test the fps limiter. I am still having trouble with keeping the fps up though. The FPS just seems to keep going down and never up again. Maybe someone else can find the problem.
steve_d555
August 12th, 2005, 01:04 PM
Darn Bugs :rolleyes:
steve_d555
August 19th, 2005, 08:02 PM
Hi Guys.
It seems this project hasn't seen alot of development in the past couple weeks. I know we've all been busy with whatever it is (work, school for me soon) but I do not want this project to become on of millions of unfinished and dead project s on the net. If we can just work out some of the major bugs (Tile Collision.... still, sadly that's my fault as I can't seem to figure it out), start work on networking (we can all pitch in, it doesn't have to be all you Rob), and maybe find a graphic designer or someone who knows their way around Photoshop, we can have one of the first large games for Ruby and can show to everyone that Ruby is an awesome programming language. I think that if we can all get together and talk (on IRC or in a chat room) we could probably get some major work done. That's just my thoughts.
Steve.
steve_d555
August 19th, 2005, 11:40 PM
Oh yes, I found a cool library called sdl_net which looks cool, but I can't seem to find Ruby bindings :(
steve_d555
August 21st, 2005, 02:58 PM
Okay I have finally got tile collision/response working so.... wooooo :D
steve_d555
August 21st, 2005, 03:08 PM
I got the SVN working, Rob. It seems the permissions were wrong or something. I changed them to 777, which you may not like because of security but it seems the only way to upload things.
rob
August 21st, 2005, 07:14 PM
If it works, it works :)
While 777 isn't the best way to go, we have good secure systems that should prevent most problems related to that.
Rob
steve_d555
August 25th, 2005, 01:51 AM
Cleaned up a lot of stuff, started future proofing (removing @width/@height adding @format.w/h stuff like that), started different weapons config.
We.....need....a Graphics Artist :D
No offense to our individual photoshop/paint skills, but we need someone.
Rob, I'm not sure how much work you have but do you think that maybe this weekend we could start networking? I seriously have no idea where to start. I was browsing the Gamedev forums and I'm pretty much convinced we'll have to use UDP. Otherwise thats as much as I know :o
Otherwise..... I've been looking at Gnome Canvas and was wondering is there something similar for QT/KDE (for the Tile Editor). Because I don't want to start on one toolkit and know that there is a better/easier way.
Oh ya, Rob, I really like that banner on top of the OCS forums, think Ruby forums could get something like that ;)
steve_d555
August 29th, 2005, 03:50 AM
Made a working menu system. Even more code cleanups and svn cleanups. Added in some alpha transparency, looks really good.
steve_d555
September 1st, 2005, 06:11 AM
Hey guys,
You should definitely check out the newest revision of the game and get back to me about what you think of the GUI.
Also, I've been hanging around gamedev.net the past couple of days (just for the hell of it, and they've been helping a little with the level editor creation) and they do have a 'Help Wanted' forum. You think that since none of us are graphics artists, and no one knows anyone who is, should I post that we need some help? I would say that this is an Open Source project and we will not be able to pay at all and I would probably post a couple screenshots of the current game.
steve_d555
September 1st, 2005, 06:31 AM
Ah yes, a couple more things. As we are moving to networking (albeit, slowly) I think that we should move the current branches/online to trunk/offline and begin work on taking out calculations out of the client and moving them to the server as a client doing all calculations and then drawing will be quickly overloaded, instead of just drawing calculations that the server provides.
steve_d555
September 1st, 2005, 10:27 PM
I was just wondering, do you guys think you could give me estimates on when you'll be able to come back and help with the project? I start school on the 8th but I will always be around after 3:30-ish and could definitely code then. Please respond, as I would like to know when we can get back into the swing of things.
steve_d555
September 2nd, 2005, 09:58 PM
C'mon guys. Although there is still much to do with getting this game fully functional, I can not do everything (not that I have, I'm just saying). I have absolutely no graphics experience, I have no idea about network programming, and as for the Map Editor, I'm learning C++ as I go along, pretty much. So I would really love it if you guys could at least respond and tell me when you could help, even for a little bit.
I'm sorry, I'm just a little frustrated about the lack of response.
And, one question, Rob, do you think you'll be able to work with Ruby's UDP library or do you think SDL_net bindings would be more useful.
rob
September 3rd, 2005, 01:28 PM
No one's expecting you to do everything. I imagine that alot of folks are just busy at the moment. I know my free time has become almost non-existant.
I will get back into gear with this, I promise. I'm not sure which is the better network API for Ruby, I'll do some research on this.
bluetechnx
September 3rd, 2005, 01:40 PM
yea, I will try to find some time to help. But I'm working two jobs and my days start at 5am and go to 5pm, easily...see what I can squeeze out of the remaining day. At least maybe I offer feedback on ideas.
steve_d555
September 4th, 2005, 02:18 AM
Thats all I was asking, thanks.
Though I would like some feedback on the earlier questions I asked about a Graphic Designer and gamedev.net and the branches -> trunk.
eddarl
September 8th, 2005, 07:33 AM
Stupid question
I am on Linux and can't seem to uncompress the zip files
Using unzip I get errors and can't uncompress.
rob
September 8th, 2005, 03:52 PM
It is possible that someone used the new Winzip format. Try installing rar and use its zip library, it might work better.
steve_d555
September 8th, 2005, 04:58 PM
Actually, they do seem corrupted, I tried using WinRAR and they didn't work either and neither does unzip under Linux. Those are also very old version, I'll post a recent tar.gz of the latest svn for you to try out.
And rob, since you are on, what do you think of moving the current branches/online to trunk/offline and starting, not from scratch (but pretty much since multiplayer is wholy different than single) in trunk/online?
EDIT:
Link to svn tar.gz: http://steviedizzle.com/stuff/game.tar.gz
steve_d555
September 17th, 2005, 02:33 PM
Schools been pretty bad the past week, so not much has been happening, but I was just browsing around rubyforge today and thought why not add our project? We might be able to get some support and start moving forward again (we've kind of stagnated). What do you guys think?
Update: If we do go ahead and register we will probably have to think up a proper name and decide which license to use (I'm thinking just GPL)
rob
September 17th, 2005, 09:13 PM
I would go GPL yea.
In terms of progress.. it will get better, we've just got alot of folks busy right now that did work on it.
steve_d555
September 17th, 2005, 11:31 PM
I know, I'm not blaming you or anyone else, I'm just saying. I'm fairly busy now too, but it would be cool if the project could keep going ahead and maybe getting some fresh ideas from people who haven't been to the forum.
I'll think up a name tonight and post in the morning.
steve_d555
September 18th, 2005, 11:06 PM
I have no imagination :(
How 'bout "rasteroids".
Heh, sort of like Ruby Asteroids.
Other than that I can't think of anything...
rob
September 19th, 2005, 03:06 PM
Rasteriods sounds like Scooby Do saying Asteroids ;)
steve_d555
September 19th, 2005, 08:36 PM
Rasteriods sounds like Scooby Do saying Asteroids ;)
:p
Today I had some free time and started trying to modularize (sp?) the game. I committed to branches/offline but our repository is a bit messy right now. Run game.rb to see my progress. So far I've got the gui drawing perfectly but cant seem to get the ship to draw. I'm pretty sure we need a re-write (this) to be able to accomdate the client-server relationship when we begin networking. Definitely check this out and maybe help me a little :D . I've taken the concepts from the current one but added generic methods so that any ship or object can call them hopefully and maybe make the framework larger and the clients smaller allowing for less overhead.
I still have no idea what the name should be. Anyone know a foreign language?
steve_d555
September 19th, 2005, 10:47 PM
Got the ship movement working again in the branches/offline. Also added tiles/powerups. I just used sloccount to count our lines of code and branches/online is ~ 700 while this new one is only ~350. I think that's pretty good :D
rob
September 19th, 2005, 10:54 PM
Anytime you can get 700 lines of code down to 300 and you have the same functionality, or better, you're doing something great!
I'll look at it this week, I promise! It's on my todo ;)
As for some name suggestions (off the top of my head):
Stellablast
Nebular Gauntlet
Ohh.. what about making a new forum category for projects and giving this game its own forum section?
steve_d555
September 19th, 2005, 11:00 PM
Heh, why not, it is growing quite large.
Just for the hell of it I was going to post the sloccount results:
branches/offline
Total Physical Source Lines of Code (SLOC) = 329
Development Effort Estimate, Person-Years (Person-Months) = 0.06 (0.75)
(Basic COCOMO model, Person-Months = 2.4 * (KSLOC**1.05))
Schedule Estimate, Years (Months) = 0.19 (2.24)
(Basic COCOMO model, Months = 2.5 * (person-months**0.38))
Estimated Average Number of Developers (Effort/Schedule) = 0.33
Total Estimated Cost to Develop = $ 8,408
branches/online
Total Physical Source Lines of Code (SLOC) = 858
Development Effort Estimate, Person-Years (Person-Months) = 0.17 (2.04)
(Basic COCOMO model, Person-Months = 2.4 * (KSLOC**1.05))
Schedule Estimate, Years (Months) = 0.27 (3.28)
(Basic COCOMO model, Months = 2.5 * (person-months**0.38))
Estimated Average Number of Developers (Effort/Schedule) = 0.62
Total Estimated Cost to Develop = $ 23,004
Those names are better than mine. Nebular Gauntlet especially sounds cool.
Oh yes, and I was just going to say that the best thing about this re-write is that almost all functions are in the Game module so ship.rb, tile.rb, and powerup.rb are all very small (maybe 25 lines of code each).
rob
September 19th, 2005, 11:19 PM
This is the last reply to this thread. Start new topics in this sub forum!
Rob
vBulletin® v3.7.3, Copyright ©2000-2008, Jelsoft Enterprises Ltd.