Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: More fiddlings with openGL...  (Read 1026 times)

qwertyuiopas

  • Bay Watcher
  • Photoshop is for elves who cannot use MSPaint.
    • View Profile
    • uristqwerty.ca, my current (barren) site.
More fiddlings with openGL...
« on: October 13, 2008, 06:55:34 pm »

Well, I ended up with this idea for a game, where you would control a space ship that could be upgraded with segments and stuff..

Well, anyways, I got around to starting SOMETHING.
In the process, I learned about working with multiple files, pusging and poping opengl transformation matrixes, and most importantly, textures and transparency.

The end result currently looks a lot likr battleships forever, at least partly.

Download, full source. You will need to edit compile.bat's filepath, and it is compiled with minGW.

Currently, A and D change the rotation speed of the main segment.

I am planning a rewrite of the rendering and updating functions to use a loop instead of recursion, and linked lists for parts, as well as a modified addpart function.


Edit: Well, I did all that and added a simple editing interface.
New download

The cryptic editing controls:
m and n cycle through the parts sharing the same parent.
j and k move to the parent/child of the current part.
h creates a new part, disabling the editing controls until you place the part with enter. During this time you are able to select what side of the current part to place it on with the arrow keys.

Edit again: I have a newer version, where A and D rotate the currently selected part instead of the whole thing, and it won't skip a selection, but I am not going to update it tonight.
« Last Edit: October 13, 2008, 09:12:03 pm by qwertyuiopas »
Logged
Eh?
Eh!

qwertyuiopas

  • Bay Watcher
  • Photoshop is for elves who cannot use MSPaint.
    • View Profile
    • uristqwerty.ca, my current (barren) site.
Re: More fiddlings with openGL...
« Reply #1 on: October 14, 2008, 08:22:17 pm »

Yet another version.

G deletes currently selected part, and all it's children, and the previously mentioned A and D rotating the selection and the improved selection.
Logged
Eh?
Eh!