• Announcements

    • khawk

      Download the Game Design and Indie Game Marketing Freebook   07/19/17

      GameDev.net and CRC Press have teamed up to bring a free ebook of content curated from top titles published by CRC Press. The freebook, Practices of Game Design & Indie Game Marketing, includes chapters from The Art of Game Design: A Book of Lenses, A Practical Guide to Indie Game Marketing, and An Architectural Approach to Level Design. The GameDev.net FreeBook is relevant to game designers, developers, and those interested in learning more about the challenges in game development. We know game development can be a tough discipline and business, so we picked several chapters from CRC Press titles that we thought would be of interest to you, the GameDev.net audience, in your journey to design, develop, and market your next game. The free ebook is available through CRC Press by clicking here. The Curated Books The Art of Game Design: A Book of Lenses, Second Edition, by Jesse Schell Presents 100+ sets of questions, or different lenses, for viewing a game’s design, encompassing diverse fields such as psychology, architecture, music, film, software engineering, theme park design, mathematics, anthropology, and more. Written by one of the world's top game designers, this book describes the deepest and most fundamental principles of game design, demonstrating how tactics used in board, card, and athletic games also work in video games. It provides practical instruction on creating world-class games that will be played again and again. View it here. A Practical Guide to Indie Game Marketing, by Joel Dreskin Marketing is an essential but too frequently overlooked or minimized component of the release plan for indie games. A Practical Guide to Indie Game Marketing provides you with the tools needed to build visibility and sell your indie games. With special focus on those developers with small budgets and limited staff and resources, this book is packed with tangible recommendations and techniques that you can put to use immediately. As a seasoned professional of the indie game arena, author Joel Dreskin gives you insight into practical, real-world experiences of marketing numerous successful games and also provides stories of the failures. View it here. An Architectural Approach to Level Design This is one of the first books to integrate architectural and spatial design theory with the field of level design. The book presents architectural techniques and theories for level designers to use in their own work. It connects architecture and level design in different ways that address the practical elements of how designers construct space and the experiential elements of how and why humans interact with this space. Throughout the text, readers learn skills for spatial layout, evoking emotion through gamespaces, and creating better levels through architectural theory. View it here. Learn more and download the ebook by clicking here. Did you know? GameDev.net and CRC Press also recently teamed up to bring GDNet+ Members up to a 20% discount on all CRC Press books. Learn more about this and other benefits here.
Sign in to follow this  
Followers 0
schupf

TERRIBLE code editor/tags

22 posts in this topic

I agree, the input box got a lot worse in the new forum. I think it got a lot better when I disabled visual (RTE) editor in Posting Settings. You could try that.
0

Share this post


Link to post
Share on other sites
Agreed. I paste stuff into notepad first, format it all and then paste it into the window here. If I paste it directly from VS, all hell breaks lose.
0

Share this post


Link to post
Share on other sites
Second Wooh's suggestion to turn off the RTE (you can do this in your profile) and just manually type the tags like we used to. I did this fairly shortly after having similar feelings about the editor when it first came in and I have no trouble with it now.

The way it makes tabs eight spaces in a code box is still a bit of an annoyance but I just added a tabs-to-spaces feature to my text editor and make sure I run any actual code from an editor through that before I post.

Staff? Would it be possible to address the length of tabs in code boxes? Now pasting this, just from a plain text editor, with some tabs:

[code]
int main()
{
for(int i=0;i<10;++i)
{
std::cout << "Icky\n";
}
}
[/code]

I don't know anyone who has their tabs set to that many spaces in real code and find it hard to read, but it would be nice to be able to just paste direct from an IDE without having to mess about replacing the tabs with spaces.

Minor nitpick, sure you have lots of more important things to worry about. :)
1

Share this post


Link to post
Share on other sites
[code]
int main() {
int a;
int b;
int c;
}
[/code]
Thanks for the tip about RTE. I switched it off and indeed: the editor is MUCH better now.
But the code tag still looks so unbelievable ugly. I can barely see the dark blue brackets on the dark background. Seriously, even NO highlighing at all would be better. The old syntax highlighting was 100times better:/
0

Share this post


Link to post
Share on other sites
[quote name='schupf' timestamp='1306087491' post='4814300']
[code]
int main() {
int a;
int b;
int c;
}
[/code]

But the code tag still looks so unbelievable ugly. I can barely see the dark blue brackets on the dark background.
[/quote]

Mmm, just tried the black alpha theme and it isn't [i]that[/i] bad in my view, but it does look a lot nicer in classic, if you can bear all the bright pages. Never got on with black theme, myself.
0

Share this post


Link to post
Share on other sites
[quote name='Aardvajk' timestamp='1306087781' post='4814301']
[quote name='schupf' timestamp='1306087491' post='4814300']
[code]
int main() {
int a;
int b;
int c;
}
[/code]

But the code tag still looks so unbelievable ugly. I can barely see the dark blue brackets on the dark background.
[/quote]

Mmm, just tried the black alpha theme and it isn't [i]that[/i] bad in my view, but it does look a lot nicer in classic, if you can bear all the bright pages. Never got on with black theme, myself.
[/quote]
I switched the theme to the bright one and yes, now it's readable:)
I still think it is a little bit odd, having default settings that are bad. If I were an admin I would switch of RTE and the black them by default.
0

Share this post


Link to post
Share on other sites
[font="Courier New"][color="#808000"]#include "app.h"[/color][/font]

[font="Courier New"]app::app()[/font]
[font="Courier New"]{[/font]

[font="Courier New"]}[/font]

[font="Courier New"]app::~app()[/font]
[font="Courier New"]{[/font]

[font="Courier New"]}[/font]

[font="Courier New"][b][color="#000080"]void[/color][/b] app::configure()[/font]
[font="Courier New"]{[/font]
[font="Courier New"] call_configure.call();[/font]
[font="Courier New"]}[/font]

[font="Courier New"][b][color="#000080"]void[/color][/b] app::init()[/font]
[font="Courier New"]{[/font]
[font="Courier New"] input.on_input += owl::app::input_delegate(&app::input_event, [b][color="#000080"]this[/color][/b]);[/font]

[font="Courier New"] [color="#808080"]// Load script[/color][/font]
[font="Courier New"] script = owl::script::script_ptr([b][color="#000080"]new [/color][/b]owl::script::script());[/font]
[font="Courier New"] script->init();[/font]
[font="Courier New"] script->load([color="#000080"]"lua_main.lua"[/color]);[/font]

[font="Courier New"] call_init.call();[/font]
[font="Courier New"]}[/font]

[font="Arial"]EDIT: Yap. Not even avoiding the code tags. The editor keeps duplicating new lines randomly and also ignoring tabs.[/font]
0

Share this post


Link to post
Share on other sites
[quote name='schupf' timestamp='1306087491' post='4814300']
[code]
int main() {
int a;
int b;
int c;
}
[/code]
Thanks for the tip about RTE. I switched it off and indeed: the editor is MUCH better now.
But the code tag still looks so unbelievable ugly. I can barely see the dark blue brackets on the dark background. Seriously, even NO highlighing at all would be better. The old syntax highlighting was 100times better:/
[/quote]

Dark blue brackets on the dark background? The background is a light gray (?). We are not currently maintaining the black theme since we have been a white site for almost six years now. We don't have the manpower to try and keep two radically different color variations up to date.
0

Share this post


Link to post
Share on other sites
[source lang="cpp"]

[font="Courier New"][color="#808000"]#include "app.h"[/color][/font]

[font="Courier New"]app::app()[/font]
[font="Courier New"]{[/font]

[font="Courier New"]}[/font]

[font="Courier New"]app::~app()[/font]
[font="Courier New"]{[/font]

[font="Courier New"]}[/font]

[font="Courier New"][b][color="#000080"]void[/color][/b] app::configure()[/font]
[font="Courier New"]{[/font]
[font="Courier New"] call_configure.call();[/font]
[font="Courier New"]}[/font]

[font="Courier New"][b][color="#000080"]void[/color][/b] app::init()[/font]
[font="Courier New"]{[/font]
[font="Courier New"] input.on_input += owl::app::input_delegate(&app::input_event, [b][color="#000080"]this[/color][/b]);[/font]

[font="Courier New"] [color="#808080"]// Load script[/color][/font]
[font="Courier New"] script = owl::script::script_ptr([b][color="#000080"]new [/color][/b]owl::script::script());[/font]
[font="Courier New"] script->init();[/font]
[font="Courier New"] script->load([color="#000080"]"lua_main.lua"[/color]);[/font]

[font="Courier New"] call_init.call();[/font]
[font="Courier New"]}

[/source]

source lang="cpp"
/source
[/font]
1

Share this post


Link to post
Share on other sites
[quote name='owl' timestamp='1306124470' post='4814449']
I wanna
[/quote]

The source tag inclusion is relatively new.. but don't omit the lang="cpp" argument as it seems to mangle the code right now. I posted about it here:
http://www.gamedev.net/blog/1037/entry-2249817-new-syntax-highlighting-in-forums-and-journals/
0

Share this post


Link to post
Share on other sites
[quote name='Michael Tanczos' timestamp='1306124734' post='4814451']
[quote name='owl' timestamp='1306124470' post='4814449']
I wanna
[/quote]

The source tag inclusion is relatively new.. but don't omit the lang="cpp" argument as it seems to mangle the code right now. I posted about it here:
[url="http://www.gamedev.net/blog/1037/entry-2249817-new-syntax-highlighting-in-forums-and-journals/"]http://www.gamedev.n...s-and-journals/[/url]
[/quote]

[size="2"][color="#1c2837"]
[source lang="cpp"]
void owl::render::gui::gui::input_event(const owl::app::input_event& e)
{
root->input_event(e);
}

void owl::render::gui::gui::hide_dialog()
{
root->pop_dialog();
}

void owl::render::gui::gui::show_file_dialog()
{
root->add_dialog(dialog.file);
dialog.file->set_visible(true);
dialog.file->move( (root->get_width()-dialog.file->get_width())/2, (root->get_height()-dialog.file->get_height())/2);
}

void owl::render::gui::gui::messagebox(const std::string& text )
{
root->add_dialog(dialog.messagebox);
dialog.messagebox->set_visible(true);
dialog.messagebox->move( (root->get_width()-dialog.messagebox->get_width())/2, (root->get_height()-dialog.messagebox->get_height())/2);
}
[/source][/color][/size]

[size="7"][color="#1c2837"]EDIT: YAY![/color][/size]
[size="7"][color="#1c2837"]EDIT2: When I touch it, it gets broken! [img]http://media.skateboard.com.au/forum/images/crying%20smiley.gif[/img][/color][/size]
0

Share this post


Link to post
Share on other sites
When you say broken, what happens? I did notice that sometimes on a subsequent edit is that the syntax highlighter doesn't immediately load.. but for some reason reloading the page again loads the highlighter again. I'm not sure if there is some sort of ajaxy posting thing going on when editing.
0

Share this post


Link to post
Share on other sites
Hmm.

[source lang="cpp"]
void Application::OnActionCommand(USHORT CommandID)
{
switch(CommandID)
{
case IDA_EXIT: PostMessage(AppHw,WM_CLOSE,0,0); break;
}
}
[/source]

[EDIT] Yay! Tabs work properly with the source and cpp tags. Thanks, Mr Tanczos. Should really keep more up to date.

[EDIT] Wait, I see what owl means. As soon as I edit a post then save the changes, the source and lang=cpp box goes back to behaving like the code box. Weird.

[EDIT] Until I refresh, then come back again. Never mind, probably a cache issue or something.
0

Share this post


Link to post
Share on other sites
[quote name='Michael Tanczos' timestamp='1306149436' post='4814537']
I did notice that sometimes on a subsequent edit is that the syntax highlighter doesn't immediately load.[/quote]

I think it might be related to the edit box being handled with ajax. Some way to re-run the java after edit could solve it tough.

That's a gorgeous source tag. Keep it.
0

Share this post


Link to post
Share on other sites
[quote name='owl' timestamp='1306180121' post='4814719']
That's a gorgeous source tag. Keep it.
[/quote]

Agreed. All source tags should render in Consolas, or they are not teh winnar. And being now able to copy-paste direct from VS is awesome.
0

Share this post


Link to post
Share on other sites
I would like to propose that the existing code tag be modified so that it doesn't use it's broken syntax highlighter anymore and instead uses the new syntax highlighter like the source tag; as there is no way at present to provide an argument deciding which language to highlight with the code tag it should use the "text" (plain text) brush, giving a nice box with a mono-spaced font and scrollbar but not risking incorrect colouring.

This way people using the RTE UI would get partial benefit of the new syntax highlighter, and if I understand how the system functions posts already using the defective tag should also be improved for future viewers.

This is all of course assuming you haven't found a way to actually provide UI for the new source tag; if you can do that it would be a preferred solution, and ideally some of the other options (such as the ability to highlight some lines) should be exposed.


From what I understand there's a simple way to change the HTML output of BBCode tags, so if I'm correct this should be a very quick and simple change to make?
0

Share this post


Link to post
Share on other sites
[quote name='jbadams' timestamp='1306227895' post='4815029']
I would like to propose that the existing code tag be modified so that it doesn't use it's broken syntax highlighter anymore and instead uses the new syntax highlighter like the source tag; as there is no way at present to provide an argument deciding which language to highlight with the code tag it should use the "text" (plain text) brush, giving a nice box with a mono-spaced font and scrollbar but not risking incorrect colouring.

This way people using the RTE UI would get partial benefit of the new syntax highlighter, and if I understand how the system functions posts already using the defective tag should also be improved for future viewers.

This is all of course assuming you haven't found a way to actually provide UI for the new source tag; if you can do that it would be a preferred solution, and ideally some of the other options (such as the ability to highlight some lines) should be exposed.


From what I understand there's a simple way to change the HTML output of BBCode tags, so if I'm correct this should be a very quick and simple change to make?
[/quote]

I had to write a custom plugin for this and it has to sort of compete with the native processing of posts as well since the syntax highlighter wants absolutely ZERO br tags in the source code and IPB wants to put br tags in. Right now the RTE for this software is also very basic in terms of what you can add on plugin wise.. Version 3.2 of IPB can't get here fast enough for me. I want tags in the forums and and the brand new RTE that includes your own personal media library that you can upload images and other files to to link from in posts. Maybe then we'll get some sophistication with the plugins we can write.. finally.
1

Share this post


Link to post
Share on other sites
I should imagine IPB are probably rueing the day they sold their product to you lot. Bet they've never had such demanding customers before :).
0

Share this post


Link to post
Share on other sites
[quote name='Michael Tanczos' timestamp='1306238841' post='4815080']
I had to write a custom plugin for this and it has to sort of compete with the native processing of posts as well since the syntax highlighter wants absolutely ZERO br tags in the source code and IPB wants to put br tags in. Right now the RTE for this software is also very basic in terms of what you can add on plugin wise.. Version 3.2 of IPB can't get here fast enough for me. I want tags in the forums and and the brand new RTE that includes your own personal media library that you can upload images and other files to to link from in posts. Maybe then we'll get some sophistication with the plugins we can write.. finally.
[/quote]

The "Alert" when a language wasn't found could be commented out. (or does it show only for the poster?)
Maybe if the language isn't present it could be defaulted to cpp? At least that way the format of the box can be kept and the literals will still be colored.
0

Share this post


Link to post
Share on other sites
[quote name='Aardvajk' timestamp='1306247561' post='4815133']
I should imagine IPB are probably rueing the day they sold their product to you lot. Bet they've never had such demanding customers before :).
[/quote]

We have submitted quite a few bug reports / suggestions. ;)
0

Share this post


Link to post
Share on other sites
New code looks great. I wonder something though. Since this is a developer's forum do you think they take your suggestions with a bit more weight than other non-developer customers? Just wondering.
0

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0