Welcome, Guest. Please login or register.

Login with username, password and session length

 
Advanced search

1411283 Posts in 69325 Topics- by 58380 Members - Latest Member: bob1029

March 29, 2024, 12:37:39 AM

Need hosting? Check out Digital Ocean
(more details in this thread)
TIGSource ForumsDeveloperTechnical (Moderator: ThemsAllTook)The happy programmer room
Pages: 1 ... 195 196 [197] 198 199 ... 279
Print
Author Topic: The happy programmer room  (Read 673116 times)
Geti
Level 10
*****



View Profile WWW
« Reply #3920 on: October 25, 2014, 03:02:09 PM »

That's correct. Tips would be to not do everything in scripts if you can help it because the speed gap is unexpectedly large. Cache script contexts where possible (the AS docs were ok at explaining that when we were implementing it). If you can keep the number of script calls down too, that's good - just getting into and out of AS is like 4 function calls deep. If you can batch calls (like, if 50 objects all have the same script on them, call it for all of them rather than burying some loop over all your attached scripts in update) then that's also something you should consider strongly. Basically be very wary of performance if you're going to continually scale your game up like we did, haha.

The best thing about AS is how quick it is to bind. We had a thousand or so functions and data members to bind, so Lua's manual binding would be a no go, meaning we'd have to go the swig route or similar, which is another dependency - that was the main driving factor behind the decision, the other one being static typing and C++ alike syntax.
Logged

oahda
Level 10
*****



View Profile
« Reply #3921 on: October 25, 2014, 05:01:24 PM »

Thanks! Some of those things I did not know, and will try to set up later. Not doing everything in scripts, however, I've been thinking all along; especially that I'm going to be writing the controllers and stuff for the submarine in C++ rather than AS since it's such a core feature of the game anyway.

--------

And, speaking of happy programmers, I have just spent the day putting Box2D into the framework too (not done yet, but enough to do stuff) and spent 2.5 hours or so reimplementing the submarine's controllers by applying actual physics to it, rather than the temporary approach used for testing in the previous gifs recently posted by me!

Stuff is getting real, and it is so much fun having gotten to a point where I can finally start on the game and develop the rest of the framework alongside it as the game requires new features be added to the framework.

As a little bonus, I also added in my simple idle animation from previous iterations of this project, where the boat moves up and down using a sine curve. Also removed the cursor from the window to make it more dynamic to look at, as I'll be making this work with a joystick as soon as my DualShock arrives next week! Grin

« Last Edit: October 26, 2014, 02:15:49 AM by Prinsessa » Logged

Geti
Level 10
*****



View Profile WWW
« Reply #3922 on: October 25, 2014, 09:01:00 PM »

Happy to help.
Logged

oahda
Level 10
*****



View Profile
« Reply #3923 on: October 26, 2014, 07:57:54 AM »

c;

------

Some of today has been spent adding some more detail to the previously shown section of the kitty game, adding crystals to the chandelier and fixing a few bugs or buglikes.



EDIT:
Also more work on integrating physics into the submarine game. Yay!





EDIT 2 on the 28th:
I got the camera in there~

What can't be seen is also a layer system I made. I haven't had enough time after work, but hopefully by now at least tomorrow, having fixed these two things both needed for it, I will be able to mess around with my idea for a slightly more intricate than usual parallax system to give the game a 3D-like feel. Nothing super innovative, but I think it's going to be pretty. Hyped!

Also I finally got a delivery confirmation on my DualShock tonight, so it's on the way! I hope to get it tomorrow, of course, but I'll probably have to wait until Thursday.

« Last Edit: October 28, 2014, 03:27:32 PM by Prinsessa » Logged

oahda
Level 10
*****



View Profile
« Reply #3924 on: October 30, 2014, 12:09:49 PM »

PS3 CONTROLLER ARRIVED AND I GOT THE JOYSTICK WORKING!! Tears of Joy



This calls for a victory dance!



EDIT:
I managed to map the PS button on the controller to start the game when I'm in Xcode! :D :D :D D:D:D:D:D:D.d

EDIT 2:
And, of course, made it quit the game to go back to Xcode in game too!

EDIT 3 on the 1st / Nov:
Basics of lighting engine working! GLSL and stuff is a long way to go tho and I'll be focusing on other things first.



Geez, this thread is turning into my personal devlog. Not enough happy programmers here. I guess I should start posting in my actual devlog instead.
« Last Edit: November 01, 2014, 07:21:19 AM by Prinsessa » Logged

pelle
Level 2
**



View Profile WWW
« Reply #3925 on: November 11, 2014, 04:45:12 PM »

Put s7 in my code tree and in almost no time had my C++ map-generation code broken out and replaced with a script. Game got to the point where it started to be painful to code all the high-level stuff like generating map and encounters in C++. Much happier now.
Logged
Sik
Level 10
*****


View Profile WWW
« Reply #3926 on: November 13, 2014, 11:07:22 AM »

Tried to implement SAPI support in Sol but it turns out MinGW-w64 doesn't support it. Except for the newest version (apparently it was too new for Canonical to pick up when they made the package back in Ubuntu 14.04). So I copied in the new files and now it's working just fine =D

There are headers for SAPI 5.1, 5.3 and 5.4, if you wonder.
Logged
oahda
Level 10
*****



View Profile
« Reply #3927 on: November 17, 2014, 04:38:17 AM »

Figured out how to render to texture in SDL 2. So many possibilities.
Logged

ThemsAllTook
Administrator
Level 10
******



View Profile WWW
« Reply #3928 on: November 17, 2014, 10:36:18 AM »

Figured out how to render to texture in SDL 2. So many possibilities.

Hah, I posted almost exactly a month ago about the same thing. It really is a game changer as far as visual effects go.
Logged

Boreal
Level 6
*


Reinventing the wheel


View Profile
« Reply #3929 on: November 21, 2014, 08:03:53 PM »

Working on integrating Lua into my WIP engine.  So far, it's only used for setting options, but I've done it in a rather clever way (if I do say so myself).

Creating the options on both the C++ and Lua sides is quite easy.  For example:
Code:
// Lua
video = {
    resolution = { 1280, 720 },
    isFullScreen = false,
    isVSyncEnabled = true
}
video = makeOptionSection("video", video)

// C++
Options::Size resolution("video.resolution", 1024, 768);
Options::Boolean isFullScreen("video.isFullScreen", false);
Options::Boolean isVSyncEnabled("video.isVSyncEnabled", false);

// Example usage
isFullScreen.watch([](bool value) {
    SDL_SetWindowFullscreen(g_window, value ? SDL_WINDOW_FULLSCREEN : 0);
});

Now, whenever a field of the video table is changed anywhere in the Lua script, the C++ code will automatically call one of the watcher functions like I showed above.  The way it works is that that makeOptionSection() function wraps the table it's given in a proxy table.  This proxy table has the metamethods __index and __newindex defined to pass through to the table that it acts as a proxy for, but __newindex also notifies a C++ callback of the field being changed.

This makes it really easy to change the options.  An entire file can be loaded, e.g. when switching profiles, items can be changed individually using the menu (which is scripted in Lua), or you can type something like video.isFullScreen = true into the console.
Logged

"In software, the only numbers of significance are 0, 1, and N." - Josh Barczak

magma - Reconstructed Mantle API
ThemsAllTook
Administrator
Level 10
******



View Profile WWW
« Reply #3930 on: November 24, 2014, 12:34:10 AM »

I was having some major frustrations with Linux not too long ago. What I'd been doing for the longest time is trying to use a single 64-bit Ubuntu installation to build both 32-bit and 64-bit executables. This requires installing gcc-multilib and the i386 versions of each package you use, and passing -m32 to gcc when you want to compile 32-bit code. It kind of worked, but the problem was that a whole lot of packages are assholes about having the i386 and x86_64 versions of themselves installed at the same time. When I'd install the i386 version of a package, it would remove the x86_64 version of itself, deleting all of its files from /usr/lib/x86_64-linux-gnu when I still wanted to link them.

To work around this, I'd been downloading the i386 packages I needed, unpacking them, and copying the appropriate contents into /usr/lib/i386-linux-gnu manually. This did work, but it was highly tedious and fragile. I lost all of the niceties of package management like inter-package dependencies, so even if I could install something with a single apt-get command for x86_64, I might have to download a dozen or more i386 packages just to get all the files I needed. The thing that bothered me the most about it other than how much work it was to track down all that I needed was that I was making it harder and harder to reproduce my dev environment if I needed to take it elsewhere, or if the hard drive failed or something like that.

I finally got fed up with my house of cards today, and tried a completely different approach: VirtualBox VMs with completely separate Ubuntu instances for 32- and 64-bit. Massive improvement. My build environment setup commands were trimmed down to just 7 packages each I needed to tell apt-get to fetch, and everything just works. Still not quite as nice as being able to just build both architectures from the same system, but it's worlds better than where I was before. I was about ready to give up on Linux support for the game I'm gearing up to release within the next week or two, but now everything is peachy.
Logged

Boreal
Level 6
*


Reinventing the wheel


View Profile
« Reply #3931 on: November 26, 2014, 11:11:59 PM »



Wrote a surface extraction algorithm.  It's basically a simplified version of Dual Contouring where you don't need to give it Hermite data.  You give it the same, simple density data you would give Marching Cubes, but it still produces a dual quad mesh like Dual Contouring does.  This means that it handles LOD levels very well and there are no ambiguous cases.
Logged

"In software, the only numbers of significance are 0, 1, and N." - Josh Barczak

magma - Reconstructed Mantle API
shellbot
Guest
« Reply #3932 on: November 26, 2014, 11:22:08 PM »

I forgot about this thread...

Earlier this week I realized that I have pretty much finished all core/engine code for Over Yonder.
Basically the only things I need to code now are the remaining enemies and whatever else I add (which at this point, should be nothing)!

Feels good to be 90% code complete Tongue
Logged
Schrompf
Level 9
****

C++ professional, game dev sparetime


View Profile WWW
« Reply #3933 on: November 28, 2014, 03:36:54 AM »

A side project of mine is now done mostly: I rewrote my framework to abstract OpenGL/GLSL and DirectX9/HLSL, now I can switch between the two and use the same code to achieve the same results. Platform selection defaults to OpenGL on Linux and DirectX on Windows, but it's useful to use OGL on Windows at times.

Pretty much useless in the light of all the current engines, but it feels great.
Logged

Snake World, multiplayer worm eats stuff and grows DevLog
oahda
Level 10
*****



View Profile
« Reply #3934 on: November 28, 2014, 06:37:46 AM »

Happy to have my portfolio website with its navigation and bilingualism and contact form and all now up and running – been working hard at it since I started just last weekend. It has three responsive levels plus some special cases for specific elements and works well viewing from my phone too. Now I just need to add more websites I've worked on.
Logged

InfiniteStateMachine
Level 10
*****



View Profile
« Reply #3935 on: November 28, 2014, 10:48:06 AM »

Really liking the unreal engine now that I've spent a good amount of time learning how things are done with it. It's fairly clear once you get used to their design methods.
Logged

oodavid
Level 8
***


Discombobulate!


View Profile WWW
« Reply #3936 on: November 28, 2014, 02:38:47 PM »

Finally decided to read the new Facebook API documentation, pretty happy about that, they've created something quite beautiful! Almost done integrating the basics into Molecule Match - happy days!
Logged


Button up! - Out on Android and iOS

latest release: 13th March 2015
ThemsAllTook
Administrator
Level 10
******



View Profile WWW
« Reply #3937 on: November 28, 2014, 03:20:35 PM »

Finally decided to read the new Facebook API documentation, pretty happy about that, they've created something quite beautiful!

I remember it being one of the most unpleasant programming experiences I've ever had last time I tried to use it. Hope it treats you better.
Logged

oodavid
Level 8
***


Discombobulate!


View Profile WWW
« Reply #3938 on: November 28, 2014, 03:26:57 PM »

TBH, I've always admired their API it's a great way to understand how they've designed their databases, great debugging tools, they have a fucktonne of devs replying to community questions too. Loving applinks.org - solves a lot of platform fragmentation issues Smiley
Logged


Button up! - Out on Android and iOS

latest release: 13th March 2015
InfiniteStateMachine
Level 10
*****



View Profile
« Reply #3939 on: November 28, 2014, 07:19:00 PM »

interesting,  I had to deal with that api about 3-4 years ago and I don't remember it being particularly pleasant either.


since then though they've hired Andrei Alexandrescu and he's converted a bunch of their backend to use D language. Maybe he's had a positive effect on them Smiley
Logged

Pages: 1 ... 195 196 [197] 198 199 ... 279
Print
Jump to:  

Theme orange-lt created by panic