What are you working on?

Discuss anything not covered by any of the other categories.
toneddu2000
Posts: 1395
Joined: Tue Feb 24, 2009 4:39 pm
Location: Italy

Re: What are you working on?

Post by toneddu2000 »

Very cool hud hogsy! Probably number 1 it's too stretchy.
Didn't understand the skyboxes thing
Meadow Fun!! - my first commercial game, made with FTEQW game engine
hogsy
Posts: 198
Joined: Wed Aug 03, 2011 3:44 pm
Location: UK
Contact:

Re: What are you working on?

Post by hogsy »

toneddu2000 wrote:Very cool hud hogsy! Probably number 1 it's too stretchy.
Didn't understand the skyboxes thing
Thanks for the feedback! The font is supposed to look like that (all the numbers are stylised to be rectangular by design).

Regarding the skybox; It's essentially our implementation of a feature Valve's Source engine supports which a lot of level designers find fairly useful for large scale environments (which is useful for us). It allows you to create a separate part of the level which will be scaled up around the rest of the map, and essentially allows you to create huge looking scenery and vistas within what is actually a relatively small environment.
frag.machine
Posts: 2126
Joined: Sat Nov 25, 2006 1:49 pm

Re: What are you working on?

Post by frag.machine »

Skyrooms! Awesome.
I know FrikaC made a cgi-bin version of the quakec interpreter once and wrote part of his website in QuakeC :) (LordHavoc)
toneddu2000
Posts: 1395
Joined: Tue Feb 24, 2009 4:39 pm
Location: Italy

Re: What are you working on?

Post by toneddu2000 »

ah, thanks for the explanation. Very cool idea, so!
Meadow Fun!! - my first commercial game, made with FTEQW game engine
SusanMDK
Posts: 601
Joined: Fri Aug 05, 2005 2:35 pm
Location: In The Sun

Re: What are you working on?

Post by SusanMDK »

hogsy: The hud icons look great. The numbers are maybe a little unclear. My first impression was that they were some other icons for the hud.

I've been working on some reworking TigerCake (needs a new name) to a little different style. So have it look like gl_picmip at max. Thought it could still have some simple patterns on the level textures. It would be ridiculous to make some checkerboard pattern with 2 textures on thousands of brushes. And that's the new player character. Different body parts are now connected, but decided to keep some other minimalism in the model.

There's also some stealth stuff. Player can sneak behind an enemy, or in front of them if invisible. If player moves faster or fires weapons, then the enemies are more likely to notice. They'll eventually forget player, if player hid somewhere. Player can also do some wall jumps and jump kicks. The wall jumps are limited to 3, except on some special walls (that bright wall) it's infinite amount. They're basically a combination of a ladder and a jump pad.

Also now it works in FTE too. And maybe I can get a little demo released this or next week.
Image
zbang!
toneddu2000
Posts: 1395
Joined: Tue Feb 24, 2009 4:39 pm
Location: Italy

Re: What are you working on?

Post by toneddu2000 »

wow jim, compliments! FTE integration is a great addition! We want more ingame videos! :)

PS: you should try to test your game with FTE's no compat release. It removes every Quakey's stuff and it's great for tc.
Meadow Fun!! - my first commercial game, made with FTEQW game engine
SusanMDK
Posts: 601
Joined: Fri Aug 05, 2005 2:35 pm
Location: In The Sun

Re: What are you working on?

Post by SusanMDK »

Thanks... allright:

VIDEO
Image


That no compat sounds interesting, but at the moment it probably wouldn't work very well with this.. also the current plan is to have it work with both DP and FTE.
zbang!
Jay Dolan
Posts: 59
Joined: Tue Jan 22, 2008 7:16 pm
Location: Naples, FL
Contact:

Re: What are you working on?

Post by Jay Dolan »

I've been working on porting select parts of Cocoa (Apple's MVC and interaction framework) to SDL2 and OpenGL in C -- NOT C++.

Every game engine I've ever looked at has 30% of it's code dedicated to the menu system / user interface. That's outrageous, but it makes sense when you consider that all full-featured GUI frameworks hijack window creation, GL context management, event handling and the main loop. Gtk+, Qt, wxWidgets, Cocoa, MFC.. all guilty, all at odds with building a game engine. And so what we have instead is 10-20Kloc per engine dedicated to purpose-built, yet rigid, inextensible, one-off UI toolkits. Every popular open source engine I've seen suffers from this.

I do a lot of iOS development for work, and I've come to admire the sophistication of Cocoa's MVC framework. I'd submit that some of the most beautiful and intuitive interfaces in computing have been built with it, so I thought it'd be a good model to follow. SDL2 and OpenGL are fairly ubiquitous in the open source game engine world, and their APIs are in C, which I also like. With add-on libraries for image loading and TrueType font rendering, SDL2 actually provides a lot of the underpinnings of a UI framework. It even boasts a simple 2D accelerated rendering API for basic geometry. Cool.

So the idea started to take shape in my head: a non-intrusive MVC framework that could be embedded in any game engine using SDL2 and OpenGL. The game creates and manages its window and context, and drives the main loop. Once per frame, give the MVC framework an opportunity to handle events and draw. Using SDL_ttf and SDL's 2D rendering framework, a default set of form controls can be implemented without too much trouble. I decided to style them after the Source Engine's UI, which I've always admired for its simplicity and usability.

The missing piece was of course how to port a highly Object Oriented MVC framework to a procedural language. There's GObject, but it's disgusting. Isn't there anything else out there? Turns out: no. So a little over a year ago, I undertook Objectively:

https://github.com/jdolan/Objectively
http://jaydolan.com/projects/Objectively

Which is now fairly complete, and compiles and runs on Windows, OS X and Linux.

And so, this month, I was finally able to start on ObjectivelyMVC:

Image

https://github.com/jdolan/ObjectivelyMVC
http://jaydolan.com/projects/ObjectivelyMVC/

Here's the source to the program shown above. Replace `drawScene()` with your game's frame function, .. you get the idea.

Code: Select all


#include <Objectively.h>
#include <ObjectivelyMVC.h>

#include "HelloViewController.h"

extern void drawScene(void);

/**
 * @brief Program entry point.
 */
int main(int arg, char **argv) {
	
	LogSetPriority(SDL_LOG_PRIORITY_VERBOSE);
	
	SDL_Init(SDL_INIT_VIDEO);
	
	SDL_Window *window = SDL_CreateWindow(__FILE__,
		SDL_WINDOWPOS_CENTERED,
		SDL_WINDOWPOS_CENTERED,
		1024,
		768,
		SDL_WINDOW_OPENGL | SDL_WINDOW_RESIZABLE
	);
	
	SDL_GL_SetSwapInterval(1);
	
	ViewController *helloViewController = $((ViewController *) alloc(HelloViewController), initRootViewController, window);
	
	SDL_Renderer *renderer = SDL_CreateRenderer(window, 0,
		SDL_RENDERER_ACCELERATED | SDL_RENDERER_TARGETTEXTURE
	);
	
	while (true) {
		SDL_Event event;
		
		memset(&event, 0, sizeof(event));
		
		if (SDL_PollEvent(&event)) {
			
			$(helloViewController, respondToEvent, &event);
			
			if (event.type == SDL_QUIT) {
				break;
			}
		}
		
		SDL_RenderClear(renderer);
		
		drawScene();
		
		$(helloViewController, drawView, renderer);
		
		SDL_RenderPresent(renderer);
	}
	
	release(helloViewController);
	
	SDL_DestroyRenderer(renderer);
	SDL_DestroyWindow(window);
	
	SDL_Quit();
	
	return 0;
}
Looking forward to knocking out a handful of additional control classes, and then replacing the menus in Quetoo with ObjectivelyMVC!
gnounc
Posts: 428
Joined: Mon Apr 06, 2009 6:26 am

Re: What are you working on?

Post by gnounc »

Jdolan,
Sounds like this is probably something I would use. When I step up my programming game, I'll keep this project in mind.

Thanks for sharing it here!

In the meantime, got any screenshots for the menus you've made with it?
gnounc
Posts: 428
Joined: Mon Apr 06, 2009 6:26 am

Re: What are you working on?

Post by gnounc »

https://gitlab.com/gnounc/quakecEvents

Just finished a teensy library for registering and unregistering callbacks.

Test example included.

its as easy as calling

Code: Select all

registerCallback(cb_killTest, EVENT_KILLED);
to register a callback when something dies,

calling

Code: Select all

unregisterCallback(cb_killTest, EVENT_KILLED);
to unregister the function so its no longer called

and to add an event, all you have to do is update EVENT_COUNT to the new number of events,
and add in a call to checkCallbacks() with the entity you want to affect, and the new event constant as the variables.

feedback appreciated
toneddu2000
Posts: 1395
Joined: Tue Feb 24, 2009 4:39 pm
Location: Italy

Re: What are you working on?

Post by toneddu2000 »

@Jay Dolan: it seems very very useful for a little project of mine, thanks for sharing! So, if I understood correctly, Objectively make "talk" a C-based engine with a C++ external source (like an UI library), right? But the UI code needs to be done from scratch, right? Sorry for my ignorance but I'm just trying to learn programming by miself! :lol:

@gnounc: Wow, very cool!
gnounc wrote:and to add an event, all you have to do is update EVENT_COUNT to the new number of events,
and add in a call to checkCallbacks() with the entity you want to affect, and the new event constant as the variables.
I didn't understand this last step
Meadow Fun!! - my first commercial game, made with FTEQW game engine
Jay Dolan
Posts: 59
Joined: Tue Jan 22, 2008 7:16 pm
Location: Naples, FL
Contact:

Re: What are you working on?

Post by Jay Dolan »

Sort of, toneddu2000. Objectively is actually an OO framework for C. It allows you to define classes, with inheritance, and methods on those classes in C using a few widely supported GNU extensions. It includes a small but useful core library (Strings with multibyte character support, collections like Arrays, Dictionaries and Sets, concurrency constructs like Lock, Conditional and Thread, JSON parsing and even URL resource loading via URLSession). Objectively compiles with either GCC or Clang. The core library is inspired by Apple's Foundation framework (NSObject, NSString, NSArray, ...).

ObjectivelyMVC builds on top of Objectively, and uses that core library to then implement an MVC pattern (View, ViewController, Label, Control, Button, TextView, ImageView, ..). ObjectivelyMVC is to Objectively what Apple's UIKit is to Foundation.

So the idea is that you can integrate ObjectivelyMVC, which is a C library, into any C or C++ or Objective C based game engine without imposing.

gnounc, I'll hopefully replace the menus in Quetoo in the next month or so. Implementing the menus should go pretty quickly once I've created all of the Control classes (Selects, Sliders, Checkboxes, etc..) in ObjectivelyMVC. The primary goal of ObjectivelyMVC is to make creating clean, attractive and usable menus in game engines very easy.
frag.machine
Posts: 2126
Joined: Sat Nov 25, 2006 1:49 pm

Re: What are you working on?

Post by frag.machine »

@Jay Dolan: how much the look and feel can be customized ? And how hard is it ? Does your library support some concept of "skin" or "theme" ?
I know FrikaC made a cgi-bin version of the quakec interpreter once and wrote part of his website in QuakeC :) (LordHavoc)
toneddu2000
Posts: 1395
Joined: Tue Feb 24, 2009 4:39 pm
Location: Italy

Re: What are you working on?

Post by toneddu2000 »

Thanks Jay Dolan for the explanation
Meadow Fun!! - my first commercial game, made with FTEQW game engine
Jay Dolan
Posts: 59
Joined: Tue Jan 22, 2008 7:16 pm
Location: Naples, FL
Contact:

Re: What are you working on?

Post by Jay Dolan »

frag.machine wrote:@Jay Dolan: how much the look and feel can be customized ? And how hard is it ? Does your library support some concept of "skin" or "theme" ?
It's quite similar to UIKit: Views have some intrinsic properties that can be customized without subclassing (border, background, padding, ..). If you wish to change appearances beyond that, you simply subclass that View and implement its `render` method. You can even call `super` if you wish to add to or draw over the base implementation.

Also, like UIKit, Views are composed of other Views. So, if you need text inside of a custom component, you simply add a Label at the correct location. If you need an image displayed in your custom component, instantiate an ImageView and add it to your component.

Just like UIKit, while all Controls will have a default appearance, you're free to customize them as you see fit.
Post Reply