Results 1 to 10 of 39

Thread: OpenGL GLSL - Text rendering query

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    On the topic, using shaders: if you are drawing text on background you don't need to use transparency, just lerp between font and background color based on font alpha.

    I don't know anything about OpenGL 2.0 because I stared with 3.0 using tutorials in C++. You don't really need to know much about C++ to apply this to pascal as OpenGL API calls stay the same. I guess that's why no one really bothers to make tutorials in Pascal

    Learned mainly from this one with zero prior OpenGL knowledge and managed to pull off deferred renderer with SSAO and stuff: http://ogldev.atspace.co.uk/

  2. #2
    PGD Community Manager AthenaOfDelphi's Avatar
    Join Date
    Dec 2004
    Location
    South Wales, UK
    Posts
    1,245
    Blog Entries
    2
    Quote Originally Posted by laggyluk View Post
    On the topic, using shaders: if you are drawing text on background you don't need to use transparency, just lerp between font and background color based on font alpha.

    I don't know anything about OpenGL 2.0 because I stared with 3.0 using tutorials in C++. You don't really need to know much about C++ to apply this to pascal as OpenGL API calls stay the same. I guess that's why no one really bothers to make tutorials in Pascal

    Learned mainly from this one with zero prior OpenGL knowledge and managed to pull off deferred renderer with SSAO and stuff: http://ogldev.atspace.co.uk/
    Thanks for that, I'll take a look. For the time being, my approach is working, allowing me to focus on the more interesting elements of the game I'm trying to write
    :: AthenaOfDelphi :: My Blog :: My Software ::

  3. #3
    Hey AthenaOfDelphi are you perhaps panning in participating in Lazarus Game Contest 2018? Based on this thread I'm assuming you plan on having a retro look in your game. Right?

  4. #4
    PGD Community Manager AthenaOfDelphi's Avatar
    Join Date
    Dec 2004
    Location
    South Wales, UK
    Posts
    1,245
    Blog Entries
    2
    No, I'm not having a go at a competition... I did look at it, but if I recall correctly, you have to release sources... I'd like to make money from this endeavour, so it's closed source all the way for me right now

    And yes, it is due to have a retro look... mainly text based UI for the entire game.
    :: AthenaOfDelphi :: My Blog :: My Software ::

  5. #5
    Quote Originally Posted by AthenaOfDelphi View Post
    No, I'm not having a go at a competition... I did look at it, but if I recall correctly, you have to release sources... I'd like to make money from this endeavour, so it's closed source all the way for me right now
    That is understandable. The same reason is dissuading me from entering the mentioned competition.

    Quote Originally Posted by AthenaOfDelphi View Post
    And yes, it is due to have a retro look... mainly text based UI for the entire game.
    Care to share more info on your game idea?

  6. #6
    PGD Community Manager AthenaOfDelphi's Avatar
    Join Date
    Dec 2004
    Location
    South Wales, UK
    Posts
    1,245
    Blog Entries
    2
    I don't want to say too much, it may never even see the light of day, but it is serving as a vehicle to refresh my coding mojo

    But, I've been playing quite a bit of Factorio, Gunpoint, SpaceChem, TIS-100, Shenzhen I/O, Opus Magnum, Silicon Zeroes, Hacknet, Uplink... all of them make me think... but whilst they are all fantastic games, they kind of lack depth. Hacknet for example... once you've hacked one system, aside from the incremental difficulty which can be largely mitigated by upgraded in-game software, there's not much more to do... hack, move to next story point, hack, move to next story point. Silicon Zeroes... same, great game, but it only has a limited number of components for you to use and there is no sandbox, so it's get task, build solution, get task, build solution, with each one being harder than the last and don't get me wrong... some of the tasks are pretty evil.

    As an example, I'm trying to build a solution for a 2 pipeline CPU design that has two registers... accumulator and backup... so you've got to build into the design the capability of handling things like this:- LDAC 2 SAVE 10. Which might translate to load accumulator with 2 (will be executed by pipeline 1) and save accumulator to memory location 10 (will be executed by pipeline 2). The components you have are number (a constant number), add, sub, multiply, equality, read memory, write memory, latch, registers, input selector, output selector, instruction decoder and instruction selector. What's available depends on the puzzle and you may or may not have to worry about tick limits (i.e. complete the execution of the program within a given number of clock ticks).

    But essentially it's the same thing over and over and as stated, there is not sandbox so you can't just play with everything to try and make stuff because typically the puzzles have a limited selection of components.

    So, with all that in mind, I'm trying to write the kind of game I want to play. If all goes to plan the action will take place in a simulated computer system complete with a BIOS and operating system. So presently I'm building the classes I need to simulate the hardware. At the same time, I need to write a cross assembler for my PC so I can write the OS for my simulated system and then set about writing some basic tools for the machine. The text rendering is part of the simulated video controller. 256 colour palette, standard ASCII character set (have PC, Atari ST and Atari 8 bit character sets) and character attributes that can specify blinking, character set and palette to use.

    That's about as much as you're going to get out of me for now
    :: AthenaOfDelphi :: My Blog :: My Software ::

  7. #7
    I see you have similar taste for games like me. I was also disappointed in some of them because they lack the proper depth.
    For instance I really liked Uplink but was disappointed by the fact that later game becomes more difficult simply by lowering the time that you have to hack certain computer. So I come up to idea so that there would be different OS-es on different computers where each OS would require different hacking approach.
    Another thing that disappoints me in most hacking games is that when you hack to some computer you are presented with just a few folders and files. That is nothing like any real life computer. So my idea is to create this virtual file-structure and its contents based on the computer OS and the programs that are installed on them. Which programs are installed on them should depend on the intended use of such computers. So for instance a home computer would have mostly games and some multimedia programs on them. Business computers would have more document writing or some special business programs on them and so on.
    Also in my idea I intent to abandon the classic hacking style seen in most hacking games or movies where you sit in front of your computer all the time and you can do just about everything from there. Instead my plan is to require gamer to go and perhaps infiltrate some organization in order to get direct access to their computers because they simply have to strong protection to be hack-able.

    This idea of mine is another reason why I started working on my own UI library because I need a UI library that would allow me to develop multiple different UI-s preferably with ease.
    Any way for now my idea is more or less just an idea since I haven't managed to make any of the systems it requires yet. Maybe someday in the future it becomes a reality but before that happens I may put some of my other ideas into the reality first as they are less complex and thus easier to make.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •