Author Topic: TD (the library and editor used for Robowack 2)  (Read 3291 times)

Marcus

  • Administrator
  • Hero Member
  • *****
  • Posts: 541
    • View Profile
No, I'm far from ready with this. Lots of more documentation to write (especially for the editor) and more examples to create. But I thought it'd be fun to post atleast something :)

https://www.naalaa.com/Marcus/TD.zip (I'll update this one every now and then.)

I think this one needs the latest naalaa version (with the correct OpenGL extension, sameone used in the box2d lib) to function, but I'm not sure.

« Last Edit: November 29, 2014 by Marcus »
.\\\opz

kcfb

  • Jr. Member
  • **
  • Posts: 80
    • View Profile
Re: TD (the library and editor used for Robowack 2)
« Reply #1 on: November 29, 2014 »
Very nice examples included...it's good to see how much can be done in a relatively small number of lines of NaaLaa code. The editor scares me!!!

Marcus

  • Administrator
  • Hero Member
  • *****
  • Posts: 541
    • View Profile
Re: TD (the library and editor used for Robowack 2)
« Reply #2 on: November 29, 2014 »
The editor scares me!!!

Yes, but just you wait until you accidentally open the window containing the keyboard commands.
.\\\opz

Marcus

  • Administrator
  • Hero Member
  • *****
  • Posts: 541
    • View Profile
Re: TD (the library and editor used for Robowack 2)
« Reply #3 on: November 29, 2014 »
Actually, for this editor I think video tutorials is a must.
.\\\opz

kcfb

  • Jr. Member
  • **
  • Posts: 80
    • View Profile
Re: TD (the library and editor used for Robowack 2)
« Reply #4 on: November 29, 2014 »
That would be good - the previous videos have been a great help........

Marcus

  • Administrator
  • Hero Member
  • *****
  • Posts: 541
    • View Profile
Re: TD (the library and editor used for Robowack 2)
« Reply #5 on: November 29, 2014 »
That would be good - the previous videos have been a great help........

I just finished the first one, but it'll take forever to upload because of the high resolution required :P  I'm using a pretty slow DSL connection, but we're soon getting some fast fiber.
.\\\opz

Marcus

  • Administrator
  • Hero Member
  • *****
  • Posts: 541
    • View Profile
Re: TD (the library and editor used for Robowack 2)
« Reply #6 on: November 29, 2014 »
Here's the first tutorial for the editor: https://www.youtube.com/watch?v=EqK-veHjUVA
.\\\opz

johnno56

  • Guest
Re: TD (the library and editor used for Robowack 2)
« Reply #7 on: November 30, 2014 »
Looking good.... hanging out for the next umteen videos... (no pressure...)

J

X54321

  • Newbie
  • *
  • Posts: 38
  • I make games and cartoons. And stuff.
    • View Profile
    • Bitendo Software
Re: TD (the library and editor used for Robowack 2)
« Reply #8 on: November 30, 2014 »
This is beyond cool, I've been pretty excited for this for a while.
I found that in examples 1-4 (but not 5 for some reason), the camera movement lagged from time to time.
Would it be possible to use 'set mouse x,y' in its place?
-The Tophat Demon

Marcus

  • Administrator
  • Hero Member
  • *****
  • Posts: 541
    • View Profile
Re: TD (the library and editor used for Robowack 2)
« Reply #9 on: December 01, 2014 »
Good morning!

Here's the second tutorial video:

http://youtu.be/f6f76EoekqM

Weird thing with the mouse, although I haven't seen it myself. 'set mouse' won't work here, I'm afraid. John knows what he needs to do for me to be able to fix that, right John?

« Last Edit: December 01, 2014 by Marcus »
.\\\opz

X54321

  • Newbie
  • *
  • Posts: 38
  • I make games and cartoons. And stuff.
    • View Profile
    • Bitendo Software
Re: TD (the library and editor used for Robowack 2)
« Reply #10 on: December 01, 2014 »
Well, I recorded a video showing what exactly is happening.
https://www.youtube.com/watch?v=mCevHR1brok&feature=youtu.be
Again, it didn't happen in example 5 or example 1.
-The Tophat Demon

Marcus

  • Administrator
  • Hero Member
  • *****
  • Posts: 541
    • View Profile
Re: TD (the library and editor used for Robowack 2)
« Reply #11 on: December 02, 2014 »
Wow, the cursor seem to live its own life  :) You just run the example and nothing more, no resize of the window for example?

I noticed something similar when doing fullscreen mode in your 7dfps game. In that case it had to do with internal downscale/upscale of the cursor pos.

I will solve this.
.\\\opz

Marcus

  • Administrator
  • Hero Member
  • *****
  • Posts: 541
    • View Profile
Re: TD (the library and editor used for Robowack 2)
« Reply #12 on: December 02, 2014 »
Well, I recorded a video showing what exactly is happening.
https://www.youtube.com/watch?v=mCevHR1brok&feature=youtu.be
Again, it didn't happen in example 5 or example 1.

In example 2, can you try and replace:

Code: [Select]
mouseDX = mousex() - TD_GetWidth()/2
mouseDY = mousey() - TD_GetHeight()/2
_glMoveCursor TD_GetWidth()/2, TD_GetHeight()/2

with:

Code: [Select]
mouseDX = mousex() - glWidth()/2
mouseDY = mousey() - glHeight()/2
_glMoveCursor glWidth()/2, glHeight()/2

If this doesn't help, can you also (still using the new code above) try to add this before entering the game loop:

Code: [Select]
_glMake2D false
_glMake3D

And if that doesn't work, try with 'true' as parameter to glMake2D instead.

Hope any of these things work.

EDIT I see now that TD_Width() actually just calls glWidth(), so that shouldn't help. Argh! I'm using GLUT (or FreeGLUT) for the window and input. I see that it sends mouse coordinates to the keyboard functions too. Maybe if you hold a key down, GLUT some times skip sending information to the mouse callbacks, which means I don't capture the changes ... Yes maybe. So what happens if you just stand still and look around?
« Last Edit: December 02, 2014 by Marcus »
.\\\opz

Marcus

  • Administrator
  • Hero Member
  • *****
  • Posts: 541
    • View Profile
Re: TD (the library and editor used for Robowack 2)
« Reply #13 on: December 02, 2014 »
You can try this new gl_next.dll file (I think this one will be used, instead of the one in the system folder, if you put it in the same folder as the TD exampels).

edit on my phone now, realizing I forgot to attach the file. will do so tomorrow.
« Last Edit: December 02, 2014 by Marcus »
.\\\opz

X54321

  • Newbie
  • *
  • Posts: 38
  • I make games and cartoons. And stuff.
    • View Profile
    • Bitendo Software
Re: TD (the library and editor used for Robowack 2)
« Reply #14 on: December 02, 2014 »

If this doesn't help, can you also (still using the new code above) try to add this before entering the game loop:

Code: [Select]
_glMake2D false
_glMake3D

And if that doesn't work, try with 'true' as parameter to glMake2D instead.

EDIT I see now that TD_Width() actually just calls glWidth(), so that shouldn't help. Argh! I'm using GLUT (or FreeGLUT) for the window and input. I see that it sends mouse coordinates to the keyboard functions too. Maybe if you hold a key down, GLUT some times skip sending information to the mouse callbacks, which means I don't capture the changes ... Yes maybe. So what happens if you just stand still and look around?

OK, so I tried the _glMake3D thing and it didn't really do much.
Also, the problem still occurs when you're standing still (the player can't move in my own example).
Well, thanks for your consideration, and I hope that .dll will come around soon.

(Also, the fullscreen glitch w/ Total Invasion can be fixed by offsetting the mouseDX by +1)
-The Tophat Demon